Revision c727f47d

b/configure
2075 2075
  fallocate=yes
2076 2076
fi
2077 2077

  
2078
# check for sync_file_range
2079
sync_file_range=no
2080
cat > $TMPC << EOF
2081
#include <fcntl.h>
2082

  
2083
int main(void)
2084
{
2085
    sync_file_range(0, 0, 0, 0);
2086
    return 0;
2087
}
2088
EOF
2089
if compile_prog "$ARCH_CFLAGS" "" ; then
2090
  sync_file_range=yes
2091
fi
2092

  
2078 2093
# check for dup3
2079 2094
dup3=no
2080 2095
cat > $TMPC << EOF
......
2613 2628
if test "$fallocate" = "yes" ; then
2614 2629
  echo "CONFIG_FALLOCATE=y" >> $config_host_mak
2615 2630
fi
2631
if test "$sync_file_range" = "yes" ; then
2632
  echo "CONFIG_SYNC_FILE_RANGE=y" >> $config_host_mak
2633
fi
2616 2634
if test "$dup3" = "yes" ; then
2617 2635
  echo "CONFIG_DUP3=y" >> $config_host_mak
2618 2636
fi
b/linux-user/strace.list
1518 1518
#ifdef TARGET_NR_utimensat
1519 1519
{ TARGET_NR_utimensat, "utimensat", NULL, print_utimensat, NULL },
1520 1520
#endif
1521
#ifdef TARGET_NR_sync_file_range
1522
{ TARGET_NR_sync_file_range, "sync_file_range", NULL, NULL, NULL },
1523
#endif
1524
#ifdef TARGET_NR_sync_file_range2
1525
{ TARGET_NR_sync_file_range2, "sync_file_range2", NULL, NULL, NULL },
1526
#endif
b/linux-user/syscall.c
7365 7365
        ret = get_errno(fallocate(arg1, arg2, arg3, arg4));
7366 7366
        break;
7367 7367
#endif
7368
#if defined(CONFIG_SYNC_FILE_RANGE)
7369
#if defined(TARGET_NR_sync_file_range)
7370
    case TARGET_NR_sync_file_range:
7371
#if TARGET_ABI_BITS == 32
7372
        ret = get_errno(sync_file_range(arg1, target_offset64(arg2, arg3),
7373
                                        target_offset64(arg4, arg5), arg6));
7374
#else
7375
        ret = get_errno(sync_file_range(arg1, arg2, arg3, arg4));
7376
#endif
7377
        break;
7378
#endif
7379
#if defined(TARGET_NR_sync_file_range2)
7380
    case TARGET_NR_sync_file_range2:
7381
        /* This is like sync_file_range but the arguments are reordered */
7382
#if TARGET_ABI_BITS == 32
7383
        ret = get_errno(sync_file_range(arg1, target_offset64(arg3, arg4),
7384
                                        target_offset64(arg5, arg6), arg2));
7385
#else
7386
        ret = get_errno(sync_file_range(arg1, arg3, arg4, arg2));
7387
#endif
7388
        break;
7389
#endif
7390
#endif
7368 7391
    default:
7369 7392
    unimplemented:
7370 7393
        gemu_log("qemu: Unsupported syscall: %d\n", num);

Also available in: Unified diff