svn commit: r242233 - stable/8/sys/boot/i386/loader

Andriy Gapon avg at FreeBSD.org
Sun Oct 28 15:51:15 UTC 2012


Author: avg
Date: Sun Oct 28 15:51:15 2012
New Revision: 242233
URL: http://svn.freebsd.org/changeset/base/242233

Log:
  MFC r241284: zfs boot: add lszfs command to i386 loader

Modified:
  stable/8/sys/boot/i386/loader/main.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/boot/   (props changed)

Modified: stable/8/sys/boot/i386/loader/main.c
==============================================================================
--- stable/8/sys/boot/i386/loader/main.c	Sun Oct 28 15:51:00 2012	(r242232)
+++ stable/8/sys/boot/i386/loader/main.c	Sun Oct 28 15:51:15 2012	(r242233)
@@ -322,6 +322,29 @@ command_heap(int argc, char *argv[])
     return(CMD_OK);
 }
 
+#ifdef LOADER_ZFS_SUPPORT
+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 = "wrong number of arguments";
+	return (CMD_ERROR);
+    }
+
+    err = zfs_list(argv[1]);
+    if (err != 0) {
+	command_errmsg = strerror(err);
+	return (CMD_ERROR);
+    }
+    return (CMD_OK);
+}
+#endif
+
 /* ISA bus access functions for PnP. */
 static int
 isa_inb(int port)


More information about the svn-src-stable-8 mailing list