Implement lookup_dcookie syscall decoding

* lookup_dcookie.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* linux/dummy.h (sys_lookup_dcookie): Remove stub alias.
This commit is contained in:
Дмитрий Левин 2015-11-22 19:28:17 +00:00
parent ea1970500e
commit 60d7524090
3 changed files with 23 additions and 1 deletions

View File

@ -87,6 +87,7 @@ strace_SOURCES = \
keyctl.c \
ldt.c \
link.c \
lookup_dcookie.c \
loop.c \
lseek.c \
mem.c \

View File

@ -32,7 +32,6 @@
#endif
/* still unfinished */
#define sys_lookup_dcookie printargs
#define sys_name_to_handle_at printargs
#define sys_open_by_handle_at printargs
#define sys_sysfs printargs

22
lookup_dcookie.c Normal file
View File

@ -0,0 +1,22 @@
#include "defs.h"
SYS_FUNC(lookup_dcookie)
{
if (entering(tcp))
return 0;
/* cookie */
int argn = printllval(tcp, "%llu", 0);
tprints(", ");
/* buffer */
if (syserror(tcp))
printaddr(tcp->u_arg[argn]);
else
printstr(tcp, tcp->u_arg[argn], tcp->u_rval);
/* len */
tprintf(", %lu", tcp->u_arg[argn + 1]);
return 0;
}