diff options
author | Warner Losh <imp@FreeBSD.org> | 2018-02-21 15:57:36 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2018-02-21 15:57:36 +0000 |
commit | 4784aef9f55a4c8284ee951bb30b70f9ba8b7698 (patch) | |
tree | 59fd304ab93a562898f38da81dbb66e185c11a1c /stand/userboot | |
parent | 18587b84c53f716a8e7220d2ecadafdad5eefd30 (diff) | |
download | src-test2-4784aef9f55a4c8284ee951bb30b70f9ba8b7698.tar.gz src-test2-4784aef9f55a4c8284ee951bb30b70f9ba8b7698.zip |
Notes
Diffstat (limited to 'stand/userboot')
-rw-r--r-- | stand/userboot/userboot/main.c | 65 |
1 files changed, 1 insertions, 64 deletions
diff --git a/stand/userboot/userboot/main.c b/stand/userboot/userboot/main.c index 95bff1745a0f..00ca2433b0a7 100644 --- a/stand/userboot/userboot/main.c +++ b/stand/userboot/userboot/main.c @@ -218,70 +218,7 @@ userboot_zfs_probe(void) userboot_zfs_found = 1; } } - -COMMAND_SET(lszfs, "lszfs", "list child datasets of a zfs dataset", - command_lszfs); - -static int -command_lszfs(int argc, char *argv[]) -{ - int err; - - if (argc != 2) { - command_errmsg = "a single dataset must be supplied"; - return (CMD_ERROR); - } - - err = zfs_list(argv[1]); - if (err != 0) { - command_errmsg = strerror(err); - return (CMD_ERROR); - } - return (CMD_OK); -} - -COMMAND_SET(reloadbe, "reloadbe", "refresh the list of ZFS Boot Environments", - command_reloadbe); - -static int -command_reloadbe(int argc, char *argv[]) -{ - int err; - char *root; - - if (argc > 2) { - command_errmsg = "wrong number of arguments"; - return (CMD_ERROR); - } - - if (argc == 2) { - err = zfs_bootenv(argv[1]); - } else { - root = getenv("zfs_be_root"); - if (root == NULL) { - return (CMD_OK); - } - err = zfs_bootenv(root); - } - - if (err != 0) { - command_errmsg = strerror(err); - return (CMD_ERROR); - } - - return (CMD_OK); -} - -uint64_t -ldi_get_size(void *priv) -{ - int fd = (uintptr_t) priv; - uint64_t size; - - ioctl(fd, DIOCGMEDIASIZE, &size); - return (size); -} -#endif /* USERBOOT_ZFS_SUPPORT */ +#endif COMMAND_SET(quit, "quit", "exit the loader", command_quit); |