Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F109839585
D28783.id84237.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D28783.id84237.diff
View Options
Index: etc/mtree/BSD.var.dist
===================================================================
--- etc/mtree/BSD.var.dist
+++ etc/mtree/BSD.var.dist
@@ -74,6 +74,8 @@
preserve
..
run
+ bhyve
+ ..
dhclient
..
ppp gname=network mode=0770
Index: share/man/man7/hier.7
===================================================================
--- share/man/man7/hier.7
+++ share/man/man7/hier.7
@@ -28,7 +28,7 @@
.\" @(#)hier.7 8.1 (Berkeley) 6/5/93
.\" $FreeBSD$
.\"
-.Dd January 9, 2021
+.Dd February 18, 2021
.Dt HIER 7
.Os
.Sh NAME
@@ -832,6 +832,8 @@
system since it was booted
.Pp
.Bl -tag -width Fl -compact
+.It Pa bhyve/
+bhyve vm unix domain sockets
.It Pa ppp/
writable by the
.Dq network
Index: usr.sbin/bhyve/snapshot.h
===================================================================
--- usr.sbin/bhyve/snapshot.h
+++ usr.sbin/bhyve/snapshot.h
@@ -42,6 +42,7 @@
#include <libxo/xo.h>
#include <ucl.h>
+#define BHYVE_RUN_DIR "/var/run/bhyve/"
#define MAX_SNAPSHOT_VMNAME 100
struct vmctx;
Index: usr.sbin/bhyve/snapshot.c
===================================================================
--- usr.sbin/bhyve/snapshot.c
+++ usr.sbin/bhyve/snapshot.c
@@ -115,8 +115,6 @@
#define SNAPSHOT_CHUNK (4 * MB)
#define PROG_BUF_SZ (8192)
-#define BHYVE_RUN_DIR "/var/run/bhyve"
-#define CHECKPOINT_RUN_DIR BHYVE_RUN_DIR "/checkpoint"
#define MAX_VMNAME 100
#define MAX_MSG_SIZE 1024
@@ -1505,26 +1503,6 @@
return (NULL);
}
-/*
- * Create directory tree to store runtime specific information:
- * i.e. UNIX sockets for IPC with bhyvectl.
- */
-static int
-make_checkpoint_dir(void)
-{
- int err;
-
- err = mkdir(BHYVE_RUN_DIR, 0755);
- if (err < 0 && errno != EEXIST)
- return (err);
-
- err = mkdir(CHECKPOINT_RUN_DIR, 0755);
- if (err < 0 && errno != EEXIST)
- return (err);
-
- return 0;
-}
-
/*
* Create the listening socket for IPC with bhyvectl
*/
@@ -1556,12 +1534,6 @@
goto fail;
}
- err = make_checkpoint_dir();
- if (err < 0) {
- perror("Failed to create checkpoint runtime directory");
- goto fail;
- }
-
addr.sun_family = AF_UNIX;
err = vm_get_name(ctx, vmname_buf, MAX_VMNAME - 1);
@@ -1570,8 +1542,8 @@
goto fail;
}
- snprintf(addr.sun_path, sizeof(addr.sun_path), "%s/%s",
- CHECKPOINT_RUN_DIR, vmname_buf);
+ snprintf(addr.sun_path, sizeof(addr.sun_path), "%s%s",
+ BHYVE_RUN_DIR, vmname_buf);
addr.sun_len = SUN_LEN(&addr);
unlink(addr.sun_path);
Index: usr.sbin/bhyvectl/bhyvectl.c
===================================================================
--- usr.sbin/bhyvectl/bhyvectl.c
+++ usr.sbin/bhyvectl/bhyvectl.c
@@ -74,7 +74,6 @@
#define NO_ARG no_argument
#define OPT_ARG optional_argument
-#define CHECKPOINT_RUN_DIR "/var/run/bhyve/checkpoint"
#define MAX_VMNAME 100
static const char *progname;
@@ -1708,7 +1707,7 @@
goto done;
}
- snprintf(addr.sun_path, sizeof(addr.sun_path), "%s/%s", CHECKPOINT_RUN_DIR, vmname_buf);
+ snprintf(addr.sun_path, sizeof(addr.sun_path), "%s%s", BHYVE_RUN_DIR, vmname_buf);
if (connect(socket_fd, (struct sockaddr *)&addr,
sizeof(struct sockaddr_un)) != 0) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Feb 11, 5:04 AM (6 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16589145
Default Alt Text
D28783.id84237.diff (3 KB)
Attached To
Mode
D28783: bhyve/snapshot: drop mkdir when creating the unix domain socket
Attached
Detach File
Event Timeline
Log In to Comment