diff options
author | H. Peter Anvin <hpa@zytor.com> | 2012-06-20 16:08:53 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2012-06-20 16:08:53 -0700 |
commit | 3f51f9e151e1a0829ae6321320baa3b6e7c61877 (patch) | |
tree | 2851149ab46ad263acfea3a570a59ad3aacdbbd4 /extlinux | |
parent | 6be9e52dcb80c910373cc8eaade2de13b0afed00 (diff) | |
download | syslinux-3f51f9e151e1a0829ae6321320baa3b6e7c61877.tar.gz syslinux-3f51f9e151e1a0829ae6321320baa3b6e7c61877.tar.xz syslinux-3f51f9e151e1a0829ae6321320baa3b6e7c61877.zip |
extlinux: add --device option to override device detect
Add a --device option for scripts and expert users to override the
device detection.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'extlinux')
-rw-r--r-- | extlinux/main.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/extlinux/main.c b/extlinux/main.c index 63751669..73f3fbe1 100644 --- a/extlinux/main.c +++ b/extlinux/main.c @@ -1028,9 +1028,14 @@ static const char *get_devname(const char *path) return devname; } - if (fs_type == BTRFS) { - /* For btrfs try to get the device name from btrfs itself */ - devname = find_device_btrfs(path); + if (opt.device) + devname = opt.device; + + if (!devname){ + if (fs_type == BTRFS) { + /* For btrfs try to get the device name from btrfs itself */ + devname = find_device_btrfs(path); + } } if (!devname) { |