summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2005-08-03 12:02:06 +0000
committerRoland McGrath <roland@redhat.com>2005-08-03 12:02:06 +0000
commite806ac29eef0c848b54532ac4c5a9d8e2e2c4208 (patch)
tree9f009fe09e15e9b2342c04df6ef6d4ed7b76fcd9
parent0c26d34b782b075c237db96ed3376a3defd7827e (diff)
downloadstrace-e806ac29eef0c848b54532ac4c5a9d8e2e2c4208.tar.gz
2005-08-03 Roland McGrath <roland@redhat.com>
* resource.c [LINUX] (OLD_CMD): New macro. (quotacmds): Use it to hard-wire old O_* values, don't use macros.
-rw-r--r--resource.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/resource.c b/resource.c
index b4b34dc2b..e346eaec6 100644
--- a/resource.c
+++ b/resource.c
@@ -464,6 +464,7 @@ struct tcb *tcp;
#ifdef LINUX
+#define OLD_CMD(c) ((c)<<8)
#define NEW_CMD(c) ((0x80<<16)+(c))
#define XQM_CMD(c) (('X'<<8)+(c))
#define NEW_COMMAND(c) (( ((c) >> SUBCMDSHIFT) & (0x80 << 16)))
@@ -471,15 +472,15 @@ struct tcb *tcp;
#define OLD_COMMAND(c) (!NEW_COMMAND(c) && !XQM_COMMAND(c))
static const 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" },
+ { OLD_CMD(0x1), "Q_QUOTAON" },
+ { OLD_CMD(0x2), "Q_QUOTAOFF" },
+ { OLD_CMD(0x3), "Q_GETQUOTA" },
+ { OLD_CMD(0x4), "Q_SETQUOTA" },
+ { OLD_CMD(0x5), "Q_SETUSE" },
+ { OLD_CMD(0x6), "Q_SYNC" },
+ { OLD_CMD(0x7), "Q_SETQLIM" },
+ { OLD_CMD(0x8), "Q_GETSTATS" },
+ { OLD_CMD(0x10),"Q_RSQUASH" },
{ NEW_CMD(0x1), "Q_SYNC" },
{ NEW_CMD(0x2), "Q_QUOTAON" },
{ NEW_CMD(0x3), "Q_QUOTAOFF" },