Re: Discovering current MTD partition

umar
2011-04-27T17:15:05Z

> On 04/27/2011 09:25 AM, umar@janteq.com wrote:
>> Hi,
>> [...]
>> What I'd like is to detect from userspace is which /dev/mtdX partition
>> is
>> the currently executing program running on because that is the partition
>> that has been obviously booted.
>
> I think you might want to take a look at getmntent (3) : it is a libc
> function for getting the /etc/mtab entries. It also seems to be portable.
>
> Cheers,
> David.
>
> --
> David Wagner, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com

This will give me the same info as /proc/mtab. I cannot figure out how I
can infer which /dev/mtdXX was booted from with this information.