Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F132683132
D51421.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1008 B
Referenced Files
None
Subscribers
None
D51421.diff
View Options
diff --git a/sbin/devd/devd.cc b/sbin/devd/devd.cc
--- a/sbin/devd/devd.cc
+++ b/sbin/devd/devd.cc
@@ -153,6 +153,8 @@
static const char *configfile = CF;
+static char vm_guest[80];
+
static void devdlog(int priority, const char* message, ...)
__printflike(2, 3);
static void event_loop(void);
@@ -867,6 +869,8 @@
cfg.set_variable("timestamp", timestr);
free(timestr);
+ cfg.set_variable("vm_guest", vm_guest);
+
// Match doesn't have a device, and the format is a little
// different, so handle it separately.
switch (type) {
@@ -1322,6 +1326,7 @@
main(int argc, char **argv)
{
int ch;
+ size_t len;
check_devd_enabled();
while ((ch = getopt(argc, argv, "df:l:nq")) != -1) {
@@ -1346,6 +1351,13 @@
}
}
+ len = sizeof(vm_guest);
+ if (sysctlbyname("kern.vm_guest", vm_guest, &len, NULL, 0) < 0) {
+ devdlog(LOG_ERR,
+ "sysctlnametomib(kern.vm_guest) failed: %d\n",
+ errno);
+ }
+
cfg.parse();
if (!no_daemon && daemonize_quick) {
cfg.open_pidfile();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Oct 20, 12:45 AM (11 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
23950487
Default Alt Text
D51421.diff (1008 B)
Attached To
Mode
D51421: devd: Add vm_guest variable
Attached
Detach File
Event Timeline
Log In to Comment