Skip to content

Commit

Permalink
flashutils: additional emmc check
Browse files Browse the repository at this point in the history
Some devices are missing /proc/emmc!

Change-Id: I38ae9e01b8bb0764250998a1a6fef7c754b8e9ce
  • Loading branch information
jcadduono authored and Dees-Troy committed Jan 18, 2017
1 parent 9472ba1 commit 9eb2769
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions flashutils/flashutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 9eb2769

Please sign in to comment.