summaryrefslogtreecommitdiffstats
path: root/sys/boot/i386
diff options
context:
space:
mode:
authorallanjude <allanjude@FreeBSD.org>2016-02-10 17:49:22 +0000
committerallanjude <allanjude@FreeBSD.org>2016-02-10 17:49:22 +0000
commitc68557a9bd7089609250f173b1b1bdb906f8d141 (patch)
tree3bfbf76753f2cb774e7a17aebaebe4bec5db2f85 /sys/boot/i386
parentab8cd691029d03339e2c5ca0d056aae390b2e7ac (diff)
downloadFreeBSD-src-c68557a9bd7089609250f173b1b1bdb906f8d141.zip
FreeBSD-src-c68557a9bd7089609250f173b1b1bdb906f8d141.tar.gz
Catch the EFI loader up to the latest ZFS Boot Environment Menu features
MFC: r294072 Move init_zfs_bootenv to sys/boot/zfs/zfs.c instead of having a copy in each loader MFC: r294073 Connect the ZFS boot environment menu to the UEFI loader MFC: r295357 Do not set vfs.root.mountfrom unnecessarily when initializing ZFS BE menu Approved by: re (marius) Relnotes: yes Sponsored by: ScaleEngine Inc.
Diffstat (limited to 'sys/boot/i386')
-rw-r--r--sys/boot/i386/loader/main.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/sys/boot/i386/loader/main.c b/sys/boot/i386/loader/main.c
index be08271..6e783cd 100644
--- a/sys/boot/i386/loader/main.c
+++ b/sys/boot/i386/loader/main.c
@@ -69,7 +69,6 @@ static int isa_inb(int port);
static void isa_outb(int port, int value);
void exit(int code);
#ifdef LOADER_ZFS_SUPPORT
-static void init_zfs_bootenv(char *currdev);
static void i386_zfs_probe(void);
#endif
@@ -303,34 +302,6 @@ extract_currdev(void)
env_nounset);
}
-#ifdef LOADER_ZFS_SUPPORT
-static void
-init_zfs_bootenv(char *currdev)
-{
- char *beroot;
-
- if (strlen(currdev) == 0)
- return;
- if(strncmp(currdev, "zfs:", 4) != 0)
- return;
- /* Remove the trailing : */
- currdev[strlen(currdev) - 1] = '\0';
- setenv("zfs_be_active", currdev, 1);
- setenv("zfs_be_currpage", "1", 1);
- /* Do not overwrite if already set */
- setenv("vfs.root.mountfrom", currdev, 0);
- /* Forward past zfs: */
- currdev = strchr(currdev, ':');
- currdev++;
- /* Remove the last element (current bootenv) */
- beroot = strrchr(currdev, '/');
- if (beroot != NULL)
- beroot[0] = '\0';
- beroot = currdev;
- setenv("zfs_be_root", beroot, 1);
-}
-#endif
-
COMMAND_SET(reboot, "reboot", "reboot the system", command_reboot);
static int
OpenPOWER on IntegriCloud