[PATCH] getdents: fix typos in array output
Gabriel Laskar
gabriel at lse.epita.fr
Wed Nov 18 23:11:33 UTC 2015
Array should be enclosed by square brakets, and elements should be
separated by commas.
* dirent.c: fix typos in array output of getdents()
Signed-off-by: Gabriel Laskar <gabriel at lse.epita.fr>
---
dirent.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dirent.c b/dirent.c
index 7b2609e..8b84af3 100644
--- a/dirent.c
+++ b/dirent.c
@@ -92,7 +92,7 @@ SYS_FUNC(getdents)
}
if (!abbrev(tcp))
- tprints("{");
+ tprints("[");
for (i = 0; len && i <= len - sizeof(struct kernel_dirent); ) {
struct kernel_dirent *d = (struct kernel_dirent *) &buf[i];
@@ -105,7 +105,7 @@ SYS_FUNC(getdents)
d_name_len = D_NAME_LEN_MAX;
tprintf("%s{d_ino=%lu, d_off=%lu, d_reclen=%u, d_name=",
- i ? " " : "", d->d_ino, d->d_off, d->d_reclen);
+ i ? ", " : "", d->d_ino, d->d_off, d->d_reclen);
if (print_quoted_string(d->d_name, d_name_len,
QUOTE_0_TERMINATED) > 0) {
@@ -127,7 +127,7 @@ SYS_FUNC(getdents)
i += d->d_reclen;
}
if (!abbrev(tcp))
- tprints("}");
+ tprints("]");
else
tprintf("/* %u entries */", dents);
tprintf(", %lu", tcp->u_arg[2]);
--
2.6.2
More information about the Strace-devel
mailing list