From owner-freebsd-stable@FreeBSD.ORG Wed Mar 5 11:11:27 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D480E106566C for ; Wed, 5 Mar 2008 11:11:27 +0000 (UTC) (envelope-from rink@tragedy.rink.nu) Received: from mx1.rink.nu (alastor.rink.nu [213.34.49.5]) by mx1.freebsd.org (Postfix) with ESMTP id 8A7EA8FC13 for ; Wed, 5 Mar 2008 11:11:27 +0000 (UTC) (envelope-from rink@tragedy.rink.nu) Received: from localhost (alastor.rink.nu [213.34.49.5]) by mx1.rink.nu (Postfix) with ESMTP id 1C70DBFECD8; Wed, 5 Mar 2008 11:11:24 +0000 (UTC) X-Virus-Scanned: amavisd-new at rink.nu Received: from mx1.rink.nu ([213.34.49.5]) by localhost (alastor.rink.nu [213.34.49.5]) (amavisd-new, port 10024) with ESMTP id 31UxHX9+rGY9; Wed, 5 Mar 2008 11:11:13 +0000 (UTC) Received: from tragedy.rink.nu (tragedy.rink.nu [213.34.49.3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.rink.nu (Postfix) with ESMTP id 49166BFEC79; Wed, 5 Mar 2008 11:11:13 +0000 (UTC) Received: from tragedy.rink.nu (tragedy.rink.nu [213.34.49.3]) by tragedy.rink.nu (8.13.8/8.13.8) with ESMTP id m25BBD0h000659; Wed, 5 Mar 2008 12:11:13 +0100 (CET) (envelope-from rink@tragedy.rink.nu) Received: (from rink@localhost) by tragedy.rink.nu (8.13.8/8.13.8/Submit) id m25BB8wS000658; Wed, 5 Mar 2008 12:11:08 +0100 (CET) (envelope-from rink) Date: Wed, 5 Mar 2008 12:11:08 +0100 From: Rink Springer To: Rick van der Zwet Message-ID: <20080305111108.GB90443@rink.nu> References: <47CE70E0.4000607@wirelessleiden.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <47CE70E0.4000607@wirelessleiden.nl> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: freebsd-stable@freebsd.org Subject: Re: Mapping stat(1) device number/name to partition? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Mar 2008 11:11:27 -0000 Hi, On Wed, Mar 05, 2008 at 11:07:28AM +0100, Rick van der Zwet wrote: > Which handy shell utility program will help me doing this? I think you can use statfs(2) to look up the f_fsid, this should be equal to the st_dev, judging from the code in kern/vfs_syscalls.c. There doesn't appear to be a shell utility to statfs(2), but you may be able to hack something up in perl or simular. Regards, -- Rink P.W. Springer - http://rink.nu "Anyway boys, this is America. Just because you get more votes doesn't mean you win." - Fox Mulder