Commit eaea8f25 authored by Konstantin Khlebnikov's avatar Konstantin Khlebnikov Committed by Pavel Emelyanov

zdtm: maps02: fix detecting VmFlags absence

#PSBM-19883
Signed-off-by: 's avatarKonstantin Khlebnikov <khlebnikov@openvz.org>
Acked-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 8e72d968
......@@ -115,6 +115,7 @@ static int get_smaps_bits(unsigned long where, unsigned long *flags, unsigned lo
unsigned long start = 0, end = 0;
FILE *smaps = NULL;
char buf[1024];
int found = 0;
if (!where)
return 0;
......@@ -129,6 +130,7 @@ static int get_smaps_bits(unsigned long where, unsigned long *flags, unsigned lo
is_vma_range_fmt(buf, &start, &end);
if (!strncmp(buf, "VmFlags: ", 9) && start == where) {
found = 1;
parse_vmflags(buf, flags, madv);
break;
}
......@@ -136,7 +138,7 @@ static int get_smaps_bits(unsigned long where, unsigned long *flags, unsigned lo
fclose(smaps);
if (start == end) {
if (!found) {
err("VmFlags not found for %lx\n", where);
return -1;
}
......
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