Quoting ron minnich rminnich@gmail.com:
A few things caught my eye:
- if (iopl(3)) { printf("You need to be root.\n"); exit(1); }
Just use perror. This is going to be confusing if there is an error and you're running as root :-)
There are a few cases where there are pci cleanups and frees and such and then an immediate exit. I applaud the sentiment but, really, you're just as safe exiting without the cleanup. Just a thought ...
thanks, this is neat stuff.
ron
Ok, I changed the printf to perror and removed the pci frees and cleanups from the errors and just left it on the main function. Attached is the revised patch.
Signed-off-by: Joseph Smith joe@smittys.pointclark.net
Thanks - Joe