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.
This commit is contained in:
parent
9e937d9c47
commit
16b9dcf8b8
35
file.c
35
file.c
@ -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" },
|
||||
|
@ -47,8 +47,6 @@
|
||||
#define sys_name_to_handle_at printargs
|
||||
#define sys_open_by_handle_at printargs
|
||||
#define sys_request_key printargs
|
||||
#define sys_sync_file_range printargs
|
||||
#define sys_sync_file_range2 printargs
|
||||
#define sys_sysfs printargs
|
||||
#define sys_vm86old printargs
|
||||
#define sys_vm86 printargs
|
||||
|
@ -305,7 +305,7 @@
|
||||
{ 5, TD, sys_ppoll, "ppoll" }, /* 4302 */
|
||||
{ 1, TP, sys_unshare, "unshare" }, /* 4303 */
|
||||
{ 6, TD, sys_splice, "splice" }, /* 4304 */
|
||||
{ 6, TD, sys_sync_file_range, "sync_file_range" }, /* 4305 */
|
||||
{ 7, TD, sys_sync_file_range, "sync_file_range" }, /* 4305 */
|
||||
{ 4, TD, sys_tee, "tee" }, /* 4306 */
|
||||
{ 4, TD, sys_vmsplice, "vmsplice" }, /* 4307 */
|
||||
{ 6, TM, sys_move_pages, "move_pages" }, /* 4308 */
|
||||
|
@ -267,6 +267,8 @@ int sys_statfs64();
|
||||
int sys_stime();
|
||||
int sys_swapon();
|
||||
int sys_symlinkat();
|
||||
int sys_sync_file_range();
|
||||
int sys_sync_file_range2();
|
||||
int sys_sysctl();
|
||||
int sys_sysinfo();
|
||||
int sys_syslog();
|
||||
|
Loading…
x
Reference in New Issue
Block a user