%token MAJOR
%token MASTER
%token MAXUSERS
-%token MBA
%token MINOR
%token MINUS
%token NEXUS
%token ON
%token OPTIONS
+%token MAKEOPTIONS
%token PRIORITY
%token PSEUDO_DEVICE
%token ROOT
%token SWAP
%token TIMEZONE
%token TRACE
-%token UBA
%token VECTOR
%token <str> ID
%{
-/* config.y 1.18 83/05/18 */
+/*
+ * Copyright (c) 1988 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.y 5.8 (Berkeley) %G%
+ */
#include "config.h"
#include <ctype.h>
if (!strcmp($2, "vax")) {
machine = MACHINE_VAX;
machinename = "vax";
- } else if (!strcmp($2, "sun")) {
- machine = MACHINE_SUN;
- machinename = "sun";
+ } else if (!strcmp($2, "tahoe")) {
+ machine = MACHINE_TAHOE;
+ machinename = "tahoe";
} else
yyerror("Unknown machine type");
} |
} |
OPTIONS Opt_list
|
+ MAKEOPTIONS Mkopt_list
+ |
IDENT ID
= { ident = ns($2); } |
System_spec
ID
= { $$ = val_id = ns($1); } |
NUMBER
- = { char nb[16]; $$ = val_id = ns(sprintf(nb, "%d", $1)); };
+ = {
+ char nb[16];
+ (void) sprintf(nb, "%d", $1);
+ $$ = val_id = ns(nb);
+ } ;
Save_id:
= { $$ = temp_id = ns($1); }
;
+Mkopt_list:
+ Mkopt_list COMMA Mkoption
+ |
+ Mkoption
+ ;
+
+Mkoption:
+ Save_id EQUALS Opt_value
+ = {
+ struct opt *op = (struct opt *)malloc(sizeof (struct opt));
+ op->op_name = ns($1);
+ op->op_next = mkopt;
+ op->op_value = ns($3);
+ mkopt = op;
+ free(temp_id);
+ free(val_id);
+ } ;
+
Dev:
- UBA
- = { $$ = ns("uba"); } |
- MBA
- = { $$ = ns("mba"); } |
ID
= { $$ = ns($1); }
;
seen_mba = 1;
else if (eq($2, "uba"))
seen_uba = 1;
+ else if (eq($2, "vba"))
+ seen_vba = 1;
cur.d_unit = $3;
};
Con_info:
AT Dev NUMBER
= {
- if (eq(cur.d_name, "mba") || eq(cur.d_name, "uba"))
- yyerror(sprintf(errbuf,
- "%s must be connected to a nexus", cur.d_name));
+ if (eq(cur.d_name, "mba") || eq(cur.d_name, "uba")) {
+ (void) sprintf(errbuf,
+ "%s must be connected to a nexus", cur.d_name);
+ yyerror(errbuf);
+ }
cur.d_conn = connect($2, $3);
} |
AT NEXUS NUMBER
char *s;
{
- fprintf(stderr, "config: line %d: %s\n", yyline, s);
+ fprintf(stderr, "config: line %d: %s\n", yyline + 1, s);
}
/*
np = (struct device *) malloc(sizeof *np);
*np = *dp;
+ np->d_next = 0;
if (curp == 0)
dtab = np;
else
int size;
{
register struct file_list **flp;
- char *cp, name[80];
+ char name[80];
if (system == 0 || system->f_type != SYSTEMSPEC) {
yyerror("\"swap\" spec precedes \"config\" specification");
;
fl->f_next = *flp;
*flp = fl;
+ fl->f_swapsize = size;
/*
* If first swap device for this system,
* set up f_fn field to insure swap
if ((num != dp->d_unit) || !eq(dev, dp->d_name))
continue;
if (dp->d_type != CONTROLLER && dp->d_type != MASTER) {
- yyerror(sprintf(errbuf,
- "%s connected to non-controller", dev));
+ (void) sprintf(errbuf,
+ "%s connected to non-controller", dev);
+ yyerror(errbuf);
return (0);
}
return (dp);
}
- yyerror(sprintf(errbuf, "%s %d not defined", dev, num));
+ (void) sprintf(errbuf, "%s %d not defined", dev, num);
+ yyerror(errbuf);
return (0);
}
if (eq(dp->d_name, dev))
break;
if (dp == 0) {
- yyerror(sprintf(errbuf, "no %s's to wildcard", dev));
+ (void) sprintf(errbuf, "no %s's to wildcard", dev);
+ yyerror(errbuf);
return (0);
}
oldtype = dp->d_type;
switch (machine) {
case MACHINE_VAX:
- if (!eq(dev->d_name, "uba") && !eq(dev->d_name, "mba"))
- yyerror("only uba's and mba's should be connected to the nexus");
+ if (!eq(dev->d_name, "uba") && !eq(dev->d_name, "mba") &&
+ !eq(dev->d_name, "bi"))
+ yyerror("only uba's, mba's, and bi's should be connected to the nexus");
if (num != QUES)
yyerror("can't give specific nexus numbers");
break;
- case MACHINE_SUN:
- if (!eq(dev->d_name, "mb"))
- yyerror("only mb's should be connected to the nexus");
+ case MACHINE_TAHOE:
+ if (!eq(dev->d_name, "vba"))
+ yyerror("only vba's should be connected to the nexus");
break;
}
}
swap = newswap();
dev = fl->f_rootdev;
if (minor(dev) & 07) {
- sprintf(buf,
+ (void) sprintf(buf,
"Warning, swap defaulted to 'b' partition with root on '%c' partition",
(minor(dev) & 07) + 'a');
yyerror(buf);
for (; p && p->f_type == SWAPSPEC; p = p->f_next)
if (fl->f_dumpdev == p->f_swapdev)
return;
- sprintf(buf, "Warning, orphaned dump device, %s",
+ (void) sprintf(buf, "Warning, orphaned dump device, %s",
"do you know what you're doing");
yyerror(buf);
}
* configured hardware devices. Must
* take into account stuff wildcarded.
*/
+/*ARGSUSED*/
finddev(dev)
dev_t dev;
{