FreeBSD Bugzilla – Attachment 139840 Details for
Bug 186187
[linprocfs] [patch] emulate /proc/sys/kernel/random/uuid
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
linprocfs-random-uuid.patch
linprocfs-random-uuid.patch (text/plain), 900 bytes, created by
Fernando ApesteguĂa
on 2014-01-28 22:15:01 UTC
(
hide
)
Description:
linprocfs-random-uuid.patch
Filename:
MIME Type:
Creator:
Fernando ApesteguĂa
Created:
2014-01-28 22:15:01 UTC
Size:
900 bytes
patch
obsolete
>--- linprocfs.c.orig 2013-11-06 18:59:41.000000000 +0100 >+++ linprocfs.c 2014-01-28 23:09:46.000000000 +0100 >@@ -72,6 +72,7 @@ > #include <sys/time.h> > #include <sys/tty.h> > #include <sys/user.h> >+#include <sys/uuid.h> > #include <sys/vmmeter.h> > #include <sys/vnode.h> > #include <sys/bus.h> >@@ -1347,6 +1348,23 @@ > return (0); > } > >+ >+/* >+ * Filler function for proc/sys/kernel/random/uuid >+ */ >+static int >+linprocfs_douuid(PFS_FILL_ARGS) >+{ >+ struct uuid uuid; >+ >+ kern_uuidgen(&uuid, 1); >+ >+ sbuf_printf_uuid(sb, &uuid); >+ sbuf_printf(sb, "\n"); >+ >+ return(0); >+} >+ > /* > * Constructor > */ >@@ -1446,6 +1464,11 @@ > pfs_create_file(dir, "sem", &linprocfs_dosem, > NULL, NULL, NULL, PFS_RD); > >+ /* /proc/sys/kernel/random/... */ >+ dir = pfs_create_dir(dir, "random", NULL, NULL, NULL, 0); >+ pfs_create_file(dir, "uuid", &linprocfs_douuid, >+ NULL, NULL, NULL, PFS_RD); >+ > return (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 186187
:
139839
| 139840