summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2011-03-08 23:36:47 +0100
committerJan Kara <jack@suse.cz>2011-03-08 23:36:47 +0100
commit8d4c4a761c27a81d96ae8c49e1b8d32d66b6751e (patch)
tree5118f781f8c96ef04668254fbe4f778d5351c404
parentbd1787ac65408a7ae35e676de550046e4b49ed02 (diff)
downloadlinuxquota-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.82
-rw-r--r--setquota.84
-rw-r--r--setquota.c11
3 files changed, 11 insertions, 6 deletions
diff --git a/edquota.8 b/edquota.8
index 4b1406b..2ef4cb6 100644
--- a/edquota.8
+++ b/edquota.8
@@ -38,6 +38,8 @@ edquota \- edit user quotas
.BR \-u \ |
.B \-g
] [
+.B \-rm
+] [
.B \-F
.I format-name
] [
diff --git a/setquota.8 b/setquota.8
index e3ac7e0..6c3dc88 100644
--- a/setquota.8
+++ b/setquota.8
@@ -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
|
diff --git a/setquota.c b/setquota.c
index 5d2734b..d1cffcb 100644
--- a/setquota.c
+++ b/setquota.c
@@ -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 */