fix pnpinfo on arch=amd64

Garrett Cooper gcooper at FreeBSD.org
Sun Oct 24 02:56:07 UTC 2010


On Sat, Oct 23, 2010 at 5:22 PM, Alexander Best <arundel at freebsd.org> wrote:
> this tiny patch will fix pnpinfo so it doesn't core dump (bus error) any
> longer on arch=amd64.

1. I had to modify the Makefile to get it to work.
2. FWIW, I don't there's really much point in adding a check for only
x86 architectures, if the tool is capable of more than that.
3. Might as well close the file descriptor after opening it.

SIGBUS occurs because it doesn't have permission to write via outb.
It's a shame that there isn't a more proper way to catch this SIGBUS
fault minus adding a SIGBUS handler (but that might have other
undesired side effects).
Thanks,
-Garrett
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pnpinfo-improvements.patch
Type: text/x-patch
Size: 1161 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20101024/ac0871f1/pnpinfo-improvements.bin


More information about the freebsd-hackers mailing list