[U-Boot] [PATCH] fs: make it possible to read the filesystem UUID
Simon Glass
sjg at chromium.org
Tue Nov 4 19:41:38 CET 2014
Hi Christian,
On 3 November 2014 02:47, Christian Gmeiner <christian.gmeiner at gmail.com> wrote:
> Hi Simon,
[snip]
>>> +
>>> + if (argc == 4)
>>> + setenv(argv[3], uuid);
>>> + else
>>> + printf("%s\n", uuid);
>>> +
>>> + return 0;
>>> +}
>>> diff --git a/include/ext4fs.h b/include/ext4fs.h
>>> index 6c419f3..19816de 100644
>>> --- a/include/ext4fs.h
>>> +++ b/include/ext4fs.h
>>> @@ -137,6 +137,7 @@ void ext4fs_reinit_global(void);
>>> int ext4fs_ls(const char *dirname);
>>> int ext4fs_exists(const char *filename);
>>> int ext4fs_size(const char *filename);
>>> +int ext4fs_uuid(char *uuid_str);
>>> void ext4fs_free_node(struct ext2fs_node *node, struct ext2fs_node *currroot);
>>> int ext4fs_devread(lbaint_t sector, int byte_offset, int byte_len, char *buf);
>>> void ext4fs_set_blk_dev(block_dev_desc_t *rbdd, disk_partition_t *info);
>>> diff --git a/include/fs.h b/include/fs.h
>>> index 06a45f2..41082b3 100644
>>> --- a/include/fs.h
>>> +++ b/include/fs.h
>>> @@ -92,5 +92,7 @@ int file_exists(const char *dev_type, const char *dev_part, const char *file,
>>> int fstype);
>>> int do_save(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
>>> int fstype);
>>> +int do_fs_uuid(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
>>> + int fstype);
>>
>> Can you please add a function comment for this?
>
> Yes I will add one - directly here in the .h file?
Yes I think so - this is where the API is
Regards,
Simon
More information about the U-Boot
mailing list