Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 May 2006 13:25:46 +0300
From:      Kostik Belousov <kostikbel@gmail.com>
To:        freebsd-current@freebsd.org
Subject:   [patch] userquota=<file> syntax in fstab is broken
Message-ID:  <20060504102546.GC35756@deviant.kiev.zoral.com.ua>

next in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
Man page for fstab describes syntax of the form
userquota=<file> and groupquota=<file> that allows to specify
alternative quota files. This feature is supported by quota*(8)
group of commands, but putting such option into the fstab
cause complain from kernel, since this options shall be trimmed
from mount option list.

Rev. 1.75 of sbin/mount/mount.c does this for userquota/groupquota
_without_ "=<file>". Patch below fixes the problem for specified
syntax as well.

Please, apply.

Index: sbin/mount/mount.c
===================================================================
RCS file: /usr/local/arch/ncvs/src/sbin/mount/mount.c,v
retrieving revision 1.83
diff -u -r1.83 mount.c
--- sbin/mount/mount.c	3 Mar 2006 02:46:15 -0000	1.83
+++ sbin/mount/mount.c	4 May 2006 10:24:25 -0000
@@ -120,6 +120,9 @@
 	0
 };
 
+static const char userquotaeq[] = "userquota=";
+static const char groupquotaeq[] = "groupquota=";
+
 static int
 use_mountprog(const char *vfstype)
 {
@@ -634,8 +637,12 @@
 				continue;
 			} else if (strcmp(p, "userquota") == 0) {
 				continue;
+			} else if (strncmp(p, userquotaeq, sizeof(userquotaeq) - 1) == 0) {
+				continue;
 			} else if (strcmp(p, "groupquota") == 0) {
 				continue;
+			} else if (strncmp(p, groupquotaeq, sizeof(groupquotaeq) - 1) == 0) {
+				continue;
 			} else if (*p == '-') {
 				argv[argc++] = p;
 				p = strchr(p, '=');


[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (FreeBSD)

iD8DBQFEWdapC3+MBN1Mb4gRApIDAJ4w513arLjw1xCKfe9ZZ9qbETA8TQCffSUI
+dajIsyk+y/DQ2eESLZEXdY=
=fDgB
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060504102546.GC35756>