FreeBSD Bugzilla – Attachment 232322 Details for
Bug 262369
Linuxulator: add /proc/sys/kernel/random/boot_id
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to the kernel
random_boot_id.patch (text/plain), 1.04 KB, created by
Fernando ApesteguĂa
on 2022-03-08 14:19:50 UTC
(
hide
)
Description:
Patch to the kernel
Filename:
MIME Type:
Creator:
Fernando ApesteguĂa
Created:
2022-03-08 14:19:50 UTC
Size:
1.04 KB
patch
obsolete
>diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c >index 69da8f33a8f3..d33631e57558 100644 >--- a/sys/compat/linprocfs/linprocfs.c >+++ b/sys/compat/linprocfs/linprocfs.c >@@ -1885,6 +1885,24 @@ linprocfs_douuid(PFS_FILL_ARGS) > return(0); > } > >+/* >+ * Filler function for proc/sys/kernel/random/boot_id >+ */ >+static int >+linprocfs_doboot_id(PFS_FILL_ARGS) >+{ >+ static char 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 > */ >@@ -2067,6 +2085,8 @@ linprocfs_init(PFS_INIT_ARGS) > 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);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 262369
: 232322