mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-20 17:52:52 +00:00
libc: add support for FreeBSDs KERN_ARND sysctl
Provide FreeBSDs KERN_ARND systemctl by calling getentropy(). To use it, configure an RNG via the `rng` libc runtime parameter. Ref #4997
This commit is contained in:
parent
aa5751b7fc
commit
37a6669e71
@ -1,11 +1,12 @@
|
||||
/*
|
||||
* \brief Sysctl facade
|
||||
* \author Emery Hemingway
|
||||
* \author Benjamin Lamowski
|
||||
* \date 2016-04-27
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2016-2019 Genode Labs GmbH
|
||||
* Copyright (C) 2016-2023 Genode Labs GmbH
|
||||
*
|
||||
* This file is part of the Genode OS framework, which is distributed
|
||||
* under the terms of the GNU Affero General Public License version 3.
|
||||
@ -84,6 +85,10 @@ extern "C" int __sysctl(const int *name, u_int namelen,
|
||||
/* builtins */
|
||||
{
|
||||
switch(index_a) {
|
||||
case CTL_KERN: switch(index_b) {
|
||||
case KERN_ARND:
|
||||
return getentropy(oldp, *oldlenp);
|
||||
}
|
||||
case CTL_HW: switch(index_b) {
|
||||
|
||||
case HW_REALMEM:
|
||||
|
Loading…
x
Reference in New Issue
Block a user