From 0ff387396e738dc73c44daeab2659be2154ed750 Mon Sep 17 00:00:00 2001 From: dfr Date: Sat, 22 May 1999 17:35:48 +0000 Subject: Port pnpinfo to alpha. --- contrib/pnpinfo/pnpinfo.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'contrib/pnpinfo/pnpinfo.c') diff --git a/contrib/pnpinfo/pnpinfo.c b/contrib/pnpinfo/pnpinfo.c index 7c1751f..f37c3f4 100644 --- a/contrib/pnpinfo/pnpinfo.c +++ b/contrib/pnpinfo/pnpinfo.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: pnpinfo.c,v 1.3 1998/09/13 22:15:44 eivind Exp $ + * $Id: pnpinfo.c,v 1.4 1999/05/04 16:59:42 luoqi Exp $ */ #include @@ -578,16 +578,22 @@ isolation_protocol() } -void -main() +int +main(int argc, char **argv) { int num_pnp_devs; +#ifdef __i386__ /* Hey what about a i386_iopl() call :) */ if (open("/dev/io", O_RDONLY) < 0) { fprintf (stderr, "pnpinfo: Can't get I/O privilege.\n"); exit (1); } +#endif +#ifdef __alpha__ + ioperm(0x203, 0x400 - 0x203, 1); +#endif + printf("Checking for Plug-n-Play devices...\n"); /* Try various READ_DATA ports from 0x203-0x3ff */ @@ -599,6 +605,6 @@ main() } if (!num_pnp_devs) { printf("No Plug-n-Play devices were found\n"); - return; + return 0; } } -- cgit v1.1