[PATCH 1/2] libmtd: add `mtd_dev_present()' library function
Brian Foster
brian.foster at maxim-ic.com
Thu Feb 2 08:20:17 EST 2012
On Thursday 02 February 2012 12:33:24 Artem Bityutskiy wrote:
> On Fri, 2012-01-27 at 10:30 -0800, Brian Norris wrote:
> > +int mtd_dev_present(libmtd_t desc, int mtd_num) { [ ... ]
>
> This will only work for relatively newer kernels where MTD has sysfs
> support (2.6.30+). Older kernels have no MTD sysfs support and the sysfs
> file you are stat()'ing won't exist, so this function will always return
> an error.
This is a very plausible concern: Our older system
is mostly deployed with 2.6.26(or even older) kernel,
albeit a 2.6.30 option exists. It has multiple MTD
devices, albeit due to the usage/configuration (and
maybe the use of older mtd-utils?) I suspect the bug
has never been observed.
Our latest system uses 2.6.36, and is where the original
UBI-related bug was observed.
cheers!
-blf-
--
Brian Foster
Principal MTS, Software | La Ciotat, France
Maxim Integrated Products | Web: http://www.maxim-ic.com/
More information about the linux-mtd
mailing list