FreeBSD Bugzilla – Attachment 182818 Details for
Bug 219464
[PATCH] linux_getrandom always returns 0
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
linux_getrandom.patch
file_219464.txt (text/plain), 740 bytes, created by
Maciej Pasternacki
on 2017-05-22 20:21:57 UTC
(
hide
)
Description:
linux_getrandom.patch
Filename:
MIME Type:
Creator:
Maciej Pasternacki
Created:
2017-05-22 20:21:57 UTC
Size:
740 bytes
patch
obsolete
>Index: sys/compat/linux/linux_misc.c >=================================================================== >--- sys/compat/linux/linux_misc.c (revision 318646) >+++ sys/compat/linux/linux_misc.c (working copy) >@@ -2516,6 +2516,7 @@ > { > struct uio uio; > struct iovec iov; >+ int error; > > if (args->flags & ~(LINUX_GRND_NONBLOCK|LINUX_GRND_RANDOM)) > return (EINVAL); >@@ -2532,7 +2533,11 @@ > uio.uio_rw = UIO_READ; > uio.uio_td = td; > >- return (read_random_uio(&uio, args->flags & LINUX_GRND_NONBLOCK)); >+ error = (read_random_uio(&uio, args->flags & LINUX_GRND_NONBLOCK)); >+ if (error == 0) { >+ td->td_retval[0] = args->count - uio.uio_resid; >+ } >+ return (error); > } > > int
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 219464
: 182818