From owner-freebsd-current@FreeBSD.ORG Tue Feb 26 12:20:44 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 694CE871 for ; Tue, 26 Feb 2013 12:20:44 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 0BCCDF0D for ; Tue, 26 Feb 2013 12:20:43 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.6/8.14.6) with ESMTP id r1QCKdGc017757; Tue, 26 Feb 2013 14:20:39 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.7.4 kib.kiev.ua r1QCKdGc017757 Received: (from kostik@localhost) by tom.home (8.14.6/8.14.6/Submit) id r1QCKduo017756; Tue, 26 Feb 2013 14:20:39 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 26 Feb 2013 14:20:39 +0200 From: Konstantin Belousov To: Sergey Kandaurov Subject: Re: [patch] Proposal: move getmntopts(3) into libutil Message-ID: <20130226122039.GN2454@kib.kiev.ua> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Dxzxec4+BSbG6TGA" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: FreeBSD Current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Feb 2013 12:20:44 -0000 --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--