diff options
author | Serj Kalichev <serj.kalichev@gmail.com> | 2013-11-19 16:30:06 +0400 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2014-03-13 19:58:20 -0700 |
commit | 386b59e18deb2e759c14ecdcaab8a4b589a3ad63 (patch) | |
tree | faa4411634f3791a4eeaadea5250a26b235b1f67 /core/fs/fs.c | |
parent | 8bbb10b70905339b7ca6b58d6833b6a95ab03dae (diff) | |
download | syslinux-386b59e18deb2e759c14ecdcaab8a4b589a3ad63.tar.gz |
Add filesystem UUID to SYSAPPEND for FAT
Filesystem UUID shows the partition we boot kernel from.
The kernel parameter has format like FSUUID=DA1A-0B2E.
The SYSAPPEND bit is 0x40000. Now the FAT only supports FSUUID.
The patch is based on 67aaaeeb228.
Signed-off-by: Serj Kalichev <serj.kalichev@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'core/fs/fs.c')
-rw-r--r-- | core/fs/fs.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/core/fs/fs.c b/core/fs/fs.c index 8c1feeac..6965d1da 100644 --- a/core/fs/fs.c +++ b/core/fs/fs.c @@ -5,6 +5,7 @@ #include <unistd.h> #include <fcntl.h> #include <dprintf.h> +#include <syslinux/sysappend.h> #include "core.h" #include "dev.h" #include "fs.h" @@ -374,6 +375,13 @@ __export void close_file(uint16_t handle) } } +__export char *fs_uuid(void) +{ + if (!this_fs || !this_fs->fs_ops || !this_fs->fs_ops->fs_uuid) + return NULL; + return this_fs->fs_ops->fs_uuid(this_fs); +} + /* * it will do: * initialize the memory management function; @@ -440,4 +448,8 @@ void fs_init(const struct fs_ops **ops, void *priv) SectorShift = fs.sector_shift; SectorSize = fs.sector_size; + + /* Add FSUUID=... string to cmdline */ + sysappend_set_fs_uuid(); + } |