mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-25 10:01:02 +01:00
For FreeBSD 4 binaries, when trying to read from a device that does
not exsist, do not have ioctl return an error, but instead set -1 in the data returned to the user. This allows the HP bios flash utilities to work without requiring changes to their code. Reviewed by: jhb
This commit is contained in:
parent
89b9c5360e
commit
8910aa92ae
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=149478
@ -28,6 +28,7 @@
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include "opt_bus.h" /* XXX trim includes */
|
||||
#include "opt_compat.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -411,7 +412,13 @@ getconfexit:
|
||||
io->pi_width);
|
||||
error = 0;
|
||||
} else {
|
||||
error = ENODEV;
|
||||
#ifdef COMPAT_FREEBSD4
|
||||
if (cmd == PCIOCREAD) {
|
||||
io->pi_data = -1;
|
||||
error = 0;
|
||||
} else
|
||||
#endif
|
||||
error = ENODEV;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user