README-linux: updated to note that strace might not compile
with development kernels
bjm.c: sys_query_module: check if malloc succeeds
system.c: sys_cap[gs]et(): check if malloc succeeds, only malloc once
linux/syscallent.h: updated for 2.3.99pre3
linux/alpha/syscallent.h: updated for 2.3.99pre3, add all osf syscalls
even though Linux doesn't implement them
syscall.c: add global variables for MIPS registers as well
syscall.c: move global variables to before get_scno since that uses them
util.c: oops, misspelled defined
process.c: fix ptrace calls in change_syscall
mem.c: decode sys_madvise
Merge patch from Topi Miettinen <Topi.Miettinen@nic.fi>
+ add support for quotactl, fdatasync, mlock, mlockall, munlockall & acct
+ small fix for RLIMIT_* and RUSAGE_BOTH
+ enhace support for capget and capset
diff --git a/resource.c b/resource.c
index ea741b8..74222f4 100644
--- a/resource.c
+++ b/resource.c
@@ -36,6 +36,7 @@
 #ifdef LINUX
 #include <sys/times.h>
 #include <linux/kernel.h>
+#include <sys/quota.h>
 #endif /* LINUX */
 #ifdef SUNOS4
 #include <ufs/quota.h>
@@ -64,9 +65,15 @@
 #ifdef RLIMIT_RSS
 	{ RLIMIT_RSS,	"RLIMIT_RSS"	},
 #endif
+#ifdef RLIMIT_NPROC
+	{ RLIMIT_NPROC,"RLIMIT_NPROC"	},
+#endif
 #ifdef RLIMIT_NOFILE
 	{ RLIMIT_NOFILE,"RLIMIT_NOFILE"	},
 #endif
+#ifdef RLIMIT_MEMLOCK
+	{ RLIMIT_MEMLOCK,	"RLIMIT_MEMLOCK"	},
+#endif
 #ifdef RLIMIT_VMEM
 	{ RLIMIT_VMEM,	"RLIMIT_VMEM"	},
 #endif
@@ -140,6 +147,9 @@
 static struct xlat usagewho[] = {
 	{ RUSAGE_SELF,		"RUSAGE_SELF"		},
 	{ RUSAGE_CHILDREN,	"RUSAGE_CHILDREN"	},
+#ifdef RUSAGE_BOTH
+	{ RUSAGE_BOTH,		"RUSAGE_BOTH"		},
+#endif
 	{ 0,			NULL			},
 };
 
@@ -367,6 +377,68 @@
 
 #endif /* !SUNOS4 */
 
+#ifdef LINUX
+
+static struct xlat quotacmds[] = {
+	{ Q_QUOTAON,	"Q_QUOTAON"	},
+	{ Q_QUOTAOFF,	"Q_QUOTAOFF"	},
+	{ Q_GETQUOTA,	"Q_GETQUOTA"	},
+	{ Q_SETQUOTA,	"Q_SETQUOTA"	},
+	{ Q_SETUSE,	"Q_SETUSE"	},
+	{ Q_SYNC,	"Q_SYNC"	},
+	{ Q_SETQLIM,	"Q_SETQLIM"	},
+	{ Q_GETSTATS,	"Q_GETSTATS"	},
+	{ Q_RSQUASH,	"Q_RSQUASH"	},
+	{ 0,		NULL		},
+};
+
+static struct xlat quotatypes[] = {
+	{ USRQUOTA,	"USRQUOTA"	},
+	{ GRPQUOTA,	"GRPQUOTA"	},
+	{ 0,		NULL		},
+};
+
+int
+sys_quotactl(tcp)
+struct tcb *tcp;
+{
+	if (entering(tcp)) {
+		printxval(quotacmds, tcp->u_arg[0] >> SUBCMDSHIFT, "Q_???");
+		tprintf("|");
+		printxval(quotatypes, tcp->u_arg[0] & SUBCMDMASK, "???QUOTA");
+		tprintf(", ");
+		printstr(tcp, tcp->u_arg[1], -1);
+		tprintf(", %lu, ", tcp->u_arg[2]);
+	}
+	else {
+		struct dqblk dq;
+
+		if (!tcp->u_arg[3])
+			tprintf("NULL");
+		else if (!verbose(tcp))
+			tprintf("%#lx", tcp->u_arg[3]);
+                else if (umoven(tcp, tcp->u_arg[3], sizeof(struct dqblk),   
+                    (char *) &dq) < 0)
+                        tprintf("???");
+		else {
+                        tprintf("{");
+			tprintf("%u, ", dq.dqb_bhardlimit);
+			tprintf("%u, ", dq.dqb_bsoftlimit);
+			tprintf("%u, ", dq.dqb_curblocks);
+			tprintf("%u, ", dq.dqb_ihardlimit);
+			tprintf("%u, ", dq.dqb_isoftlimit);
+			tprintf("%u, ", dq.dqb_curinodes);
+			tprintf("%lu, ", dq.dqb_btime);
+			tprintf("%lu", dq.dqb_itime);
+                        tprintf("}");
+		}
+
+	}
+	return 0;
+}
+
+#endif /* Linux */
+
 #ifdef SUNOS4
 
 static struct xlat quotacmds[] = {