]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - fs/fs.c
env: Rename common functions related to setenv()
[people/ms/u-boot.git] / fs / fs.c
diff --git a/fs/fs.c b/fs/fs.c
index d123d29a0808fe6e14b4f19214d69290aeb13471..055dffdafdf023fa39bd4865550630537a988652 100644 (file)
--- a/fs/fs.c
+++ b/fs/fs.c
 
 DECLARE_GLOBAL_DATA_PTR;
 
-static block_dev_desc_t *fs_dev_desc;
+static struct blk_desc *fs_dev_desc;
 static disk_partition_t fs_partition;
 static int fs_type = FS_TYPE_ANY;
 
-static inline int fs_probe_unsupported(block_dev_desc_t *fs_dev_desc,
+static inline int fs_probe_unsupported(struct blk_desc *fs_dev_desc,
                                      disk_partition_t *fs_partition)
 {
        printf("** Unrecognized filesystem type **\n");
@@ -81,7 +81,7 @@ struct fstype_info {
         * filesystem.
         */
        bool null_dev_desc_ok;
-       int (*probe)(block_dev_desc_t *fs_dev_desc,
+       int (*probe)(struct blk_desc *fs_dev_desc,
                     disk_partition_t *fs_partition);
        int (*ls)(const char *dirname);
        int (*exists)(const char *filename);
@@ -213,7 +213,7 @@ int fs_set_blk_dev(const char *ifname, const char *dev_part_str, int fstype)
        }
 #endif
 
-       part = get_device_and_partition(ifname, dev_part_str, &fs_dev_desc,
+       part = blk_get_device_part_str(ifname, dev_part_str, &fs_dev_desc,
                                        &fs_partition, 1);
        if (part < 0)
                return -1;
@@ -348,7 +348,7 @@ int do_size(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
        if (fs_size(argv[3], &size) < 0)
                return CMD_RET_FAILURE;
 
-       setenv_hex("filesize", size);
+       env_set_hex("filesize", size);
 
        return 0;
 }
@@ -417,8 +417,8 @@ int do_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
        }
        puts("\n");
 
-       setenv_hex("fileaddr", addr);
-       setenv_hex("filesize", len_read);
+       env_set_hex("fileaddr", addr);
+       env_set_hex("filesize", len_read);
 
        return 0;
 }
@@ -509,7 +509,7 @@ int do_fs_uuid(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
                return CMD_RET_FAILURE;
 
        if (argc == 4)
-               setenv(argv[3], uuid);
+               env_set(argv[3], uuid);
        else
                printf("%s\n", uuid);
 
@@ -529,7 +529,7 @@ int do_fs_type(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
        info = fs_get_info(fs_type);
 
        if (argc == 4)
-               setenv(argv[3], info->name);
+               env_set(argv[3], info->name);
        else
                printf("%s\n", info->name);