* [BUG v1.4.6] `ubinfo -a' confused about non-consecutive UBI device numbers
@ 2012-01-24 9:24 Brian Foster
2012-01-24 20:16 ` Brian Norris
0 siblings, 1 reply; 2+ messages in thread
From: Brian Foster @ 2012-01-24 9:24 UTC (permalink / raw)
To: linux-mtd@lists.infradead.org
Hello,
Using mtd-utils v1.4.6 with a v2.6.36 Linux kernel,
if I have non-consecutive UBI device numbers (in the
example below, ‘ubi0’ and ‘ubi10’), then ‘ubinfo -a’,
after printing the info for ‘ubi0’, errors with:
ubinfo: error!: cannot get information about UBI device 1
error 2 (No such file or directory)
In case it matters, ‘ubi0’ was attached/mounted by
kernel command-line (it's my rootfs). My normal
practice is for manually attached MTD and UBI device
numbers to be the same (with 12(!) MTD devices this
greatly reduces confusion!).
─────────────────────────────────────────────────────
# ubinfo --version
1.1
#
# ubinfo -a # Only `ubi0' (rootfs) is attached...
UBI version: 1
Count of UBI devices: 1
UBI control device major/minor: 10:63
Present UBI devices: ubi0
ubi0
Volumes count: 1
[...]
#
# cat /proc/mtd
dev: size erasesize name
mtd0: 02000000 00020000 "physmap-flash.0"
mtd1: 00004000 00000001 "maximasp-nvram"
mtd2: 00002000 00000001 "maximasp-snvram"
mtd3: 00200000 00020000 "u-boot"
mtd4: 00080000 00020000 "env0"
mtd5: 00080000 00020000 "env1"
mtd6: 00400000 00020000 "kernel0"
mtd7: 00400000 00020000 "kernel1"
mtd8: 00500000 00020000 "kernel2"
mtd9: 06400000 00020000 "root0"
mtd10: 06400000 00020000 "root1"
mtd11: 12800000 00020000 "other"
#
# ubiattach -m10 -d10 # Now attach `mtd10' as `ubi10'...
UBI device number 10, total 800 LEBs (103219200 bytes, 98.4 MiB), \
available 0 LEBs (0 bytes), LEB size 129024 bytes (126.0 KiB)
#
# ubinfo -a # `ubinfo -a' is now confused...
UBI version: 1
Count of UBI devices: 2
UBI control device major/minor: 10:63
Present UBI devices: ubi0, ubi10
ubi0
Volumes count: 1
[...]
===================================
ubinfo: error!: cannot get information about UBI device 1
error 2 (No such file or directory)
#
# ubinfo -d10 # However, `ubinfo -d10' is happy...
ubi10
Volumes count: 1
[...]
#
─────────────────────────────────────────────────────
Notice that ‘ubinfo -a’ is fully and correctly aware of
the attached devices, listing only ‘ubi0’ and ‘ubi10’.
Nonetheless, it tries to print information about/from
the non-existent ‘ubi1’.
I have not investigated, nor tried other/recent versions.
cheers!
-blf-
--
Brian Foster
Principal MTS, Software | La Ciotat, France
Maxim Integrated Products | Web: http://www.maxim-ic.com/
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [BUG v1.4.6] `ubinfo -a' confused about non-consecutive UBI device numbers
2012-01-24 9:24 [BUG v1.4.6] `ubinfo -a' confused about non-consecutive UBI device numbers Brian Foster
@ 2012-01-24 20:16 ` Brian Norris
0 siblings, 0 replies; 2+ messages in thread
From: Brian Norris @ 2012-01-24 20:16 UTC (permalink / raw)
To: Brian Foster; +Cc: linux-mtd@lists.infradead.org
On Tue, Jan 24, 2012 at 1:24 AM, Brian Foster <brian.foster@maxim-ic.com> wrote:
> Using mtd-utils v1.4.6 with a v2.6.36 Linux kernel,
> if I have non-consecutive UBI device numbers (in the
> example below, ‘ubi0’ and ‘ubi10’), then ‘ubinfo -a’,
> after printing the info for ‘ubi0’, errors with:
>
> ubinfo: error!: cannot get information about UBI device 1
> error 2 (No such file or directory)
...
> I have not investigated, nor tried other/recent versions.
Still present on current git. The fix doesn't look too bad. I'll
probably send a fix in the next few days.
Brian
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-01-24 20:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-24 9:24 [BUG v1.4.6] `ubinfo -a' confused about non-consecutive UBI device numbers Brian Foster
2012-01-24 20:16 ` Brian Norris
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox