[Ubi] Wrong major:minor
Artem Bityutskiy
dedekind1 at gmail.com
Wed Jun 1 04:29:23 EDT 2011
On Sun, 2011-05-29 at 11:54 -0400, Mike Frysinger wrote:
> On Sun, May 29, 2011 at 06:39, Gilles wrote:
> > I'm no Linux expert, and was wondering how to find out what the
> > correct major:minor is for the Ubi device nodes?
>
> they're most likely dynamic and there's no safe way you could create
> the nodes ahead of time with a device table. simply run mdev to take
> care of /dev for you.
>
> you can check /proc/devices to be sure ... anything over 250 is dynamic
> -mike
Right, UBI allocates device numbers dynamically, so pre-creating device
nodes is not a good idea.
Major/minor for every UBI device / UBI volume can be found at:
/sys/class/ubi/ubiX/dev
/sys/class/ubi/ubiX_Y/dev
Or the major number can be indeed found at /proc/devices, and then the
minor numbers follow the following fomula:
UBI Volume major number = UBI device major number.
UBI Volume minor number = UBI volume ID + 1.
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
More information about the linux-mtd
mailing list