From 5e8f98319d8582d6a066610b5f1ec9b1a3f79704 Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Wed, 17 Oct 2012 06:44:59 +0000 Subject: FAT: implement fat_set_blk_dev(), convert cmd_fat.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Benoît Thébaudeau --- common/cmd_fat.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'common/cmd_fat.c') diff --git a/common/cmd_fat.c b/common/cmd_fat.c index 5a5698b056..c38302d447 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; -- cgit v1.2.3