@@ -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("]");