diff options
author | Jan Kara <jack@suse.cz> | 2011-03-08 23:36:47 +0100 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2011-03-08 23:36:47 +0100 |
commit | 8d4c4a761c27a81d96ae8c49e1b8d32d66b6751e (patch) | |
tree | 5118f781f8c96ef04668254fbe4f778d5351c404 | |
parent | bd1787ac65408a7ae35e676de550046e4b49ed02 (diff) | |
download | linuxquota-8d4c4a761c27a81d96ae8c49e1b8d32d66b6751e.tar.gz |
Fix synopsis and properly report errors during remote grace period setting
Signed-off-by: Jan Kara <jack@suse.cz>
-rw-r--r-- | edquota.8 | 2 | ||||
-rw-r--r-- | setquota.8 | 4 | ||||
-rw-r--r-- | setquota.c | 11 |
3 files changed, 11 insertions, 6 deletions
@@ -38,6 +38,8 @@ edquota \- edit user quotas .BR \-u \ | .B \-g ] [ +.B \-rm +] [ .B \-F .I format-name ] [ @@ -67,8 +67,6 @@ setquota \- set disk quotas .B setquota .B \-t [ -.B \-m -] [ .B \-u | .B \-g @@ -86,7 +84,7 @@ setquota \- set disk quotas .B setquota .B \-T [ -.B \-m +.B \-rm ] [ .B \-u | @@ -58,7 +58,7 @@ static void usage(void) setquota [-u|-g] %1$s[-F quotaformat] <-p protouser|protogroup> <user|group> -a|<filesystem>...\n\ setquota [-u|-g] %1$s[-F quotaformat] -b [-c] -a|<filesystem>...\n\ setquota [-u|-g] [-F quotaformat] -t <blockgrace> <inodegrace> -a|<filesystem>...\n\ - setquota [-u|-g] [-F quotaformat] <user|group> -T <blockgrace> <inodegrace> -a|<filesystem>...\n\n\ + setquota [-u|-g] %1$s[-F quotaformat] <user|group> -T <blockgrace> <inodegrace> -a|<filesystem>...\n\n\ -u, --user set limits for user\n\ -g, --group set limits for group\n\ -a, --all set limits for all filesystems\n\ @@ -372,14 +372,19 @@ static int batch_setlimits(struct quota_handle **handles) /* Set grace times */ static int setgraces(struct quota_handle **handles) { - int i; + int i, ret = 0; for (i = 0; handles[i]; i++) { + if (handles[i]->qh_ops->write_info) { + errstr(_("Setting grace period on %s is not supported.\n"), handles[i]->qh_quotadev); + ret = -1; + continue; + } handles[i]->qh_info.dqi_bgrace = toset.dqb_btime; handles[i]->qh_info.dqi_igrace = toset.dqb_itime; mark_quotafile_info_dirty(handles[i]); } - return 0; + return ret; } /* Set grace times for individual user */ |