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
--SkvwRMAIpAhPCcCJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Man page for fstab describes syntax of the form userquota=3D<file> and groupquota=3D<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_ "=3D<file>". Patch below fixes the problem for specified syntax as well. Please, apply. Index: sbin/mount/mount.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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 }; =20 +static const char userquotaeq[] =3D "userquota=3D"; +static const char groupquotaeq[] =3D "groupquota=3D"; + static int use_mountprog(const char *vfstype) { @@ -634,8 +637,12 @@ continue; } else if (strcmp(p, "userquota") =3D=3D 0) { continue; + } else if (strncmp(p, userquotaeq, sizeof(userquotaeq) - 1) =3D=3D 0) { + continue; } else if (strcmp(p, "groupquota") =3D=3D 0) { continue; + } else if (strncmp(p, groupquotaeq, sizeof(groupquotaeq) - 1) =3D=3D 0)= { + continue; } else if (*p =3D=3D '-') { argv[argc++] =3D p; p =3D strchr(p, '=3D'); --SkvwRMAIpAhPCcCJ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQFEWdapC3+MBN1Mb4gRApIDAJ4w513arLjw1xCKfe9ZZ9qbETA8TQCffSUI +dajIsyk+y/DQ2eESLZEXdY= =fDgB -----END PGP SIGNATURE----- --SkvwRMAIpAhPCcCJ--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060504102546.GC35756>