Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Oct 2012 15:51:00 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r242232 - stable/9/sys/boot/i386/loader
Message-ID:  <201210281551.q9SFp0Rb042716@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Sun Oct 28 15:51:00 2012
New Revision: 242232
URL: http://svn.freebsd.org/changeset/base/242232

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

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

Modified: stable/9/sys/boot/i386/loader/main.c
==============================================================================
--- stable/9/sys/boot/i386/loader/main.c	Sun Oct 28 15:48:15 2012	(r242231)
+++ stable/9/sys/boot/i386/loader/main.c	Sun Oct 28 15:51:00 2012	(r242232)
@@ -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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210281551.q9SFp0Rb042716>