aboutsummaryrefslogtreecommitdiff
path: root/linux-user/strace.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux-user/strace.c')
-rw-r--r--linux-user/strace.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/linux-user/strace.c b/linux-user/strace.c
index 13981341b3..5e38048643 100644
--- a/linux-user/strace.c
+++ b/linux-user/strace.c
@@ -541,6 +541,7 @@ static void
print_fdset(int n, abi_ulong target_fds_addr)
{
int i;
+ int first = 1;
qemu_log("[");
if( target_fds_addr ) {
@@ -555,9 +556,12 @@ print_fdset(int n, abi_ulong target_fds_addr)
return;
for (i=n; i>=0; i--) {
- if ((tswapal(target_fds[i / TARGET_ABI_BITS]) >> (i & (TARGET_ABI_BITS - 1))) & 1)
- qemu_log("%d,", i);
+ if ((tswapal(target_fds[i / TARGET_ABI_BITS]) >>
+ (i & (TARGET_ABI_BITS - 1))) & 1) {
+ qemu_log("%s%d", get_comma(first), i);
+ first = 0;
}
+ }
unlock_user(target_fds, target_fds_addr, 0);
}
qemu_log("]");