#include <sys/vfs.h>
#endif
+#ifdef HAVE_LINUX_XATTR_H
+#include <linux/xattr.h>
+#elif defined linux
+#define XATTR_CREATE 1
+#define XATTR_REPLACE 2
+#endif
+
#ifdef FREEBSD
#include <sys/param.h>
#include <sys/mount.h>
#endif
#ifdef FNOCTTY
{ FNOCTTY, "FNOCTTY" },
-#endif
+#endif
#ifdef O_SHLOCK
{ O_SHLOCK, "O_SHLOCK" },
#endif
if (_whence == SEEK_SET)
tprintf("%lu, ", offset);
else
- tprintf("%ld, ", offset);
+ tprintf("%ld, ", offset);
printxval(whence, _whence, "SEEK_???");
- }
+ }
return RVAL_UDECIMAL;
}
#endif
}
return 0;
}
+
+int
+sys_readahead (tcp)
+struct tcb *tcp;
+{
+ if (entering(tcp)) {
+ tprintf("%ld, %lld, %ld", tcp->u_arg[0],
+# if defined IA64 || defined X86_64 || defined ALPHA
+ (long long int) tcp->u_arg[1], tcp->u_arg[2]
+# else
+ (((long long int) tcp->u_arg[1]) << 32
+ | ((unsigned long *) tcp->u_arg)[2]),
+ tcp->u_arg[3]
+# endif
+ );
+ }
+ return 0;
+}
#endif
#if _LFS64_LARGEFILE || HAVE_LONG_LONG_OFF_T
tprintf(", makedev(%lu, %lu)",
(unsigned long) ((tcp->u_arg[3] >> 18) & 0x3fff),
(unsigned long) (tcp->u_arg[3] & 0x3ffff));
-#else
+#else
tprintf(", makedev(%lu, %lu)",
(unsigned long) major(tcp->u_arg[3]),
(unsigned long) minor(tcp->u_arg[3]));
-#endif
+#endif
break;
default:
break;
#endif
#ifdef ACL_GET
{ ACL_GET, "ACL_GET" },
-#endif
+#endif
#ifdef ACL_SET
{ ACL_SET, "ACL_SET" },
-#endif
+#endif
#ifdef ACL_CNT
{ ACL_CNT, "ACL_CNT" },
-#endif
+#endif
{ 0, NULL },
};
struct xlat aclipc[] = {
#ifdef IPC_SHM
{ IPC_SHM, "IPC_SHM" },
-#endif
+#endif
#ifdef IPC_SEM
{ IPC_SEM, "IPC_SEM" },
-#endif
+#endif
#ifdef IPC_MSG
{ IPC_MSG, "IPC_MSG" },
-#endif
+#endif
{ 0, NULL },
};
(unsigned long) ((tcp->u_arg[2] >> 18) & 0x3fff),
(unsigned long) (tcp->u_arg[2] & 0x3ffff));
else
-#endif
+#endif
tprintf(", makedev(%lu, %lu)",
(unsigned long) major(tcp->u_arg[2]),
(unsigned long) minor(tcp->u_arg[2]));
#ifdef SVR4
if (!abbrev(tcp)) {
tprintf("%s{d_ino=%lu, d_off=%lu, ",
- i ? " " : "", d->d_ino, d->d_off);
+ i ? " " : "",
+ (unsigned long) d->d_ino,
+ (unsigned long) d->d_off);
tprintf("d_reclen=%u, d_name=\"%s\"}",
d->d_reclen, d->d_name);
}
tprintf(", d_namlen=%u, d_name=\"%.*s\"}",
d->d_namlen, d->d_namlen, d->d_name);
}
-#endif /* FREEBSD */
+#endif /* FREEBSD */
if (!d->d_reclen) {
tprintf("/* d_reclen == 0, problem here */");
break;
#if defined(LINUX) || defined(SVR4)
if (!abbrev(tcp)) {
tprintf("%s{d_ino=%lu, d_off=%lu, ",
- i ? " " : "",
- (unsigned long)d->d_ino,
+ i ? " " : "",
+ (unsigned long)d->d_ino,
(unsigned long)d->d_off);
tprintf("d_reclen=%u, d_name=\"%s\"}",
d->d_reclen, d->d_name);
return 0;
}
#endif
-
+
#ifdef FREEBSD
int
sys_getdirentries(tcp)
}
#endif /* HAVE_SYS_ASYNCH_H */
+
+#ifdef XATTR_CREATE
+
+struct xlat xattrflags[] = {
+ { XATTR_CREATE, "XATTR_CREATE" },
+ { XATTR_REPLACE, "XATTR_REPLACE" },
+ { 0, NULL }
+};
+
+int
+sys_setxattr(tcp)
+struct tcb *tcp;
+{
+ if (entering(tcp)) {
+ printpath(tcp, tcp->u_arg[0]);
+ tprintf(", ");
+ printstr(tcp, tcp->u_arg[1], -1);
+ /* XXX Print value in format */
+ tprintf(", %p, %ld, ", (void *) tcp->u_arg[2], tcp->u_arg[3]);
+ printflags(xattrflags, tcp->u_arg[4]);
+ }
+ return 0;
+}
+
+int
+sys_fsetxattr(tcp)
+struct tcb *tcp;
+{
+ if (entering(tcp)) {
+ tprintf("%ld, ", tcp->u_arg[0]);
+ printstr(tcp, tcp->u_arg[1], -1);
+ /* XXX Print value in format */
+ tprintf(", %p, %ld, ", (void *) tcp->u_arg[2], tcp->u_arg[3]);
+ printflags(xattrflags, tcp->u_arg[4]);
+ }
+ return 0;
+}
+
+int
+sys_getxattr(tcp)
+struct tcb *tcp;
+{
+ if (entering(tcp)) {
+ printpath(tcp, tcp->u_arg[0]);
+ tprintf(", ");
+ printstr(tcp, tcp->u_arg[1], -1);
+ } else {
+ /* XXX Print value in format */
+ tprintf(", %p, %ld", (void *) tcp->u_arg[2], tcp->u_arg[3]);
+ }
+ return 0;
+}
+
+int
+sys_fgetxattr(tcp)
+struct tcb *tcp;
+{
+ if (entering(tcp)) {
+ tprintf("%ld, ", tcp->u_arg[0]);
+ printstr(tcp, tcp->u_arg[1], -1);
+ } else {
+ /* XXX Print value in format */
+ tprintf(", %p, %ld", (void *) tcp->u_arg[2], tcp->u_arg[3]);
+ }
+ return 0;
+}
+
+int
+sys_listxattr(tcp)
+struct tcb *tcp;
+{
+ if (entering(tcp)) {
+ printpath(tcp, tcp->u_arg[0]);
+ } else {
+ /* XXX Print value in format */
+ tprintf(", %p, %lu", (void *) tcp->u_arg[1], tcp->u_arg[2]);
+ }
+ return 0;
+}
+
+int
+sys_flistxattr(tcp)
+struct tcb *tcp;
+{
+ if (entering(tcp)) {
+ tprintf("%ld", tcp->u_arg[0]);
+ } else {
+ /* XXX Print value in format */
+ tprintf(", %p, %lu", (void *) tcp->u_arg[1], tcp->u_arg[2]);
+ }
+ return 0;
+}
+
+int
+sys_removexattr(tcp)
+struct tcb *tcp;
+{
+ if (entering(tcp)) {
+ printpath(tcp, tcp->u_arg[0]);
+ tprintf(", ");
+ printstr(tcp, tcp->u_arg[1], -1);
+ }
+ return 0;
+}
+
+int
+sys_fremovexattr(tcp)
+struct tcb *tcp;
+{
+ if (entering(tcp)) {
+ tprintf("%ld, ", tcp->u_arg[0]);
+ printstr(tcp, tcp->u_arg[1], -1);
+ }
+ return 0;
+}
+
+#endif