sync with OpenBSD -current
This commit is contained in:
parent
d56bde2791
commit
c0bca71075
26 changed files with 761 additions and 762 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: acpipwrres.c,v 1.14 2024/07/14 10:48:55 kettenis Exp $ */
|
||||
/* $OpenBSD: acpipwrres.c,v 1.15 2024/08/02 09:28:35 kettenis Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2013 Martin Pieuchot <mpi@openbsd.org>
|
||||
|
@ -148,7 +148,7 @@ acpipwrres_activate(struct device *self, int act)
|
|||
struct acpipwrres_softc *sc = (struct acpipwrres_softc *)self;
|
||||
|
||||
switch (act) {
|
||||
case DVACT_SUSPEND:
|
||||
case DVACT_POWERDOWN:
|
||||
if (sc->sc_cons_ref == 0 && sc->sc_state != ACPIPWRRES_OFF) {
|
||||
aml_evalname(sc->sc_acpi, sc->sc_devnode, "_OFF", 0,
|
||||
NULL, NULL);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: rnd.c,v 1.228 2024/06/14 10:17:05 claudio Exp $ */
|
||||
/* $OpenBSD: rnd.c,v 1.229 2024/08/02 01:53:21 guenther Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2011,2020 Theo de Raadt.
|
||||
|
@ -75,6 +75,7 @@
|
|||
#include <sys/msgbuf.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/syscallargs.h>
|
||||
#include <sys/syslimits.h>
|
||||
|
||||
#include <crypto/sha2.h>
|
||||
|
||||
|
@ -814,11 +815,11 @@ sys_getentropy(struct proc *p, void *v, register_t *retval)
|
|||
syscallarg(void *) buf;
|
||||
syscallarg(size_t) nbyte;
|
||||
} */ *uap = v;
|
||||
char buf[256];
|
||||
char buf[GETENTROPY_MAX];
|
||||
int error;
|
||||
|
||||
if (SCARG(uap, nbyte) > sizeof(buf))
|
||||
return (EIO);
|
||||
return (EINVAL);
|
||||
arc4random_buf(buf, SCARG(uap, nbyte));
|
||||
if ((error = copyout(buf, SCARG(uap, buf), SCARG(uap, nbyte))) != 0)
|
||||
return (error);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue