date and time created 91/05/12 22:30:02 by william
[unix-history] / usr / src / sys / tahoe / stand / conf.c
index ca2f224..190ac24 100644 (file)
@@ -1,88 +1,32 @@
-/*     conf.c  1.1     86/01/12        */
-/*     conf.c  6.1     83/07/29        */
+/*
+ * Copyright (c) 1988 Regents of the University of California.
+ * All rights reserved.
+ *
+ * %sccs.include.redist.c%
+ *
+ *     @(#)conf.c      1.11 (Berkeley) %G%
+ */
 
 
-#include "../machine/pte.h"
+#include "sys/param.h"
+#include "sys/time.h"
+#include "stand/saio.h"
 
 
-#include "param.h"
-#include "inode.h"
-#include "fs.h"
+extern int     nullsys(), nodev(), noioctl();
 
 
-
-#include "saio.h"
-
-devread(io)
-       register struct iob *io;
-{
-       int cc;
-
-       io->i_flgs |= F_RDDATA;
-       io->i_error = 0;
-       cc = (*devsw[io->i_ino.i_dev].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[io->i_ino.i_dev].dv_strategy)(io, WRITE);
-       io->i_flgs &= ~F_TYPEMASK;
-       return (cc);
-}
-
-devopen(io)
-       register struct iob *io;
-{
-
-       (*devsw[io->i_ino.i_dev].dv_open)(io);
-}
-
-devclose(io)
-       register struct iob *io;
-{
-
-       (*devsw[io->i_ino.i_dev].dv_close)(io);
-}
-
-
-/*ARGSUSED*/
-nullsys(io)
-       struct iob *io;
-{
-
-       ;
-}
-
-
-int    nullsys();
-
-
-#define wchstrategy    nullsys 
-#define wchopen        nullsys 
-#define ctstrategy     nullsys 
-#define ctopen                 nullsys         
-#define ctclose        nullsys
-
-int    udstrategy(),   udopen();
-int    vdstrategy(),   vdopen();
-int    cystrategy(),   cyopen(),       cyclose();
+int    vdstrategy(), vdopen();
+int    hdstrategy(), hdopen();
+int    cystrategy(), cyopen(), cyclose();
 
 struct devsw devsw[] = {
 
 struct devsw devsw[] = {
-       "fsd",  vdstrategy,     vdopen,         nullsys,
-       "smd",  vdstrategy,     vdopen,         nullsys,
-       "xfd",  vdstrategy,     vdopen,         nullsys,
-       "fuj",  vdstrategy,     vdopen,         nullsys,
-       "xsd",  vdstrategy,     vdopen,         nullsys,
-
-       "xmd",  udstrategy,     udopen,         nullsys,
-       "flp",  udstrategy,     udopen,         nullsys,
-       "cyp",  cystrategy,     cyopen,         cyclose,
-       "wch",  wchstrategy,    wchopen,        nullsys,
-       "ctp",  ctstrategy,     ctopen,         ctclose,
-       0,      0,              0,              0
+       { "ud", nodev,          nodev,  nullsys, noioctl },  /* 0 = ud */
+       { "dk", vdstrategy,     vdopen, nullsys, noioctl },  /* 1 = ht */
+       { "hd", hdstrategy,     hdopen, nullsys, noioctl },  /* 2 = hd */
+#ifdef notdef
+       { "xp", xpstrategy,     xpopen, nullsys, noioctl },  /* 3 = xp */
+#else
+       { "xp", nodev,          nodev,  nullsys, noioctl },
+#endif
+       { "cy", cystrategy,     cyopen, cyclose, noioctl },  /* 4 = cy */
+       { 0 }
 };
 };
-
+int    ndevs = (sizeof(devsw)/sizeof(devsw[0]));