summaryrefslogtreecommitdiff
path: root/common/cmd_fat.c
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2012-10-17 06:44:59 +0000
committerTom Rini <trini@ti.com>2012-10-25 12:07:47 -0700
commit5e8f98319d8582d6a066610b5f1ec9b1a3f79704 (patch)
tree625c16325a8685444c3fddc6959c526ea62bcd63 /common/cmd_fat.c
parenta1687b858e5670683199f6923b32aec0ea82ba19 (diff)
downloadu-boot-imx-5e8f98319d8582d6a066610b5f1ec9b1a3f79704.zip
u-boot-imx-5e8f98319d8582d6a066610b5f1ec9b1a3f79704.tar.gz
u-boot-imx-5e8f98319d8582d6a066610b5f1ec9b1a3f79704.tar.bz2
FAT: implement fat_set_blk_dev(), convert cmd_fat.c
This makes the FAT filesystem API more consistent with other block-based filesystems. If in the future standard multi-filesystem commands such as "ls" or "load" are implemented, having FAT work the same way as other filesystems will be necessary. Convert cmd_fat.c to the new API, so the code looks more like other files implementing the same commands for other filesystems. Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Diffstat (limited to 'common/cmd_fat.c')
-rw-r--r--common/cmd_fat.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/common/cmd_fat.c b/common/cmd_fat.c
index 5a5698b..c38302d 100644
--- a/common/cmd_fat.c
+++ b/common/cmd_fat.c
@@ -55,7 +55,7 @@ int do_fat_fsload (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return 1;
dev = dev_desc->dev;
- if (fat_register_device(dev_desc,part)!=0) {
+ if (fat_set_blk_dev(dev_desc, &info) != 0) {
printf("\n** Unable to use %s %d:%d for fatload **\n",
argv[1], dev, part);
return 1;
@@ -111,7 +111,7 @@ int do_fat_ls (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return 1;
dev = dev_desc->dev;
- if (fat_register_device(dev_desc,part)!=0) {
+ if (fat_set_blk_dev(dev_desc, &info) != 0) {
printf("\n** Unable to use %s %d:%d for fatls **\n",
argv[1], dev, part);
return 1;
@@ -149,7 +149,7 @@ int do_fat_fsinfo (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return 1;
dev = dev_desc->dev;
- if (fat_register_device(dev_desc,part)!=0) {
+ if (fat_set_blk_dev(dev_desc, &info) != 0) {
printf("\n** Unable to use %s %d:%d for fatinfo **\n",
argv[1], dev, part);
return 1;
@@ -185,7 +185,7 @@ static int do_fat_fswrite(cmd_tbl_t *cmdtp, int flag,
dev = dev_desc->dev;
- if (fat_register_device(dev_desc, part) != 0) {
+ if (fat_set_blk_dev(dev_desc, &info) != 0) {
printf("\n** Unable to use %s %d:%d for fatwrite **\n",
argv[1], dev, part);
return 1;