Module Name:    src
Committed By:   bouyer
Date:           Wed Mar  9 18:45:31 UTC 2011

Modified Files:
        src/lib/librumphijack: hijack.c

Log Message:
Add quotactl(2)


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/lib/librumphijack/hijack.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librumphijack/hijack.c
diff -u src/lib/librumphijack/hijack.c:1.79 src/lib/librumphijack/hijack.c:1.80
--- src/lib/librumphijack/hijack.c:1.79	Wed Mar  9 18:06:22 2011
+++ src/lib/librumphijack/hijack.c	Wed Mar  9 18:45:30 2011
@@ -1,4 +1,4 @@
-/*      $NetBSD: hijack.c,v 1.79 2011/03/09 18:06:22 bouyer Exp $	*/
+/*      $NetBSD: hijack.c,v 1.80 2011/03/09 18:45:30 bouyer Exp $	*/
 
 /*-
  * Copyright (c) 2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: hijack.c,v 1.79 2011/03/09 18:06:22 bouyer Exp $");
+__RCSID("$NetBSD: hijack.c,v 1.80 2011/03/09 18:45:30 bouyer Exp $");
 
 #define __ssp_weak_name(fun) _hijack_ ## fun
 
@@ -58,6 +58,7 @@
 #include <string.h>
 #include <time.h>
 #include <unistd.h>
+#include <sys/quota.h>
 
 #include "hijack.h"
 
@@ -97,6 +98,7 @@
 	DUALCALL___SYSCTL,
 	DUALCALL_GETVFSSTAT, DUALCALL_NFSSVC,
 	DUALCALL_GETFH, DUALCALL_FHOPEN, DUALCALL_FHSTAT, DUALCALL_FHSTATVFS1,
+	DUALCALL_QUOTACTL,
 	DUALCALL__NUM
 };
 
@@ -140,6 +142,7 @@
 #define REALGETFH __getfh30
 #define REALFHOPEN __fhopen40
 #define REALFHSTATVFS1 __fhstatvfs140
+#define REALQUOTACTL __quotactl50
 
 int REALSELECT(int, fd_set *, fd_set *, fd_set *, struct timeval *);
 int REALPOLLTS(struct pollfd *, nfds_t,
@@ -163,6 +166,7 @@
 int REALFHOPEN(const void *, size_t, int);
 int REALFHSTAT(const void *, size_t, struct stat *);
 int REALFHSTATVFS1(const void *, size_t, struct statvfs *, int);
+int REALQUOTACTL(const char *, struct plistref *);
 
 #define S(a) __STRING(a)
 struct sysnames {
@@ -242,6 +246,7 @@
 	{ DUALCALL_FHOPEN,	S(REALFHOPEN),RSYS_NAME(FHOPEN)	},
 	{ DUALCALL_FHSTAT,	S(REALFHSTAT),RSYS_NAME(FHSTAT)	},
 	{ DUALCALL_FHSTATVFS1,	S(REALFHSTATVFS1),RSYS_NAME(FHSTATVFS1)	},
+	{ DUALCALL_QUOTACTL,	S(REALQUOTACTL),RSYS_NAME(QUOTACTL)	},
 };
 #undef S
 
@@ -2161,6 +2166,11 @@
 	(const char *, int),						\
 	(path, flags))
 
+PATHCALL(int, REALQUOTACTL, DUALCALL_QUOTACTL,				\
+	(const char *path, struct plistref *p),				\
+	(const char *, struct plistref *),				\
+	(path, p))
+
 /*
  * These act different on a per-process vfs configuration
  */

Reply via email to