Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F170754804
D59226.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D59226.id.diff
View Options
diff --git a/usr.sbin/bhyveload/bhyveload.8 b/usr.sbin/bhyveload/bhyveload.8
--- a/usr.sbin/bhyveload/bhyveload.8
+++ b/usr.sbin/bhyveload/bhyveload.8
@@ -23,7 +23,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd January 12, 2024
+.Dd August 27, 2026
.Dt BHYVELOAD 8
.Os
.Sh NAME
@@ -41,6 +41,7 @@
.Op Fl h Ar host-path
.Op Fl l Ar os-loader
.Op Fl m Ar memsize Ns Op Ar K|k|M|m|G|g|T|t
+.Op Fl n
.Ar vmname
.Sh DESCRIPTION
.Nm
@@ -119,6 +120,8 @@
.Pp
.Ar memsize
defaults to 256M.
+.It Fl n
+Non-interactive mode: exit when the loader asks for user input.
.It Fl C
Include guest memory in the core file when
.Nm
diff --git a/usr.sbin/bhyveload/bhyveload.c b/usr.sbin/bhyveload/bhyveload.c
--- a/usr.sbin/bhyveload/bhyveload.c
+++ b/usr.sbin/bhyveload/bhyveload.c
@@ -104,6 +104,7 @@
static int ndisks;
static int consin_fd, consout_fd;
static int hostbase_fd = -1;
+static int non_interactive = 0;
static void *loader_hdl;
static char *loader;
@@ -135,6 +136,11 @@
{
char c;
+ if (non_interactive) {
+ warnx("user input requested in non-interactive mode");
+ cb_exit(NULL, 1);
+ }
+
if (read(consin_fd, &c, 1) == 1)
return (c);
return (-1);
@@ -737,7 +743,7 @@
fprintf(stderr,
"usage: %s [-S][-c <console-device>] [-d <disk-path>] [-e <name=value>]\n"
- " %*s [-h <host-path>] [-m memsize[K|k|M|m|G|g|T|t]] <vmname>\n",
+ " %*s [-h <host-path>] [-m memsize[K|k|M|m|G|g|T|t]] [-n] <vmname>\n",
progname,
(int)strlen(progname), "");
exit(1);
@@ -801,7 +807,7 @@
consin_fd = STDIN_FILENO;
consout_fd = STDOUT_FILENO;
- while ((opt = getopt(argc, argv, "CSc:d:e:h:l:m:")) != -1) {
+ while ((opt = getopt(argc, argv, "CSc:d:e:h:l:m:n")) != -1) {
switch (opt) {
case 'c':
error = altcons_open(optarg);
@@ -839,6 +845,9 @@
if (error != 0)
errx(EX_USAGE, "Invalid memsize '%s'", optarg);
break;
+ case 'n':
+ non_interactive = 1;
+ break;
case 'C':
memflags |= VM_MEM_F_INCORE;
break;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Sep 7, 10:36 AM (3 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38002535
Default Alt Text
D59226.id.diff (2 KB)
Attached To
Mode
D59226: bhyveload: add non-interactive mode
Attached
Detach File
Event Timeline
Log In to Comment