socsvn commit: r329069 - soc2017/kneitinger/libbe-head/sbin/be
kneitinger at FreeBSD.org
kneitinger at FreeBSD.org
Sun Nov 5 09:12:18 UTC 2017
Author: kneitinger
Date: Sun Nov 5 09:12:17 2017
New Revision: 329069
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=329069
Log:
Change `be init` command to `be add`
Modified:
soc2017/kneitinger/libbe-head/sbin/be/Makefile
soc2017/kneitinger/libbe-head/sbin/be/be.c
Modified: soc2017/kneitinger/libbe-head/sbin/be/Makefile
==============================================================================
--- soc2017/kneitinger/libbe-head/sbin/be/Makefile Sun Nov 5 08:31:25 2017 (r329068)
+++ soc2017/kneitinger/libbe-head/sbin/be/Makefile Sun Nov 5 09:12:17 2017 (r329069)
@@ -5,5 +5,6 @@
MAN= be.1
LIBADD+= be
+LIBADD+= nv
.include <bsd.prog.mk>
Modified: soc2017/kneitinger/libbe-head/sbin/be/be.c
==============================================================================
--- soc2017/kneitinger/libbe-head/sbin/be/be.c Sun Nov 5 08:31:25 2017 (r329068)
+++ soc2017/kneitinger/libbe-head/sbin/be/be.c Sun Nov 5 09:12:17 2017 (r329069)
@@ -32,11 +32,13 @@
#include <errno.h>
#include <stdbool.h>
#include <stdio.h>
+#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <sysexits.h>
#include <unistd.h>
+#include <sys/nv.h>
#include <be.h>
static int be_cmd_activate(int argc, char *argv[]);
@@ -44,7 +46,7 @@
static int be_cmd_destroy(int argc, char *argv[]);
static int be_cmd_export(int argc, char *argv[]);
static int be_cmd_import(int argc, char *argv[]);
-static int be_cmd_init(int argc, char *argv[]);
+static int be_cmd_add(int argc, char *argv[]);
static int be_cmd_jail(int argc, char *argv[]);
static int be_cmd_list(int argc, char *argv[]);
static int be_cmd_mount(int argc, char *argv[]);
@@ -67,7 +69,7 @@
"\tbe destroy [-F] beName | beName at snapshot⟩\n"
"\tbe export sourceBe\n"
"\tbe import targetBe\n"
- "\tbe init (path)*\n"
+ "\tbe add (path)*\n"
"\tbe jail bootenv\n"
"\tbe list [-a] [-D] [-H] [-s]\n"
"\tbe mount beName [mountpoint]\n"
@@ -95,7 +97,7 @@
{ "destroy", be_cmd_destroy },
{ "export", be_cmd_export },
{ "import", be_cmd_import },
- { "init", be_cmd_init },
+ { "add", be_cmd_add },
{ "jail", be_cmd_jail },
{ "list", be_cmd_list },
{ "mount", be_cmd_mount },
@@ -301,12 +303,12 @@
static int
-be_cmd_init(int argc, char *argv[])
+be_cmd_add(int argc, char *argv[])
{
char *bootenv;
if (argc < 2) {
- fprintf(stderr, "be init: must provide at least one path\n");
+ fprintf(stderr, "be add: must provide at least one path\n");
return (usage(false));
}
@@ -418,6 +420,7 @@
int opt;
bool show_all_datasets, show_space, hide_headers, show_snaps;
char *bootenv;
+ nvlist_t *props;
show_all_datasets = show_space = hide_headers = show_snaps = false;
while ((opt = getopt(argc, argv, "aDHs")) != -1) {
@@ -448,6 +451,8 @@
return (usage(false));
}
+ //props = be_get_bootenv_props(be);
+
return (0);
}
More information about the svn-soc-all
mailing list