Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Feb 2013 14:20:39 +0200
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Sergey Kandaurov <pluknet@gmail.com>
Cc:        FreeBSD Current <freebsd-current@freebsd.org>
Subject:   Re: [patch] Proposal: move getmntopts(3) into libutil
Message-ID:  <20130226122039.GN2454@kib.kiev.ua>
In-Reply-To: <CAE-mSO%2B_JCAtzDbMfts8Ttgs32T7zNFZkYbGJ610v85=H-U=OA@mail.gmail.com>
References:  <CAE-mSO%2B_JCAtzDbMfts8Ttgs32T7zNFZkYbGJ610v85=H-U=OA@mail.gmail.com>

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

--Dxzxec4+BSbG6TGA
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Feb 26, 2013 at 02:39:26PM +0300, Sergey Kandaurov wrote:
> Hi.
>=20
> The functions from sbin/mount/getmntopts.c are used in a bunch of other
> stuff like mount_* utilities which have to suck them in as their own
> functions in quite a hackish way. getmntopts.c copies are compiled in to
> an every utility-consumer instead of being present in one place.  Looks
> like getmntopts.c was brought together with mount_ufs.c in 4.4BSD-Lite.
> After that other mount_* were converted to use getmntopts().
Yes, this is ugly. On the other hand, compiling the functions into
mount binaries makes them not to depend on the yet another library.
It cannot be an argument for rejecting your patch, only a point to
consider.

>=20
> The utilities consuming getmntopts.c as currently present in HEAD:
> mount_smbfs
> fsck_ffs
> growfs
> mksnap_ffs
> mount
> mount_cd9660
> mount_ext2fs
> mount_fusefs
> mount_hpfs
> mount_msdosfs
> mount_nfs
> mount_nullfs
> mount_reiserfs
> mount_std
> mount_udf
> mount_unionfs
> mount_nwfs
> mount_portalfs
> mount_smbfs
> mountd
>=20
> External mount-like utilities may also have difficulties with building
> to get getmntopts.c source as this requires /usr/src presence which is
> in sync with installed world. Look how mount_fusefs from ports compiles:
> # mount_fusefs needs mntopts.h and getmntopts.c from src/sbin/mount/
>=20
> The attached patch moves them to the IMHO architecturally more correct
> place: a separate library -lutil.
> sbin/mount/mntopts.h            -> include/mntopts.h
I think the mntopts.h should be moved to lib/libutil then, and installed
by libutil Makefile.

> sbin/mount/getmntopts.[3c]      -> lib/libutil/getmntopts.[3c]
I assume that the move is done by 'svn mv' to preserve the history.

--Dxzxec4+BSbG6TGA
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (FreeBSD)

iQIcBAEBAgAGBQJRLKiXAAoJEJDCuSvBvK1BixgP/3rkFl+/NGrGh6Di2GYUAYu5
FyvlfVbtHsiPQcL3fKOXAFnRTetq3HvB2LIeJceIehSG5XKCiHNqS8R4+DekLEAy
wmkNJnyf6TBZvWSzEJ4d4LWrfvdgcHp5BqykDJfknLZ9t3L4FPwR9znOpltv7ga3
zqkT0wkSkEZBmr0KDki6GXp8SxYnQOUVEgOD7qC6kPgpSvpDkzRUWEEAjY1JGSYc
Ms9TgWnNLM6ZjQ4IIB5BmGNpgpswh/RqYzoJqw37HQlDUaViP0EJcUllcX0nz201
DTiuuTZM4MBgACVSHi1eW0Uptiv1yMMGSN8z2RDXT2eNFFJigQenJQPoOdTWZn2d
FdcqSLeklxPcjG//0kWizphHDDyXV9n4LqBcJ+r074fzMCFPhNV0DlGwR38VyNij
4KU81oPRIUHe89jtgYisH8rtoNqEWlRxUCBCBpdR/S1tTVd8dai0aFo6W2fThYV+
qJ1tyHZI6sMJQh+54ih+opdPAkXHOrr7Js0imRR7PmCpixbTu4BVAKtsuFuHEM/u
E1khWyWJXefePx7ZtHqCKH3zZ9zKDRY7PQgFgxmKZD+J38Xn5BkATKD+tRDwczOa
fVtVFywwqywxLrkr+rO3mgmxSC1ILqjstj8Z3lg8nsNHhblW4FnvJCX4Cx/XrT1q
eJCeIA3ryr9yB0IiIYX0
=yyso
-----END PGP SIGNATURE-----

--Dxzxec4+BSbG6TGA--



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