First look for the currently mounted root device and then fallback to
looking for rootfs.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
FILE *fp;
int err;
- err = find_block_mtd("\"rootfs\"", devpath, sizeof(devpath));
+ err = find_root_dev(devpath, sizeof(devpath));
+ if (err)
+ err = find_block_mtd("\"rootfs\"", devpath, sizeof(devpath));
#ifdef UBIFS_EXTROOT
if (err) {
libubi_t libubi;
libubi_close(libubi);
}
#endif
- if (err) {
- err = find_root_dev(devpath, sizeof(devpath));
- }
if (err) {
ULOG_ERR("extroot: unable to determine root device\n");
return -1;