From 9eb27698410a3a2852df166bdb1bb1f71e95ab5e Mon Sep 17 00:00:00 2001 From: James Christopher Adduono Date: Tue, 24 May 2016 19:23:03 -0400 Subject: flashutils: additional emmc check Some devices are missing /proc/emmc! Change-Id: I38ae9e01b8bb0764250998a1a6fef7c754b8e9ce --- flashutils/flashutils.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'flashutils') diff --git a/flashutils/flashutils.c b/flashutils/flashutils.c index 5a5e0094f..640193969 100644 --- a/flashutils/flashutils.c +++ b/flashutils/flashutils.c @@ -22,10 +22,12 @@ int device_flash_type() if (the_flash_type == UNKNOWN) { if (access(BOARD_BML_BOOT, F_OK) == 0) { the_flash_type = BML; - } else if (access("/proc/emmc", F_OK) == 0) { - the_flash_type = MMC; } else if (access("/proc/mtd", F_OK) == 0) { the_flash_type = MTD; + } else if (access("/proc/emmc", F_OK) == 0 || + access("/dev/block/mmcblk0", F_OK) == 0 || + access("/dev/block/sda", F_OK) == 0) { + the_flash_type = MMC; } else { the_flash_type = UNSUPPORTED; } -- cgit v1.2.3