From owner-cvs-src@FreeBSD.ORG Fri Mar 16 03:26:22 2007 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E13F016A401; Fri, 16 Mar 2007 03:26:22 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.freebsd.org (Postfix) with ESMTP id 4B0E513C45D; Fri, 16 Mar 2007 03:26:22 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id A5B57487FB; Fri, 16 Mar 2007 04:26:19 +0100 (CET) Received: from localhost (154.81.datacomsa.pl [195.34.81.154]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 50DA645B26; Fri, 16 Mar 2007 04:26:12 +0100 (CET) Date: Fri, 16 Mar 2007 04:26:06 +0100 From: Pawel Jakub Dawidek To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Message-ID: <20070316032606.GC3229@garage.freebsd.pl> References: <200703160313.l2G3DTHP048236@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="L6iaP+gRLNZHKoI4" Content-Disposition: inline In-Reply-To: <200703160313.l2G3DTHP048236@repoman.freebsd.org> X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng/devel-r804 (FreeBSD) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=BAYES_00 autolearn=ham version=3.0.4 Cc: jmallett@FreeBSD.org Subject: Re: cvs commit: src/lib/libufs type.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Mar 2007 03:26:23 -0000 --L6iaP+gRLNZHKoI4 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Mar 16, 2007 at 03:13:29AM +0000, Pawel Jakub Dawidek wrote: > pjd 2007-03-16 03:13:29 UTC >=20 > FreeBSD src repository >=20 > Modified files: > lib/libufs type.c=20 > Log: > The ufs_disk_fillout(3) can take special device name (with or without /= dev/ > prefix) as an argument and mount point path. At the end it has to find > device name file system is stored on, which means when mount point path= is > given, it tries to look into /etc/fstab and find special device > corresponding to the given mount point. This is not perfect, because it > doesn't handle the case when file system is mounted by hand and mount p= oint > is given as an argument. > =20 > I found this problem while trying to use snapinfo(8), which passes mount > points to the ufs_disk_fillout(3) function, but I had file system mount= ed > manually, so snapinfo(8) was exiting with the error below: > =20 > ufs_disk_fillout: No such file or directory > =20 > I modified libufs(3) to handle those arguments (the order is important): > =20 > 1. special device with /dev/ prefix > 2. special device without /dev/ prefix > 3. mount point listed in /etc/fstab, directory exists > 4. mount point listed in /etc/fstab, directory doesn't exist > 5. mount point of a file system mounted by hand In my opinion, when mount point is given, it should always just use statfs(2) and don't touch /etc/fstab, but I didn't want to change the current behaviour. Juli, do you have an opinion about this? --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --L6iaP+gRLNZHKoI4 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFF+g5OForvXbEpPzQRAvknAKDwACXWAd0qHyHHeIT7h0lwcpY9wwCeJ+pP 4SOQs/V2pQeLBGBfKbRjkFQ= =WQuu -----END PGP SIGNATURE----- --L6iaP+gRLNZHKoI4--