Mapping stat(1) device number/name to partition?

Rink Springer rink at freebsd.org
Wed Mar 5 11:11:27 UTC 2008


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


More information about the freebsd-stable mailing list