From: anserper Date: Wed, 29 Jul 2009 08:53:36 +0000 (+0000) Subject: b=16890 X-Git-Tag: v1_8_2_01~1^2~205 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=86f9bfcfdcd87535604df829c80cc91ec2f8ad49;p=fs%2Flustre-release.git b=16890 i=Johann Lombardi i=ZhiYong Tian tiny cleanup of the quota related commands output --- diff --git a/lustre/utils/lfs.c b/lustre/utils/lfs.c index e17e199..e4d5130b 100644 --- a/lustre/utils/lfs.c +++ b/lustre/utils/lfs.c @@ -1397,7 +1397,12 @@ static int lfs_quotaon(int argc, char **argv) if (*obd_type) fprintf(stderr, "%s %s ", obd_type, obd_uuid2str(&qctl.obd_uuid)); - fprintf(stderr, "%s failed: %s\n", argv[0], strerror(errno)); + if (errno == ENOENT) + fprintf(stderr, "error: cannot find quota database, " + "make sure you have run quotacheck\n"); + else + fprintf(stderr, "error: quotaon failed (%s)\n", + strerror(errno)); return rc; } @@ -1809,7 +1814,7 @@ int lfs_setquota(int argc, char **argv) } if (qctl.qc_type == UGQUOTA) { - fprintf(stderr, "error: neither -u nor -g are specified\n"); + fprintf(stderr, "error: neither -u nor -g was specified\n"); return CMD_HELP; } @@ -1834,8 +1839,10 @@ int lfs_setquota(int argc, char **argv) rc = llapi_quotactl(mnt, &tmp_qctl); if (rc < 0) { - fprintf(stderr, "error: getquota failed\n"); - return CMD_HELP; + fprintf(stderr, "error: setquota failed while retrieving" + " current quota settings (%s)\n", + strerror(errno)); + return rc; } if (!(limit_mask & BHLIMIT))