Source-Changes-HG archive

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

[src/trunk]: src Remove an old, no longer necessary hack from libquota and ha...



details:   https://anonhg.NetBSD.org/src/rev/6d0c26b3e0fd
branches:  trunk
changeset: 773263:6d0c26b3e0fd
user:      dholland <dholland%NetBSD.org@localhost>
date:      Mon Jan 30 06:00:49 2012 +0000

description:
Remove an old, no longer necessary hack from libquota and handle the
relevant case properly in usr.bin/quota.

diffstat:

 lib/libquota/quota_proplib.c |  23 ++++++++++++-----------
 usr.bin/quota/quota.c        |   6 +++---
 2 files changed, 15 insertions(+), 14 deletions(-)

diffs (85 lines):

diff -r 582f0c34e029 -r 6d0c26b3e0fd lib/libquota/quota_proplib.c
--- a/lib/libquota/quota_proplib.c      Mon Jan 30 05:42:54 2012 +0000
+++ b/lib/libquota/quota_proplib.c      Mon Jan 30 06:00:49 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: quota_proplib.c,v 1.7 2012/01/25 01:22:56 dholland Exp $       */
+/*     $NetBSD: quota_proplib.c,v 1.8 2012/01/30 06:00:49 dholland Exp $       */
 /*-
   * Copyright (c) 2011 Manuel Bouyer
   * All rights reserved.
@@ -26,7 +26,7 @@
   */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: quota_proplib.c,v 1.7 2012/01/25 01:22:56 dholland Exp $");
+__RCSID("$NetBSD: quota_proplib.c,v 1.8 2012/01/30 06:00:49 dholland Exp $");
 
 #include <stdlib.h>
 #include <string.h>
@@ -367,6 +367,11 @@
        /* as far as I can tell this is required here - dholland */
        prop_object_release(cmds);
 
+#if 0
+       printf("message to kernel:\n%s\n",
+              prop_dictionary_externalize(dict));
+#endif
+
        /*
         * Convert it to an XML turd for transfer.
         */
@@ -419,6 +424,11 @@
                return -1;
        }
 
+#if 0
+       printf("reply from kernel:\n%s\n",
+              prop_dictionary_externalize(dict));
+#endif
+
        /*
         * Now unpack the response.
         */
@@ -458,15 +468,6 @@
                return -1;
        }
 
-       if (error8 == ENODEV) {
-               /* XXX this currently means quotas are not enabled */
-               /* XXX but there's currently no way to fail in quota_open */
-               /* XXX in that case */
-               quotaval_clear(qv);
-               prop_object_release(dict);
-               return 0;
-       }
-               
        if (error8) {
                /* this means the RPC action failed */
                prop_object_release(dict);
diff -r 582f0c34e029 -r 6d0c26b3e0fd usr.bin/quota/quota.c
--- a/usr.bin/quota/quota.c     Mon Jan 30 05:42:54 2012 +0000
+++ b/usr.bin/quota/quota.c     Mon Jan 30 06:00:49 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: quota.c,v 1.44 2012/01/09 15:35:44 dholland Exp $      */
+/*     $NetBSD: quota.c,v 1.45 2012/01/30 06:00:49 dholland Exp $      */
 
 /*
  * Copyright (c) 1980, 1990, 1993
@@ -42,7 +42,7 @@
 #if 0
 static char sccsid[] = "@(#)quota.c    8.4 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: quota.c,v 1.44 2012/01/09 15:35:44 dholland Exp $");
+__RCSID("$NetBSD: quota.c,v 1.45 2012/01/30 06:00:49 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -546,7 +546,7 @@
                for (j=0; j<qup->numqvs; j++) {
                        qk.qk_objtype = j;
                        if (quota_get(qup->qh, &qk, &qup->qvs[j]) < 0) {
-                               if (errno != ENOENT) {
+                               if (errno != ENOENT && errno != ENODEV) {
                                        warn("%s: quota_get (objtype %u)",
                                             fst[i].f_mntonname, j);
                                }



Home | Main Index | Thread Index | Old Index