88 lines
2.3 KiB
Plaintext
88 lines
2.3 KiB
Plaintext
$OpenBSD: patch-wdsetup_c,v 1.2 2004/01/04 19:00:56 espie Exp $
|
|
--- wdsetup.c.orig 1999-01-20 19:35:09.000000000 +0100
|
|
+++ wdsetup.c 2004-01-04 19:58:34.000000000 +0100
|
|
@@ -17,12 +17,17 @@
|
|
#include <unistd.h>
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
+#ifdef __OpenBSD__
|
|
+#include <sys/types.h>
|
|
+#include <machine/sysarch.h>
|
|
+#else
|
|
#ifdef __alpha__
|
|
#define __KERNEL__
|
|
#include <sys/types.h>
|
|
#include <asm/types.h>
|
|
#include <sys/io.h>
|
|
#endif
|
|
+#endif
|
|
|
|
#define wdsetup_version "0.6b"
|
|
#define PERM_OFF 0
|
|
@@ -528,7 +533,7 @@ __asm__ __volatile__ ("inb %%dx,%%al"
|
|
SLOW_DOWN_IO;
|
|
return _v;
|
|
}
|
|
-#endif __i386__
|
|
+#endif /* __i386__ */
|
|
|
|
|
|
void SelectOtherRegister(int ioaddr)
|
|
@@ -1986,33 +1991,33 @@ int main(int argc, char *argv[])
|
|
}
|
|
next_arg:
|
|
if (!argok) {
|
|
- printf("Usage: wdsetup [options]\n\
|
|
-options are:\n\
|
|
--a addr\t\tspecify board's base io address\n\
|
|
---baseaddr addr\t\n\
|
|
--v verbose_level\tspecify verbosity level\n\
|
|
---verbose verbose_level\n
|
|
--r\t\tdump registers\n\
|
|
---regs\t\tdump registers\n\
|
|
--e\t\tdump eeprom\n\
|
|
--eeprom\t\tdump eeprom\n\
|
|
-note: if any of the following options are used, the interactive\n\
|
|
- reconfiguring of the eeprom will be skipped.\n\
|
|
--e\t\tdump eeprom contents\n\
|
|
--r\t\tdump registers\n\
|
|
--p addr\tset board's new io address\n\
|
|
---newaddr addr\t\n\
|
|
--b addr\t\tset new ram start address\n\
|
|
---ramstart addr\t\n\
|
|
--i irq\t\tset new interrupt number\n\
|
|
---irq irq\t\n\
|
|
--m media\tset media type [aui] || [bnc] || [twp]\n\
|
|
---media media\t\n");
|
|
+ printf("Usage: wdsetup [options]\n"
|
|
+"options are:\n"
|
|
+"-a addr\t\tspecify board's base io address\n"
|
|
+"--baseaddr addr\t\n"
|
|
+"-v verbose_level\tspecify verbosity level\n"
|
|
+"--verbose verbose_level\n"
|
|
+"-r\t\tdump registers\n"
|
|
+"--regs\t\tdump registers\n"
|
|
+"-e\t\tdump eeprom\n"
|
|
+"-eeprom\t\tdump eeprom\n"
|
|
+"note: if any of the following options are used, the interactive\n"
|
|
+" reconfiguring of the eeprom will be skipped.\n"
|
|
+"-e\t\tdump eeprom contents\n"
|
|
+"-r\t\tdump registers\n"
|
|
+"-p addr\tset board's new io address\n"
|
|
+"--newaddr addr\t\n"
|
|
+"-b addr\t\tset new ram start address\n"
|
|
+"--ramstart addr\t\n"
|
|
+"-i irq\t\tset new interrupt number\n"
|
|
+"--irq irq\t\n"
|
|
+"-m media\tset media type [aui] || [bnc] || [twp]\n"
|
|
+"--media media\t\n");
|
|
exit(-1);
|
|
}
|
|
}
|
|
|
|
- if (iopl(3)) {
|
|
+ if (i386_iopl(3)) {
|
|
perror("io-perm2");
|
|
exit (-1);
|
|
}
|