From: Brian Foster <brian.foster@maxim-ic.com>
To: Brian Norris <computersforpeace@gmail.com>
Cc: "linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
Mike Frysinger <vapier@gentoo.org>
Subject: Re: [BUG] mtdinfo -a: Tries to open NULL pointer for NOR with Eraseblock Regions
Date: Tue, 9 Aug 2011 09:27:12 +0200 [thread overview]
Message-ID: <201108090927.13042.brian.foster@maxim-ic.com> (raw)
In-Reply-To: <CAN8TOE9p1v=mDUawRrnVAwDO4zz9LmXkqdNynLPCSCnBRMr9pw@mail.gmail.com>
On Tuesday 09 August 2011 01:19:11 Brian Norris wrote:
> On Fri, Aug 5, 2011 at 6:18 PM, Mike Frysinger <vapier@gentoo.org> wrote:
>[ ... ]
> > alternatively, we punt --all and just make users run `mtdinfo
> > /dev/mtd?`. i'm fine with that too.
>
> I also feel like `--all' is too valuable to be killed just because
> of region_info.
>
> Instead, I'm a little more inclined to go for Brian Foster's
> suggestion (from another branch of this thread):
>
> "Alternatively, --all only prints what it can get,
> and --help warns there _may_ be additional data not
> printed by --all (and to use ‘mtdinfo /dev/mtd<N>’)."
>
> Only problem I see is that this provides a little bit of
> inconsistency, where `mtdinfo --all' isn't quite all the info.
> But with an addition help message as described by Mr. Foster,
> I don't think this would be much problem.
Thanks. I've always presumed ‘--all’ means “all mtd devices”,
not “all info from mtd”, so this seeming-inconsistency didn't
even occur to me! If you want “all info from mtd”, then just
do something like:
────────────────────────────────────────────────────────────────
# for m in /dev/mtd[0-9]*; do mtdinfo $m; done
mtd0
Name: physmap-flash.0
Type: nor
Eraseblock size: 131072 bytes, 128.0 KiB
Amount of eraseblocks: 256 (33554432 bytes, 32.0 MiB)
Minimum input/output unit size: 1 byte
Sub-page size: 1 byte
Additional erase regions: 0
Character device major/minor: 90:0
Bad blocks are allowed: false
Device is writable: true
Eraseblock region 0: offset: 0x27f0004 size: 0xde numblocks: 0
mtdinfo: error!: "/dev/mtd1" does not correspond to any existing MTD device
mtdinfo: error!: "/dev/mtd2" does not correspond to any existing MTD device
mtdinfo: error!: "/dev/mtd3" does not correspond to any existing MTD device
mtdinfo: error!: "/dev/mtd4" does not correspond to any existing MTD device
mtdinfo: error!: "/dev/mtd5" does not correspond to any existing MTD device
mtdinfo: error!: "/dev/mtd6" does not correspond to any existing MTD device
mtdinfo: error!: "/dev/mtd7" does not correspond to any existing MTD device
#
────────────────────────────────────────────────────────────────
Simple. I don't mind the errors shown above, so I haven't
bothered to work out how to suppress them (without loosing
other, presumably important, error messages).
cheers!
-blf-
--
Brian FOSTER
Principal MTS, Software
Maxim Integrated Products (Microcontroller BU), formerly Innova Card
Web : http://www.maxim-ic.com/
next prev parent reply other threads:[~2011-08-09 7:28 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-25 9:48 [BUG] mtdinfo -a: Tries to open NULL pointer for NOR with Eraseblock Regions Brian Foster
2011-07-25 17:10 ` Brian Norris
2011-07-26 7:21 ` Brian Foster
2011-08-04 17:46 ` Brian Norris
2011-08-04 22:41 ` Mike Frysinger
2011-08-06 0:09 ` Brian Norris
2011-08-06 1:18 ` Mike Frysinger
2011-08-08 8:16 ` Brian Foster
2011-08-08 23:19 ` Brian Norris
2011-08-09 7:27 ` Brian Foster [this message]
2011-08-09 17:34 ` Mike Frysinger
2011-08-09 19:59 ` Brian Norris
2011-08-15 4:11 ` Artem Bityutskiy
2011-08-15 23:13 ` Brian Norris
2011-08-16 14:17 ` Artem Bityutskiy
2011-08-16 7:31 ` Brian Foster
2011-08-16 17:47 ` Brian Norris
2011-08-08 8:10 ` Brian Foster
2011-08-08 8:40 ` Brian Foster
2011-08-05 7:24 ` Brian Foster
2011-08-06 0:06 ` Brian Norris
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=201108090927.13042.brian.foster@maxim-ic.com \
--to=brian.foster@maxim-ic.com \
--cc=computersforpeace@gmail.com \
--cc=linux-mtd@lists.infradead.org \
--cc=vapier@gentoo.org \
/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