[parted-devel] probing devices.. some questions/comments

Bart Hakvoort bart at hakvoort.be
Sat Sep 9 11:27:42 UTC 2006


> well, the minor number is in /proc/partitions. So if we take for example
> the se 2 lines (i've included the header for more clearity):
>
> major minor  #blocks  name
>
>    3     0   39070080 hda
>    3     1   11165143 hda1
>
> Then it's easy to see that hda is the device. because the minor is 0. Of
> course devices don't have numbers, but apperantly in /proc/partitions they
> do, which could make life a bit easier for us.
> No more use of _match_rd_device() and isdigit() on the last character.

Just to make this clear. the minor doesn't always have to be 0 of course.
But the minor of the device will always be lesser than the minor numbers
of the actual partitions.

-- 
--- plors




More information about the parted-devel mailing list