From owner-freebsd-current@FreeBSD.ORG Wed Feb 27 16:08:37 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 3874E409 for ; Wed, 27 Feb 2013 16:08:37 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-we0-x22a.google.com (mail-we0-x22a.google.com [IPv6:2a00:1450:400c:c03::22a]) by mx1.freebsd.org (Postfix) with ESMTP id D0861B43 for ; Wed, 27 Feb 2013 16:08:36 +0000 (UTC) Received: by mail-we0-f170.google.com with SMTP id z53so662377wey.1 for ; Wed, 27 Feb 2013 08:08:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=RsYbZd/eBQ6u3v4vW/e++zNmBkid8FTp1cwcRR/qG5I=; b=XH5+ReIDbS2sYZwRMwR9YQnYJh9eqgmOQKimLsUReXVJlpW0HUXKIi71qWOQvrD7nz r6Fp77r/XteLCtPhyQcMm9OFq5jGNBEMrVRasE/kcyqEuSSOpFO4bbsiMrU8xFujGqZ6 t8aUAEOco0JULflpr8yYXPmxchoJ0nMlRsm6mNAtZcvoLYfXQEhpVp5U0np6DiadD1Al 9d/7/7WY6Y24W8zOo4RtZTEgySlVpspoqV0Tylw9AswPE6PoWBGFbT0fUg/Sq+fpnq3H W7s7L+AQs7+okePul991MZwqGG/Y74Iz3M8lGzP8GnHTjgOb1EaWivzJl+VIBzLmuv1H n1Ig== MIME-Version: 1.0 X-Received: by 10.181.12.103 with SMTP id ep7mr27291912wid.12.1361981315789; Wed, 27 Feb 2013 08:08:35 -0800 (PST) Received: by 10.194.86.167 with HTTP; Wed, 27 Feb 2013 08:08:35 -0800 (PST) In-Reply-To: <20130226122039.GN2454@kib.kiev.ua> References: <20130226122039.GN2454@kib.kiev.ua> Date: Wed, 27 Feb 2013 19:08:35 +0300 Message-ID: Subject: Re: [patch] Proposal: move getmntopts(3) into libutil From: Sergey Kandaurov To: Konstantin Belousov Content-Type: text/plain; charset=ISO-8859-1 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: Wed, 27 Feb 2013 16:08:37 -0000 On 26 February 2013 16:20, Konstantin Belousov wrote: > On Tue, Feb 26, 2013 at 02:39:26PM +0300, Sergey Kandaurov wrote: >> Hi. >> >> 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. I'm afraid this is the price for the change. No better thoughts. >> 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. That's reasonable, thanks. Patch is updated with your correction. I have put it on freefall for convenience. http://people.freebsd.org/~pluknet/patches/getmntopts.2.patch > >> sbin/mount/getmntopts.[3c] -> lib/libutil/getmntopts.[3c] > I assume that the move is done by 'svn mv' to preserve the history. Yes. Unfortunately svn stat cannot nicely represent 'svn mv' ops. -- wbr, pluknet