Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108577024
D34860.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
969 B
Referenced Files
None
Subscribers
None
D34860.diff
View Options
diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c
--- a/sys/compat/linprocfs/linprocfs.c
+++ b/sys/compat/linprocfs/linprocfs.c
@@ -1887,6 +1887,24 @@
return(0);
}
+/*
+ * Filler function for proc/sys/kernel/random/boot_id
+ */
+static int
+linprocfs_doboot_id(PFS_FILL_ARGS)
+{
+ static bool firstboot = 1;
+ static struct uuid uuid;
+
+ if (firstboot) {
+ kern_uuidgen(&uuid, 1);
+ firstboot = 0;
+ }
+ sbuf_printf_uuid(sb, &uuid);
+ sbuf_printf(sb, "\n");
+ return(0);
+}
+
/*
* Filler function for proc/pid/auxv
*/
@@ -2097,6 +2115,8 @@
dir = pfs_create_dir(dir, "random", NULL, NULL, NULL, 0);
pfs_create_file(dir, "uuid", &linprocfs_douuid,
NULL, NULL, NULL, PFS_RD);
+ pfs_create_file(dir, "boot_id", &linprocfs_doboot_id,
+ NULL, NULL, NULL, PFS_RD);
/* /proc/sys/vm/.... */
dir = pfs_create_dir(sys, "vm", NULL, NULL, NULL, 0);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 27, 1:26 PM (4 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16197556
Default Alt Text
D34860.diff (969 B)
Attached To
Mode
D34860: [linprocfs] add sys/kernel/random/boot_id
Attached
Detach File
Event Timeline
Log In to Comment