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:
parent
25fa79bdb2
commit
15d574a899
2
numa.c
2
numa.c
@ -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);
|
||||
|
||||
|
@ -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("]");
|
||||
|
Loading…
Reference in New Issue
Block a user