date and time created 91/05/12 22:30:02 by william
[unix-history] / usr / src / sys / i386 / stand / confxx.c
index da7f0a9..73c7548 100644 (file)
@@ -5,93 +5,15 @@
  * This code is derived from software contributed to Berkeley by
  * William Jolitz.
  *
  * This code is derived from software contributed to Berkeley by
  * William Jolitz.
  *
- * %sccs.include.noredist.c%
+ * %sccs.include.redist.c%
  *
  *
- *     @(#)confxx.c    7.1 (Berkeley) %G%
+ *     @(#)confxx.c    7.3 (Berkeley) %G%
  */
 
  */
 
-#include "../machine/pte.h"
-
-#include "../h/param.h"
-#include "../h/inode.h"
-#include "../h/fs.h"
-#include "saio.h"
-
-devread(io)
-       register struct iob *io;
-{
-       int cc;
-
-       io->i_flgs |= F_RDDATA;
-       io->i_error = 0;
-       cc = (*devsw[0].dv_strategy)(io, READ);
-       io->i_flgs &= ~F_TYPEMASK;
-       return (cc);
-}
-
-devwrite(io)
-       register struct iob *io;
-{
-       int cc;
-
-       io->i_flgs |= F_WRDATA;
-       io->i_error = 0;
-       cc = (*devsw[0].dv_strategy)(io, WRITE);
-       io->i_flgs &= ~F_TYPEMASK;
-       return (cc);
-}
-
-devopen(io)
-       register struct iob *io;
-{
-
-       (*devsw[0].dv_open)(io);
-}
-
-devclose(io)
-       register struct iob *io;
-{
-
-       (*devsw[0].dv_close)(io);
-}
-
-devioctl(io, cmd, arg)
-       register struct iob *io;
-       int cmd;
-       caddr_t arg;
-{
-
-       return ((*devsw[0].dv_ioctl)(io, cmd, arg));
-}
-
-/*ARGSUSED*/
-nullsys(io)
-       struct iob *io;
-{
-
-       ;
-}
-
-/*ARGSUSED*/
-nullioctl(io, cmd, arg)
-       struct iob *io;
-       int cmd;
-       caddr_t arg;
-{
-
-       return (ECMD);
-}
-
-int    nullsys(), nullioctl();
-int    xxstrategy(), xxopen()/*, xxioctl()*/;
+int    xxstrategy(), xxopen(), xxioctl();
 
 struct devsw devsw[] = {
 
 struct devsw devsw[] = {
-       { "XX", xxstrategy,     xxopen,         nullsys,        /*xxioctl*/ },
-       { 0, 0, 0, 0, 0 }
+       { "XX", xxstrategy,     xxopen,         nullsys,        noioctl },
 };
 };
-#ifdef TP
-char   bootprog[] = "XX0b:" ;
-#else
-char   bootprog[] = "XX0a:/boot" ;
-#endif
-int ndevs = 1 ;
+
+int    ndevs = (sizeof(devsw) / sizeof(devsw[0]));