diff options
author | Brian Norris <computersforpeace@gmail.com> | 2012-01-27 10:30:46 -0800 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2012-02-02 13:25:14 +0200 |
commit | 457c9fe94be95bffaced33029d3ca2986e8179c1 (patch) | |
tree | 680d24f165cb10b987d33dc657bec447c48d0ced /recv_image.c | |
parent | de3f8789d9e54b2e0e45197a693ad87ebf3bab60 (diff) |
mtdinfo: fix `--all' for non-consecutive device numbers
When we have assigned non-consecutive device numbers to our MTD devices,
then we run `mtdinfo --all', we get errors once mtdinfo tries to process
the devices in the "hole". For instance, suppose that at boot time, we have
one MTD (/dev/mtd0) then perform a sequence like the following:
# modprobe mtdram
# modprobe nandsim
# rmmod mtdram
Then at this point, we have should have devices 0 and 2 without 1. Then:
# mtdinfo --all
...
mtdinfo: error!: mtd1 does not correspond to any existing MTD device
We add a check to first see if device is present, then continue to the next
ID if it doesn't exist.
Reported-by: Brian Foster <brian.foster@maxim-ic.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'recv_image.c')
0 files changed, 0 insertions, 0 deletions