Module Name: src Committed By: dholland Date: Mon Jan 30 06:00:49 UTC 2012
Modified Files: src/lib/libquota: quota_proplib.c src/usr.bin/quota: quota.c Log Message: Remove an old, no longer necessary hack from libquota and handle the relevant case properly in usr.bin/quota. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/lib/libquota/quota_proplib.c cvs rdiff -u -r1.44 -r1.45 src/usr.bin/quota/quota.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/libquota/quota_proplib.c diff -u src/lib/libquota/quota_proplib.c:1.7 src/lib/libquota/quota_proplib.c:1.8 --- src/lib/libquota/quota_proplib.c:1.7 Wed Jan 25 01:22:56 2012 +++ src/lib/libquota/quota_proplib.c Mon Jan 30 06:00:49 2012 @@ -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 @@ __quota_proplib_get(struct quotahandle * /* 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 @@ __quota_proplib_get(struct quotahandle * return -1; } +#if 0 + printf("reply from kernel:\n%s\n", + prop_dictionary_externalize(dict)); +#endif + /* * Now unpack the response. */ @@ -458,15 +468,6 @@ __quota_proplib_get(struct quotahandle * 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); Index: src/usr.bin/quota/quota.c diff -u src/usr.bin/quota/quota.c:1.44 src/usr.bin/quota/quota.c:1.45 --- src/usr.bin/quota/quota.c:1.44 Mon Jan 9 15:35:44 2012 +++ src/usr.bin/quota/quota.c Mon Jan 30 06:00:49 2012 @@ -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 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19 #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 @@ getprivs(id_t id, int idtype) 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); }