tech-kern archive

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

Re: Tell a real disklabel apart from a fictious one



> If I do ioctl(DIOCGDINFO) on a disk device, is there any better way
> to tell this is a real label or one made up by the kernel besides
>       if (strcmp("default label", lab.d_packname)==0)
> ?

Why do you care?  Perhaps there's some other/better way to achieve your
underlying goal.

I know I often enough do
        disklabel xx0 | disklabel -r -R xx0 /dev/stdin
to get an initial label on a disk; doesn't that copy d_packname from
the synthetic label to the real one?

/~\ The ASCII                           der Mouse
\ / Ribbon Campaign
 X  Against HTML               mouse%rodents.montreal.qc.ca@localhost
/ \ Email!           7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index