mmc = find_mmc_device(0);
if (!mmc) {
printf("Device MMC %d - not found!", 0);
- return -ENODEV;
+ return CMD_RET_FAILURE;
}
if (mmc_init(mmc)) {
printf("Couldn't init MMC device.\n");
- return -ENODEV;
+ return CMD_RET_FAILURE;
}
/* Used the mmc 0 by default */
stor_dev = blk_get_devnum_by_type(IF_TYPE_USB, dev);
if (stor_dev == NULL) {
printf("unknown device\n");
- return -ENODEV;
+ return CMD_RET_FAILURE;
}
printf("\n Device %d: ", dev);
dev_print(stor_dev);
if (stor_dev->type == DEV_TYPE_UNKNOWN)
- return 1;
+ return CMD_RET_FAILURE;
usb_stor_curr_dev = dev;
printf("... is now current device\n");
}
if (fs_set_blk_dev(from, argv[1], FS_TYPE_ANY)) {
printf("%d: Unknown block device..\n", __LINE__);
- return -ENODEV;
+ return CMD_RET_FAILURE;
}
alt_num = usbdown_get_alt(filename);
if (alt_num < 0) {
printf("There is no %s information\n", filename);
- return -EINVAL;
+ return CMD_RET_FAILURE;
}
ret = fs_size(filename, &size);
if (ret < 0) {
printf("There is no %s\n", filename);
- return -EINVAL;
+ return CMD_RET_FAILURE;
}
usbdown = usbdown_get_entity(alt_num);
if (!usbdown) {
printf("there is no information for %d\n", alt_num);
- return -EINVAL;
+ return CMD_RET_FAILURE;
}
#ifdef CONFIG_SIG
usbdown->dev_num,
usbdown->hw_partition);
if (ret)
- return ret;
+ return CMD_RET_FAILURE;
}
while (size > 0) {
blk_select_hwpart_devnum(IF_TYPE_MMC,
usbdown->dev_num,
part_num_bkp);
- return -EIO;
+ return CMD_RET_FAILURE;
}
#ifndef CONFIG_BLK
ret = blk_select_hwpart_devnum(IF_TYPE_MMC, usbdown->dev_num,
part_num_bkp);
if (ret)
- return ret;
+ return CMD_RET_FAILURE;
}
- return 0;
+ return CMD_RET_SUCCESS;
}
return CMD_RET_USAGE;
printf("\n");
}
- return 0;
+ return CMD_RET_SUCCESS;
}
return CMD_RET_USAGE;