mem: print mincore output as an array
* mem.c (SYS_FUNC(minore)): Print commas between elements. * tests/mincore.c (print_mincore): Update expected output in accordance with syscall decoder formatting change.
This commit is contained in:
parent
a938b441d6
commit
d4d5aaa560
2
mem.c
2
mem.c
@ -287,6 +287,8 @@ SYS_FUNC(mincore)
|
||||
unsigned long i;
|
||||
tprints("[");
|
||||
for (i = 0; i < len; i++) {
|
||||
if (i)
|
||||
tprints(", ");
|
||||
if (abbrev(tcp) && i >= max_strlen) {
|
||||
tprints("...");
|
||||
break;
|
||||
|
@ -42,6 +42,8 @@ print_mincore(const unsigned int pages, void *const addr,
|
||||
|
||||
printf("mincore(%p, %zu, [", addr, size);
|
||||
for (i = 0; i < pages; ++i) {
|
||||
if (i)
|
||||
printf(", ");
|
||||
if (i >= DEFAULT_STRLEN) {
|
||||
printf("...");
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user