tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: ioctl equivalent to DIOCGSECTORSIZE in FreeBSD?



k.heinz%maerzehn.kh-22.de@localhost (Klaus Heinz) writes:

>In former times I would have tried to get a disklabel with DIOCGDINFO
>and looked at d_secsize.

>What is our official way nowadays to find out the size (in bytes) of a
>sector?
>Am I supposed to use DIOCGDISKINFO and plists?

Currently you have several different methods, see sbin/fsck/partutil.c for an
example.

>I want to look at a disk attached to a USB port and I would like it to work
>on NetBSD >=4.

You will need -current to use a filesystem except maybe for msdosfs.

-- 
-- 
                                Michael van Elst
Internet: mlelstv%serpens.de@localhost
                                "A potential Snark may lurk in every tree."


Home | Main Index | Thread Index | Old Index