Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Mar 2008 12:11:08 +0100
From:      Rink Springer <rink@freebsd.org>
To:        Rick van der Zwet <rick@wirelessleiden.nl>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: Mapping stat(1) device number/name to partition?
Message-ID:  <20080305111108.GB90443@rink.nu>
In-Reply-To: <47CE70E0.4000607@wirelessleiden.nl>
References:  <47CE70E0.4000607@wirelessleiden.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
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



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