]> www.infradead.org Git - mtd-utils.git/commit
limbtd: implement mtd_dev_present for old kernels
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Thu, 9 Feb 2012 18:13:29 +0000 (10:13 -0800)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Tue, 14 Feb 2012 09:00:09 +0000 (11:00 +0200)
commiteded3cd0a52252f677ceacd1fbcae13be3d55e8f
tree3b42b49e75a63871440b1e1969ce5ce2bc24134f
parentcc2e57ba328951dca3c34bea2c5d2d3409b16b29
limbtd: implement mtd_dev_present for old kernels

Implement the 'legacy_dev_present()' function which will check whether an MTD
device is present by scanning the /proc/mtd file when the MTD subsystem does
not support sysfs (the case for pre-2.6.30 kernels).

This patch also moves the 'mtd_dev_present()' function to a slightly more
logical position.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
lib/libmtd.c
lib/libmtd_int.h
lib/libmtd_legacy.c