diff options
author | William Manley <william.manley@youview.com> | 2013-08-09 18:04:11 +0100 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2013-09-11 14:21:33 +0000 |
commit | 16b9dcf8b870f47305aa2db174f5abccefb7cd94 (patch) | |
tree | 6685bb348c800f5d3cce3e544d8bf43bec0f224f /file.c | |
parent | 9e937d9c471a7e365d621d11d4fa06c8f4b02454 (diff) | |
download | strace-16b9dcf8b870f47305aa2db174f5abccefb7cd94.tar.gz strace-16b9dcf8b870f47305aa2db174f5abccefb7cd94.tar.bz2 strace-16b9dcf8b870f47305aa2db174f5abccefb7cd94.tar.xz |
Add support for decoding sync_file_range
* file.c (sync_file_range_flags): New xlat structure.
(sys_sync_file_range, sys_sync_file_range2): New functions.
* linux/syscall.h (sys_sync_file_range, sys_sync_file_range2): New
prototypes.
* linux/dummy.h (sys_sync_file_range, sys_sync_file_range2): Remove.
* linux/mips/syscallent-o32.h: Set the number of sync_file_range
arguments to 7.
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 35 |
1 files changed, 35 insertions, 0 deletions
@@ -2686,6 +2686,41 @@ sys_fadvise64_64(struct tcb *tcp) return 0; } +static const struct xlat sync_file_range_flags[] = { + { SYNC_FILE_RANGE_WAIT_BEFORE, "SYNC_FILE_RANGE_WAIT_BEFORE" }, + { SYNC_FILE_RANGE_WRITE, "SYNC_FILE_RANGE_WRITE" }, + { SYNC_FILE_RANGE_WAIT_AFTER, "SYNC_FILE_RANGE_WAIT_AFTER" }, + { 0, NULL } +}; + +int +sys_sync_file_range(struct tcb *tcp) +{ + if (entering(tcp)) { + int argn; + printfd(tcp, tcp->u_arg[0]); + argn = printllval(tcp, ", %lld, ", 1); + argn = printllval(tcp, "%lld, ", argn); + printflags(sync_file_range_flags, tcp->u_arg[argn], + "SYNC_FILE_RANGE_???"); + } + return 0; +} + +int +sys_sync_file_range2(struct tcb *tcp) +{ + if (entering(tcp)) { + int argn; + printfd(tcp, tcp->u_arg[0]); + printflags(sync_file_range_flags, 1, + "SYNC_FILE_RANGE_???"); + argn = printllval(tcp, ", %lld, ", 2); + argn = printllval(tcp, "%lld, ", argn); + } + return 0; +} + static const struct xlat inotify_modes[] = { { 0x00000001, "IN_ACCESS" }, { 0x00000002, "IN_MODIFY" }, |