Commit c983ca84 authored by Marc-André Lureau's avatar Marc-André Lureau

dump: fix note_name_equal()

Use the function argument "name" instead of hardcoded
"VMCOREINFO". All callers use "VMCOREINFO" as argument, so this isn't
an exposed bug, thankfully.

Simplify a little bit the code while touching this.
Suggested-by: 's avatarAndrew Jones <>
Reported-by: 's avatarLaszlo Ersek <>
Signed-off-by: 's avatarMarc-André Lureau <>
parent 281f3274
......@@ -788,12 +788,7 @@ static bool note_name_equal(DumpState *s,
get_note_sizes(s, note, &head_size, &name_size, NULL);
head_size = ROUND_UP(head_size, 4);
if (name_size != len ||
memcmp(note + head_size, "VMCOREINFO", len)) {
return false;
return true;
return name_size == len && memcmp(note + head_size, name, len) == 0;
/* write common header, sub header and elf note to vmcore */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment