Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libquota If a rpc for quota values fails with ENOTCONN t...
details: https://anonhg.NetBSD.org/src/rev/a7dc4a5a14cb
branches: trunk
changeset: 796471:a7dc4a5a14cb
user: martin <martin%NetBSD.org@localhost>
date: Thu Jun 05 13:14:23 2014 +0000
description:
If a rpc for quota values fails with ENOTCONN translate this to ENOENT - we
certainly don't have any quotas if they are disabled on the file server.
This silences warnings from things like "quota -u -v" when NFS mounts
are present and no quotas are in use on the file server.
diffstat:
lib/libquota/quota_nfs.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (29 lines):
diff -r c25dff5a530a -r a7dc4a5a14cb lib/libquota/quota_nfs.c
--- a/lib/libquota/quota_nfs.c Thu Jun 05 10:45:39 2014 +0000
+++ b/lib/libquota/quota_nfs.c Thu Jun 05 13:14:23 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: quota_nfs.c,v 1.2 2012/01/30 06:39:26 dholland Exp $ */
+/* $NetBSD: quota_nfs.c,v 1.3 2014/06/05 13:14:23 martin Exp $ */
/*-
* Copyright (c) 2011 Manuel Bouyer
* All rights reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: quota_nfs.c,v 1.2 2012/01/30 06:39:26 dholland Exp $");
+__RCSID("$NetBSD: quota_nfs.c,v 1.3 2014/06/05 13:14:23 martin Exp $");
#include <sys/types.h>
#include <sys/param.h> /* XXX for DEV_BSIZE */
@@ -191,7 +191,9 @@
free(host);
if (ret != RPC_SUCCESS) {
- errno = sverrno;
+ /* if the file server does not support any quotas at all,
+ return ENOENT */
+ errno = sverrno == ENOTCONN ? ENOENT : sverrno;
return -1;
}
Home |
Main Index |
Thread Index |
Old Index