summaryrefslogtreecommitdiff
path: root/resource.c
diff options
context:
space:
mode:
authorWichert Akkerman <wichert@deephackmode.org>2000-09-01 21:03:06 +0000
committerWichert Akkerman <wichert@deephackmode.org>2000-09-01 21:03:06 +0000
commitbf79f2e16b090ffe59cd1e1820935680a2da7b78 (patch)
tree7cca3bc2da9b0505a7f7bd2e3f68fd569389e94d /resource.c
parentd077c451cd94c49ca508e1082a85cd042c0e7398 (diff)
downloadstrace-bf79f2e16b090ffe59cd1e1820935680a2da7b78.tar.gz
strace-bf79f2e16b090ffe59cd1e1820935680a2da7b78.tar.bz2
strace-bf79f2e16b090ffe59cd1e1820935680a2da7b78.tar.xz
Add FreeBSD support
Diffstat (limited to 'resource.c')
-rw-r--r--resource.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/resource.c b/resource.c
index 74222f4..be776ce 100644
--- a/resource.c
+++ b/resource.c
@@ -41,7 +41,7 @@
#ifdef SUNOS4
#include <ufs/quota.h>
#endif /* SUNOS4 */
-#ifdef SVR4
+#if defined(SVR4) || defined(FREEBSD)
#include <sys/times.h>
#include <sys/time.h>
#endif
@@ -439,14 +439,23 @@ struct tcb *tcp;
#endif /* Linux */
-#ifdef SUNOS4
+#if defined(SUNOS4) || defined(FREEBSD)
+
+#ifdef FREEBSD
+#include <ufs/ufs/quota.h>
+#endif
static struct xlat quotacmds[] = {
{ Q_QUOTAON, "Q_QUOTAON" },
{ Q_QUOTAOFF, "Q_QUOTAOFF" },
{ Q_GETQUOTA, "Q_GETQUOTA" },
{ Q_SETQUOTA, "Q_SETQUOTA" },
+#ifdef Q_SETQLIM
{ Q_SETQLIM, "Q_SETQLIM" },
+#endif
+#ifdef Q_SETUSE
+ { Q_SETUSE, "Q_SETUSE" },
+#endif
{ Q_SYNC, "Q_SYNC" },
{ 0, NULL },
};
@@ -457,12 +466,19 @@ struct tcb *tcp;
{
/* fourth arg (addr) not interpreted here */
if (entering(tcp)) {
+#ifdef SUNOS4
printxval(quotacmds, tcp->u_arg[0], "Q_???");
tprintf(", ");
printstr(tcp, tcp->u_arg[1], -1);
+#endif
+#ifdef FREEBSD
+ printpath(tcp, tcp->u_arg[0]);
+ tprintf(", ");
+ printxval(quotacmds, tcp->u_arg[1], "Q_???");
+#endif
tprintf(", %lu, %#lx", tcp->u_arg[2], tcp->u_arg[3]);
}
return 0;
}
-#endif /* SUNOS4 */
+#endif /* SUNOS4 || FREEBSD */