public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: umar@janteq.com
To: "Ricard Wanderlof" <ricard.wanderlof@axis.com>
Cc: "linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	Umar Qureshey <umar@janteq.com>,
	Artem Bityutskiy <dedekind1@gmail.com>
Subject: Re: Discovering current MTD partition
Date: Wed, 27 Apr 2011 13:08:16 -0400	[thread overview]
Message-ID: <97ba6eaa0c79b74f56c22189d049dc2d.squirrel@emailmg.startlogic.com> (raw)
In-Reply-To: <Pine.LNX.4.64.1104270820560.15966@lnxricardw.se.axis.com>

>
>> On Wed, 27 Apr 2011, Artem Bityutskiy wrote:
>>
>> > 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.
>
> If you want to find out which partition is mounted as root you could look
> at /proc/mounts .
>
> /Ricard

Hi,
/proc/mtd simply gives me a list of partition on the mtd device.  It
doesn't tell me which one we currently have booted from.

/proc/mounts as well doesn't relay any info about /dev/mtdXX.

~Umar

  reply	other threads:[~2011-04-27 17:09 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-26 23:43 Discovering current MTD partition Umar Qureshey
2011-04-27  5:31 ` Artem Bityutskiy
2011-04-27  6:22   ` Ricard Wanderlof
2011-04-27 17:08     ` umar [this message]
2011-04-28  7:31       ` Ricard Wanderlof
2011-04-28  7:37         ` Artem Bityutskiy
2011-04-28  8:00           ` Ricard Wanderlof
2011-04-28  8:52             ` Artem Bityutskiy
2011-04-28  9:09               ` Ricard Wanderlof
2011-04-27  7:25   ` umar
     [not found]     ` <4DB7C9F9.9000609@free-electrons.com>
2011-04-27 17:14       ` umar
2011-04-28  4:27         ` Iwo Mergler
2011-04-28  7:39           ` Ricard Wanderlof
2011-04-28 17:26           ` umar
2011-04-28 17:48             ` Artem Bityutskiy
2011-04-29  0:53               ` umar
2011-04-28 18:08 ` Bjørn Forsman
2011-04-28 18:21   ` Atlant Schmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=97ba6eaa0c79b74f56c22189d049dc2d.squirrel@emailmg.startlogic.com \
    --to=umar@janteq.com \
    --cc=dedekind1@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=ricard.wanderlof@axis.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox