Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/librumphijack Add quotactl(2)



details:   https://anonhg.NetBSD.org/src/rev/95ddf4060e95
branches:  trunk
changeset: 763066:95ddf4060e95
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Wed Mar 09 18:45:30 2011 +0000

description:
Add quotactl(2)

diffstat:

 lib/librumphijack/hijack.c |  14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diffs (70 lines):

diff -r 3a36953ab666 -r 95ddf4060e95 lib/librumphijack/hijack.c
--- a/lib/librumphijack/hijack.c        Wed Mar 09 18:15:39 2011 +0000
+++ b/lib/librumphijack/hijack.c        Wed Mar 09 18:45:30 2011 +0000
@@ -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
  */



Home | Main Index | Thread Index | Old Index