From 2e419963c2303124e3ac398bc3caaf68bb01edfd Mon Sep 17 00:00:00 2001 From: johann Date: Wed, 2 Jan 2008 09:16:52 +0000 Subject: [PATCH] Branch b1_6 b=14036 i=johann i=tianzy attachment 14460 / fix error messages. --- lustre/utils/lfs.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lustre/utils/lfs.c b/lustre/utils/lfs.c index 8bb138e..a714ab7 100644 --- a/lustre/utils/lfs.c +++ b/lustre/utils/lfs.c @@ -1249,6 +1249,11 @@ static int lfs_quotaoff(int argc, char **argv) mnt = argv[optind]; rc = llapi_quotactl(mnt, &qctl); + if (rc == -1 && errno == ESRCH) { + fprintf(stderr, "\n%s quotas are not enabled.\n", + qctl.qc_type == 0x00 ? "user" : "group"); + return 0; + } if (rc) { if (*obd_type) fprintf(stderr, "%s %s ", obd_type, @@ -1820,6 +1825,11 @@ static int lfs_quota(int argc, char **argv) mnt = argv[optind]; rc1 = llapi_quotactl(mnt, &qctl); + if (rc1 == -1 && errno == ESRCH) { + fprintf(stderr, "\n%s quotas are not enabled.\n", + qctl.qc_type == 0x00 ? "user" : "group"); + return 0; + } if (rc1 && *obd_type) fprintf(stderr, "%s %s ", obd_type, obd_uuid); -- 1.8.3.1