karo: mmc: fix file read from eMMC partition
authorLothar Waßmann <LW@KARO-electronics.de>
Tue, 3 Mar 2015 08:54:01 +0000 (09:54 +0100)
committerLothar Waßmann <LW@KARO-electronics.de>
Wed, 4 Mar 2015 12:57:06 +0000 (13:57 +0100)
Conflicts:
board/karo/common/mmc.c

board/karo/common/mmc.c

index b452a0b..0048bfb 100644 (file)
@@ -42,6 +42,7 @@ static int find_partitions(const char *ifname, int devno, int fstype,
        int p;
        int part;
        block_dev_desc_t *dd;
+       char dev_part_str[16];
 
        dd = get_dev(ifname, devno);
        if (!dd || dd->type == DEV_TYPE_UNKNOWN) {
@@ -78,7 +79,8 @@ static int find_partitions(const char *ifname, int devno, int fstype,
                ret = -1;
                goto cleanup;
        }
-
+       snprintf(dev_part_str, sizeof(dev_part_str), "%d:%d", devno, part);
+       fs_set_blk_dev(ifname, dev_part_str, fstype);
        ret = part;
        *dev_desc = dd;