install correct aliases file
[unix-history] / usr / src / usr.sbin / config / config.h
index d76a6c2..5607386 100644 (file)
@@ -1,40 +1,84 @@
-/*     config.h        1.8     82/10/24        */
-
-#define        machinename     machname
-
 /*
 /*
- * Definitions for config.
+ * Copyright (c) 1980 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the University of California, Berkeley.  The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *     @(#)config.h    5.8 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
- * Structures representing objects in config's world.
+ * Config.
  */
  */
+#include <sys/types.h>
 
 
-#define TO_NEXUS       -1
+#define        NODEV   ((dev_t)-1)
 
 struct file_list {
 
 struct file_list {
-       char    *f_fn;                  /* the name */
-       int     f_type;                 /* see below */
        struct  file_list *f_next;      
        struct  file_list *f_next;      
+       char    *f_fn;                  /* the name */
+       u_char  f_type;                 /* see below */
+       u_char  f_flags;                /* see below */
+       short   f_special;              /* requires special make rule */
        char    *f_needs;
        char    *f_needs;
+       /*
+        * Random values:
+        *      swap space parameters for swap areas
+        *      root device, etc. for system specifications
+        */
+       union {
+               struct {                /* when swap specification */
+                       dev_t   fuw_swapdev;
+                       int     fuw_swapsize;
+               } fuw;
+               struct {                /* when system specification */
+                       dev_t   fus_rootdev;
+                       dev_t   fus_argdev;
+                       dev_t   fus_dumpdev;
+               } fus;
+       } fun;
+#define        f_swapdev       fun.fuw.fuw_swapdev
+#define        f_swapsize      fun.fuw.fuw_swapsize
+#define        f_rootdev       fun.fus.fus_rootdev
+#define        f_argdev        fun.fus.fus_argdev
+#define        f_dumpdev       fun.fus.fus_dumpdev
 };
 };
+
+/*
+ * Types.
+ */
 #define DRIVER         1
 #define NORMAL         2
 #define        INVISIBLE       3
 #define        PROFILING       4
 #define DRIVER         1
 #define NORMAL         2
 #define        INVISIBLE       3
 #define        PROFILING       4
+#define        SYSTEMSPEC      5
+#define        SWAPSPEC        6
+
+/*
+ * Attributes (flags).
+ */
+#define        CONFIGDEP       1
 
 struct idlst {
        char    *id;
        struct  idlst *id_next;
 };
 
 
 struct idlst {
        char    *id;
        struct  idlst *id_next;
 };
 
-typedef        char bool;
-
 struct device {
 struct device {
-       int     d_type;                 /* CONTROLLER, DEVICE, UBA or MBA */
+       int     d_type;                 /* CONTROLLER, DEVICE, bus adaptor */
        struct  device *d_conn;         /* what it is connected to */
        char    *d_name;                /* name of device (e.g. rk11) */
        struct  device *d_conn;         /* what it is connected to */
        char    *d_name;                /* name of device (e.g. rk11) */
-       struct  idlist *d_vec;          /* interrupt vectors */
+       struct  idlst *d_vec;           /* interrupt vectors */
        int     d_pri;                  /* interrupt priority */
        int     d_addr;                 /* address of csr */
        int     d_unit;                 /* unit number */
        int     d_pri;                  /* interrupt priority */
        int     d_addr;                 /* address of csr */
        int     d_unit;                 /* unit number */
@@ -42,10 +86,12 @@ struct device {
        int     d_slave;                /* slave number */
 #define QUES   -1      /* -1 means '?' */
 #define        UNKNOWN -2      /* -2 means not set yet */
        int     d_slave;                /* slave number */
 #define QUES   -1      /* -1 means '?' */
 #define        UNKNOWN -2      /* -2 means not set yet */
-       bool    d_dk;                   /* if init 1 set to number for iostat */
+       int     d_dk;                   /* if init 1 set to number for iostat */
        int     d_flags;                /* nlags for device init */
        struct  device *d_next;         /* Next one in list */
 };
        int     d_flags;                /* nlags for device init */
        struct  device *d_next;         /* Next one in list */
 };
+#define TO_NEXUS       (struct device *)-1
+#define TO_VBA         (struct device *)-2
 
 struct config {
        char    *c_dev;
 
 struct config {
        char    *c_dev;
@@ -56,13 +102,13 @@ struct config {
  * Config has a global notion of which machine type is
  * being used.  It uses the name of the machine in choosing
  * files and directories.  Thus if the name of the machine is ``vax'',
  * Config has a global notion of which machine type is
  * being used.  It uses the name of the machine in choosing
  * files and directories.  Thus if the name of the machine is ``vax'',
- * it will build from ``makefile.vax'' and use ``../vax/asm.sed''
+ * it will build from ``Makefile.vax'' and use ``../vax/inline''
  * in the makerules, etc.
  */
 int    machine;
 char   *machinename;
 #define        MACHINE_VAX     1
  * in the makerules, etc.
  */
 int    machine;
 char   *machinename;
 #define        MACHINE_VAX     1
-#define        MACHINE_SUN     2
+#define        MACHINE_TAHOE   2
 
 /*
  * For each machine, a set of CPU's may be specified as supported.
 
 /*
  * For each machine, a set of CPU's may be specified as supported.
@@ -76,36 +122,51 @@ struct cputype {
 /*
  * A set of options may also be specified which are like CPU types,
  * but which may also specify values for the options.
 /*
  * A set of options may also be specified which are like CPU types,
  * but which may also specify values for the options.
+ * A separate set of options may be defined for make-style options.
  */
 struct opt {
        char    *op_name;
        char    *op_value;
  */
 struct opt {
        char    *op_name;
        char    *op_value;
-       struct  cputype *op_next;
-} *opt;
+       struct  opt *op_next;
+} *opt, *mkopt;
+
+char   *ident;
+char   *ns();
+char   *tc();
+char   *qu();
+char   *get_word();
+char   *path();
+char   *raise();
 
 
-char   *ident, *ns(), *malloc(), *tc(), *qu();
-bool   do_trace;
+int    do_trace;
+
+char   *index();
+char   *rindex();
+char   *malloc();
+char   *strcpy();
+char   *strcat();
 
 #if MACHINE_VAX
 
 #if MACHINE_VAX
-bool   seen_mba, seen_uba;
+int    seen_mba, seen_uba;
+#endif
+#if MACHINE_TAHOE
+int    seen_vba;
 #endif
 
 struct device *connect();
 struct device *dtab;
 #endif
 
 struct device *connect();
 struct device *dtab;
+dev_t  nametodev();
+char   *devtoname();
 
 char   errbuf[80];
 int    yyline;
 
 
 char   errbuf[80];
 int    yyline;
 
-struct file_list *ftab, *conf_list, *confp;
-char   *PREFIX;
+struct file_list *ftab, *conf_list, **confp;
 
 
-int    hz, timezone, hadtz;
+int    timezone, hadtz;
 int    dst;
 int    profiling;
 
 int    maxusers;
 
 #define eq(a,b)        (!strcmp(a,b))
 int    dst;
 int    profiling;
 
 int    maxusers;
 
 #define eq(a,b)        (!strcmp(a,b))
-
-#define TRUE   1
-#define FALSE  0