Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/edquota Rely on libquota for fallback to direct acc...



details:   https://anonhg.NetBSD.org/src/rev/f8da858c6f26
branches:  trunk
changeset: 773303:f8da858c6f26
user:      dholland <dholland%NetBSD.org@localhost>
date:      Mon Jan 30 19:18:36 2012 +0000

description:
Rely on libquota for fallback to direct access of old-style quota files.

Keep the code around in #if 0 blocks for now, just in case some of the
logic might turn out to be wanted in libquota.

diffstat:

 usr.sbin/edquota/edquota.c |  14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diffs (85 lines):

diff -r 7ffac83bcbc2 -r f8da858c6f26 usr.sbin/edquota/edquota.c
--- a/usr.sbin/edquota/edquota.c        Mon Jan 30 19:17:29 2012 +0000
+++ b/usr.sbin/edquota/edquota.c        Mon Jan 30 19:18:36 2012 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: edquota.c,v 1.44 2012/01/30 19:16:36 dholland Exp $ */
+/*      $NetBSD: edquota.c,v 1.45 2012/01/30 19:18:36 dholland Exp $ */
 /*
  * Copyright (c) 1980, 1990, 1993
  *     The Regents of the University of California.  All rights reserved.
@@ -41,7 +41,7 @@
 #if 0
 static char sccsid[] = "from: @(#)edquota.c    8.3 (Berkeley) 4/27/95";
 #else
-__RCSID("$NetBSD: edquota.c,v 1.44 2012/01/30 19:16:36 dholland Exp $");
+__RCSID("$NetBSD: edquota.c,v 1.45 2012/01/30 19:18:36 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -80,7 +80,9 @@
 
 #include "pathnames.h"
 
+#if 0
 static const char *quotagroup = QUOTAGROUP;
+#endif
 
 #define MAX_TMPSTR     (100+MAXPATHLEN)
 
@@ -218,11 +220,13 @@
        free(qlist);
 }
 
+#if 0
 static bool
 quotalist_empty(struct quotalist *qlist)
 {
        return qlist->head == NULL;
 }
+#endif
 
 static void
 quotalist_append(struct quotalist *qlist, struct quotause *qup)
@@ -241,6 +245,7 @@
 ////////////////////////////////////////////////////////////
 // ffs quota v1
 
+#if 0
 static void
 putprivs1(uint32_t id, int idtype, struct quotause *qup)
 {
@@ -332,6 +337,7 @@
                           &qup->qv[QUOTA_LIMIT_FILE]);
        return qup;
 }
+#endif
 
 ////////////////////////////////////////////////////////////
 // ffs quota v2
@@ -487,6 +493,7 @@
                quotalist_append(qlist, qup);
        }
 
+#if 0
        if (filesys && quotalist_empty(qlist)) {
                if (defaultq)
                        errx(1, "no default quota for version 1");
@@ -500,6 +507,7 @@
                }
                quotalist_append(qlist, qup);
        }
+#endif
        return qlist;
 }
 
@@ -514,8 +522,10 @@
         for (qup = qlist->head; qup; qup = qup->next) {
                if (qup->qfname == NULL)
                        putprivs2(id, idtype, qup);
+#if 0
                else
                        putprivs1(id, idtype, qup);
+#endif
        }
 }
 



Home | Main Index | Thread Index | Old Index