numa: fix printing of error values in move_pages status array

* numa.c (print_status): Do not lose a minus sign when printing
a symbolic error code.
* tests/move_pages.c (print_status_array): Update expected output.
This commit is contained in:
Дмитрий Левин 2017-04-17 04:36:54 +00:00
parent 25fa79bdb2
commit 15d574a899
2 changed files with 2 additions and 2 deletions

2
numa.c
View File

@ -142,7 +142,7 @@ print_status(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
const int status = * (int *) elem_buf;
if (status < 0 && (unsigned) -status < nerrnos)
tprintf("%s", errnoent[-status]);
tprintf("-%s", errnoent[-status]);
else
tprintf("%d", status);

View File

@ -126,7 +126,7 @@ print_status_array(const int *const status, const unsigned long count)
printf("%d", status[i]);
} else {
errno = -status[i];
printf("%s", errno2name());
printf("-%s", errno2name());
}
}
printf("]");