summaryrefslogtreecommitdiff
path: root/include/fat.h
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2020-12-31 00:38:13 +0100
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2020-12-31 14:32:27 +0100
commitc0029e4e25c10d627f4bff62cdb4074bb2c7eaf7 (patch)
treea7383efef0e84fc0eac5386eadd10c2fd8ee0c09 /include/fat.h
parentd0be67657d64523b4499d385390c08c2bafab1bc (diff)
fs/fat: implement fsuuid command
The FAT file system does not have a UUID but a 4 byte volume ID. Let the fsuuid command show it in XXXX-XXXX format. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'include/fat.h')
-rw-r--r--include/fat.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/fat.h b/include/fat.h
index 8cae283030..b9f273f381 100644
--- a/include/fat.h
+++ b/include/fat.h
@@ -212,4 +212,16 @@ int fat_unlink(const char *filename);
int fat_mkdir(const char *dirname);
void fat_close(void);
void *fat_next_cluster(fat_itr *itr, unsigned int *nbytes);
+
+/**
+ * fat_uuid() - get FAT volume ID
+ *
+ * The FAT volume ID returned in @uuid_str as hexadecimal number in XXXX-XXXX
+ * format.
+ *
+ * @uuid_str: caller allocated buffer of at least 10 bytes for the volume ID
+ * Return: 0 on success
+ */
+int fat_uuid(char *uuid_str);
+
#endif /* _FAT_H_ */