diff options
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/ext4fs.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/fs/ext4/ext4fs.c b/fs/ext4/ext4fs.c index cbdc22026d..87d5128518 100644 --- a/fs/ext4/ext4fs.c +++ b/fs/ext4/ext4fs.c @@ -231,3 +231,18 @@ int ext4_read_file(const char *filename, void *buf, int offset, int len) return len_read; } + +int ext4fs_uuid(char *uuid_str) +{ + if (ext4fs_root == NULL) + return -1; + +#ifdef CONFIG_LIB_UUID + uuid_bin_to_str((unsigned char *)ext4fs_root->sblock.unique_id, + uuid_str, UUID_STR_FORMAT_STD); + + return 0; +#else + return -ENOSYS; +#endif +} |