summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjkar8572 <jkar8572>2007-09-18 16:21:07 +0000
committerjkar8572 <jkar8572>2007-09-18 16:21:07 +0000
commit7b7ea451bf6d780d63318a1e7e756c05553bbe83 (patch)
tree0fd72cf2ac9a60e0e60810bc73d80a4141b3c932
parentf4e0799803c2ac5aa10d2589c033e93801b903b9 (diff)
Updated manpages to explain --no-mixed-paths (Jan Kara)
Changed the defaults so that tools now use NFSv4 pathnames without leading / by default (Jan Kara)
-rw-r--r--edquota.812
-rw-r--r--edquota.c12
-rw-r--r--quota.125
-rw-r--r--quota.c12
-rw-r--r--setquota.820
-rw-r--r--setquota.c12
6 files changed, 65 insertions, 28 deletions
diff --git a/edquota.8 b/edquota.8
index 320c00a..061bb32 100644
--- a/edquota.8
+++ b/edquota.8
@@ -10,7 +10,7 @@ edquota \- edit user quotas
.BR \-u \ |
.B \-g
] [
-.B \-r
+.B \-rm
] [
.B \-F
.I format-name
@@ -95,6 +95,16 @@ The
.B -n
option is equivalent, and is maintained for backward compatibility.
.TP
+.B -m, --no-mixed-pathnames
+Currently, pathnames of NFSv4 mountpoints are sent without leading slash in the path.
+.BR rpc.rquotad
+uses this to recognize NFSv4 mounts and properly prepend pseudoroot of NFS filesystem
+to the path. If you specify this option,
+.BR setquota
+will always send paths with a trailing slash. This can be useful for legacy reasons but
+be aware that quota over RPC will stop working if you are using new
+.BR rpc.rquotad .
+.TP
.B -u, --user
Edit the user quota. This is the default.
.TP
diff --git a/edquota.c b/edquota.c
index cebdb62..ea1a21e 100644
--- a/edquota.c
+++ b/edquota.c
@@ -34,7 +34,7 @@
#ident "$Copyright: (c) 1980, 1990 Regents of the University of California. $"
#ident "$Copyright: All rights reserved. $"
-#ident "$Id: edquota.c,v 1.21 2007/08/23 19:58:14 jkar8572 Exp $"
+#ident "$Id: edquota.c,v 1.22 2007/09/18 16:21:07 jkar8572 Exp $"
/*
* Disk quota editor.
@@ -64,7 +64,7 @@
#define FL_EDIT_TIMES 2
#define FL_REMOTE 4
#define FL_NUMNAMES 8
-#define FL_MIXED_PATHS 16
+#define FL_NO_MIXED_PATHS 16
char *progname;
@@ -89,7 +89,7 @@ void usage(void)
-g, --group edit group data\n"), stderr);
#if defined(RPC_SETQUOTA)
fputs(_("-r, --remote edit remote quota (via RPC)\n\
--m, --mixed-pathnames trim leading slashes from NFSv4 mountpoints\n"), stderr);
+-m, --no-mixed-pathnames trim leading slashes from NFSv4 mountpoints\n"), stderr);
#endif
fputs(_("-F, --format=formatname edit quotas of a specific format\n\
-p, --prototype=name copy data from a prototype user/group\n\
@@ -117,7 +117,7 @@ int parse_options(int argc, char **argv)
{ "filesystem", 1, NULL, 'f' },
#if defined(RPC_SETQUOTA)
{ "remote", 0, NULL, 'r' },
- { "mixed-pathnames", 0, NULL, 'm' },
+ { "no-mixed-pathnames", 0, NULL, 'm' },
#endif
{ "always-resolve", 0, NULL, 256 },
{ "edit-period", 0, NULL, 't' },
@@ -147,7 +147,7 @@ int parse_options(int argc, char **argv)
flags |= FL_REMOTE;
break;
case 'm':
- flags |= FL_MIXED_PATHS;
+ flags |= FL_NO_MIXED_PATHS;
break;
#endif
case 'u':
@@ -240,7 +240,7 @@ int main(int argc, char **argv)
init_kernel_interface();
handles = create_handle_list(dirname ? 1 : 0, dirname ? &dirname : NULL, quotatype, fmt,
- (flags & FL_MIXED_PATHS) ? IOI_NFS_MIXED_PATHS : 0,
+ (flags & FL_NO_MIXED_PATHS) ? 0 : IOI_NFS_MIXED_PATHS,
(flags & FL_REMOTE) ? 0 : MS_LOCALONLY);
if (!handles[0]) {
dispose_handle_list(handles);
diff --git a/quota.1 b/quota.1
index 668212f..87642fa 100644
--- a/quota.1
+++ b/quota.1
@@ -11,7 +11,7 @@ quota \- display disk usage and limits
] [
.BR -l \ |
[
-.BR -Q \ |\ -A
+.BR -QAm
]]
.br
.B quota
@@ -23,7 +23,7 @@ quota \- display disk usage and limits
] [
.BR -l \ |
[
-.BR -Q \ |\ -A
+.BR -QAm
]]
.B -u
.IR user ...
@@ -37,7 +37,7 @@ quota \- display disk usage and limits
] [
.BR -l \ |
[
-.BR -Q \ |\ -A
+.BR -QAm
]]
.B -g
.IR group ...
@@ -47,7 +47,7 @@ quota \- display disk usage and limits
.B -F
.I format-name
] [
-.B -qvswugQ
+.B -qvswugQm
]
.B -f
.IR filesystem ...
@@ -109,14 +109,27 @@ report quotas only on local filesystems (ie. ignore NFS mounted filesystems).
report quotas for all NFS filesystems even if they report to be on the same
device.
.TP
+.B -m, --no-mixed-pathnames
+Currently, pathnames of NFSv4 mountpoints are sent without leading slash in the path.
+.BR rpc.rquotad
+uses this to recognize NFSv4 mounts and properly prepend pseudoroot of NFS filesystem
+to the path. If you specify this option,
+.BR setquota
+will always send paths with a trailing slash. This can be useful for legacy reasons but
+be aware that quota over RPC will stop working if you are using new
+.BR rpc.rquotad .
+.TP
.B -q, --quiet
Print a more terse message,
containing only information
on filesystems where usage is over quota.
.TP
.B -Q, --quiet-refuse
-Do not print error message if connection to rpc.rquotad is refused (usually this happens
-when rpc.rquotad is not running on the server).
+Do not print error message if connection to
+.BR rpc.rquotad
+is refused (usually this happens when
+.BR rpc.rquotad
+is not running on the server).
.TP
.B -w, --no-wrap
Do not wrap the line if the device name is too long. This can be useful when parsing
diff --git a/quota.c b/quota.c
index f48c194..f8c8320 100644
--- a/quota.c
+++ b/quota.c
@@ -34,7 +34,7 @@
#ident "$Copyright: (c) 1980, 1990 Regents of the University of California. $"
#ident "$Copyright: All rights reserved. $"
-#ident "$Id: quota.c,v 1.25 2007/08/23 19:58:14 jkar8572 Exp $"
+#ident "$Id: quota.c,v 1.26 2007/09/18 16:21:07 jkar8572 Exp $"
/*
* Disk quota reporting program.
@@ -74,7 +74,7 @@
#define FL_NUMNAMES 1024
#define FL_NFSALL 2048
#define FL_RAWGRACE 4096
-#define FL_MIXED_PATHS 8192
+#define FL_NO_MIXED_PATHS 8192
int flags, fmt = -1;
char *progname;
@@ -103,7 +103,7 @@ void usage(void)
-F, --format=formatname display quota of a specific format\n\
-f, --filesystem-list display quota information only for given filesystems\n\
-A, --nfs-all display quota for all NFS mountpoints\n\
--m, --mixed-pathnames trim leading slashes from NFSv4 mountpoints\n\
+-m, --no-mixed-pathnames trim leading slashes from NFSv4 mountpoints\n\
-h, --help display this help message and exit\n\
-V, --version display version information and exit\n\n"));
fprintf(stderr, _("Bugs to: %s\n"), MY_EMAIL);
@@ -134,7 +134,7 @@ int showquotas(int type, qid_t id, int mntcnt, char **mnt)
time(&now);
id2name(id, type, name);
handles = create_handle_list(mntcnt, mnt, type, fmt,
- IOI_READONLY | ((flags & FL_MIXED_PATHS) ? IOI_NFS_MIXED_PATHS : 0),
+ IOI_READONLY | ((flags & FL_NO_MIXED_PATHS) ? 0 : IOI_NFS_MIXED_PATHS),
((flags & FL_NOAUTOFS) ? MS_NO_AUTOFS : 0)
| ((flags & FL_LOCALONLY) ? MS_LOCALONLY : 0)
| ((flags & FL_NFSALL) ? MS_NFS_ALL : 0));
@@ -263,7 +263,7 @@ int main(int argc, char **argv)
{ "no-wrap", 0, NULL, 'w' },
{ "filesystem-list", 0, NULL, 'f' },
{ "all-nfs", 0, NULL, 'A' },
- { "mixed-pathnames", 0, NULL, 'm' },
+ { "no-mixed-pathnames", 0, NULL, 'm' },
{ NULL, 0, NULL, 0 }
};
@@ -316,7 +316,7 @@ int main(int argc, char **argv)
flags |= FL_NFSALL;
break;
case 'm':
- flags |= FL_MIXED_PATHS;
+ flags |= FL_NO_MIXED_PATHS;
break;
case 'V':
version();
diff --git a/setquota.8 b/setquota.8
index 3879532..4593d9f 100644
--- a/setquota.8
+++ b/setquota.8
@@ -4,7 +4,7 @@ setquota \- set disk quotas
.SH SYNOPSIS
.B setquota
[
-.B \-r
+.B \-rm
]
[
.B \-u
@@ -26,7 +26,7 @@ setquota \- set disk quotas
.LP
.B setquota
[
-.B \-r
+.B \-rm
]
[
.B \-u
@@ -49,7 +49,7 @@ setquota \- set disk quotas
.B setquota
.B \-b
[
-.B \-r
+.B \-rm
]
[
.B \-u
@@ -67,6 +67,8 @@ setquota \- set disk quotas
.B setquota
.B \-t
[
+.B \-m
+] [
.B \-u
|
.B \-g
@@ -84,6 +86,8 @@ setquota \- set disk quotas
.B setquota
.B \-T
[
+.B \-m
+] [
.B \-u
|
.B \-g
@@ -116,6 +120,16 @@ Edit also remote quota use rpc.rquotad on remote server to set quota. This
option is available only if quota tools were compiled with enabled support
for setting quotas over RPC.
.TP
+.B -m, --no-mixed-pathnames
+Currently, pathnames of NFSv4 mountpoints are sent without leading slash in the path.
+.BR rpc.rquotad
+uses this to recognize NFSv4 mounts and properly prepend pseudoroot of NFS filesystem
+to the path. If you specify this option,
+.BR setquota
+will always send paths with a trailing slash. This can be useful for legacy reasons but
+be aware that quota over RPC will stop working if you are using new
+.BR rpc.rquotad .
+.TP
.B -F, --format=\f2quotaformat\f1
Perform setting for specified format (ie. don't perform format autodetection).
Possible format names are:
diff --git a/setquota.c b/setquota.c
index fce066a..78c8317 100644
--- a/setquota.c
+++ b/setquota.c
@@ -30,7 +30,7 @@
#define FL_INDIVIDUAL_GRACE 64
#define FL_BATCH 128
#define FL_NUMNAMES 256
-#define FL_MIXED_PATHS 512
+#define FL_NO_MIXED_PATHS 512
int flags, fmt = -1;
char **mnt;
@@ -64,7 +64,7 @@ static void usage(void)
-b, --batch read limits from standard input\n"), ropt);
#if defined(RPC_SETQUOTA)
fputs(_("-r, --remote set remote quota (via RPC)\n\
--m, --mixed-pathnames trim leading slashes from NFSv4 mountpoints\n"), stderr);
+-m, --no-mixed-pathnames trim leading slashes from NFSv4 mountpoints\n"), stderr);
#endif
fputs(_("-t, --edit-period edit grace period\n\
-T, --edit-times edit grace times for user/group\n\
@@ -114,7 +114,7 @@ static void parse_options(int argcnt, char **argstr)
{ "prototype", 1, NULL, 'p' },
#ifdef RPC_SETQUOTA
{ "remote", 0, NULL, 'r' },
- { "mixed-pathnames", 0, NULL, 'm' },
+ { "no-mixed-pathnames", 0, NULL, 'm' },
#endif
{ "all", 0, NULL, 'a' },
{ "always-resolve", 0, NULL, 256},
@@ -146,7 +146,7 @@ static void parse_options(int argcnt, char **argstr)
flags |= FL_RPC;
break;
case 'm':
- flags |= FL_MIXED_PATHS;
+ flags |= FL_NO_MIXED_PATHS;
break;
case 'a':
flags |= FL_ALL;
@@ -382,11 +382,11 @@ int main(int argc, char **argv)
if (flags & FL_ALL)
handles = create_handle_list(0, NULL, flag2type(flags), fmt,
- (flags & FL_MIXED_PATHS) ? IOI_NFS_MIXED_PATHS : 0,
+ (flags & FL_NO_MIXED_PATHS) ? 0 : IOI_NFS_MIXED_PATHS,
(flags & FL_RPC) ? 0 : MS_LOCALONLY);
else
handles = create_handle_list(mntcnt, mnt, flag2type(flags), fmt,
- (flags & FL_MIXED_PATHS) ? IOI_NFS_MIXED_PATHS : 0,
+ (flags & FL_NO_MIXED_PATHS) ? 0 : IOI_NFS_MIXED_PATHS,
(flags & FL_RPC) ? 0 : MS_LOCALONLY);
if (flags & FL_GRACE)