Re: Discovering current MTD partition

Artem Bityutskiy
2011-04-27T05:34:56Z

On Tue, 2011-04-26 at 16:43 -0700, Umar Qureshey wrote:
> Hi,
>
> I searched this list's archive but did not see anything pertinent.
>
> I was wondering if there is a way to find out what the currently active mtd
> partition is. In my system, I have a few flash partitions for my file
> system and the kernel boots with the partition that is specified on the
> kernel command line. Aside from scanning /proc/cmdline, is there a way to
> programmatically ascertain which mtd partition is active *now*.
> I need to find this information within a Python script but really if it can
> be done in C (perhaps a syscall?), it's all I need.

What does active mean? Anyway, there is /proc/mtd at your disposal.

--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)