[PATCH 1/3] blkid: add UBI volume support

Karel Zak kzak at redhat.com
Fri Sep 25 03:56:26 EDT 2009


On Fri, Sep 25, 2009 at 10:19:19AM +0300, Artem Bityutskiy wrote:
> To check whether this char. device node is an UBI volume and not
> something else, you should scan all /sys/class/ubi/ubiX/Y/dev files, and
> see if there is a device with the same major:minor.
> 
> The other possibility would be to look at /proc/devices, and make sure
> there is an ubiX device with the same major number as your /dev/ubiX_Y
> device.

 Yes, we have such function (blkid_driver_has_major()), but I think
 it's overkill in this context. It seems that check for the "ubi" 
 device name in ubi_probe_all() is enough.

 Thanks.

    Karel

-- 
 Karel Zak  <kzak at redhat.com>



More information about the linux-mtd mailing list