diff options
author | peter <peter@FreeBSD.org> | 2000-01-23 18:05:24 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2000-01-23 18:05:24 +0000 |
commit | 430f14513d18203880d82ea2dba5de7283142cb6 (patch) | |
tree | 020b33728cfc6e7cef0fbcccfbbd9da05e6c16ad /usr.sbin | |
parent | e238f1c84fa7618f0178cf7e6086a749f6b8d938 (diff) | |
download | FreeBSD-src-430f14513d18203880d82ea2dba5de7283142cb6.zip FreeBSD-src-430f14513d18203880d82ea2dba5de7283142cb6.tar.gz |
Remove the cam-specific device wiring code. This was a duplicate of
the data in the resource tables, and cam is getting it directly now.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/config/config.h | 2 | ||||
-rw-r--r-- | usr.sbin/config/config.y | 6 | ||||
-rw-r--r-- | usr.sbin/config/mkioconf.c | 83 |
3 files changed, 0 insertions, 91 deletions
diff --git a/usr.sbin/config/config.h b/usr.sbin/config/config.h index 762e787..183e6f4 100644 --- a/usr.sbin/config/config.h +++ b/usr.sbin/config/config.h @@ -158,8 +158,6 @@ void options __P((void)); void makefile __P((void)); void headers __P((void)); - -extern int seen_scbus; extern struct device *dtab; extern char errbuf[80]; diff --git a/usr.sbin/config/config.y b/usr.sbin/config/config.y index 45fe648..d6da904 100644 --- a/usr.sbin/config/config.y +++ b/usr.sbin/config/config.y @@ -102,8 +102,6 @@ struct file_list *ftab; char errbuf[80]; int maxusers; -int seen_scbus; - #define ns(s) strdup(s) static int connect __P((char *, int)); @@ -340,15 +338,11 @@ Dev_spec: = { cur.d_name = $2; cur.d_unit = UNKNOWN; - if (eq($2, "scbus")) - seen_scbus = 1; } | Init_dev Dev NUMBER Dev_info = { cur.d_name = $2; cur.d_unit = $3; - if (eq($2, "scbus")) - seen_scbus = 1; }; Init_dev: diff --git a/usr.sbin/config/mkioconf.c b/usr.sbin/config/mkioconf.c index 5d19aa6..542b1c7 100644 --- a/usr.sbin/config/mkioconf.c +++ b/usr.sbin/config/mkioconf.c @@ -47,7 +47,6 @@ static const char rcsid[] = /* * build the ioconf.c file */ -static void scbus_devtab __P((FILE *)); static char * devstr(struct device *dp) @@ -184,10 +183,6 @@ newbus_ioconf() fprintf(fp, " */\n"); fprintf(fp, "\n"); fprintf(fp, "#include <sys/param.h>\n"); - - if (seen_scbus) - scbus_devtab(fp); - fprintf(fp, "\n"); fprintf(fp, "/*\n"); fprintf(fp, " * New bus architecture devices.\n"); @@ -207,81 +202,3 @@ newbus_ioconf() (void) fclose(fp); moveifchanged(path("ioconf.c.new"), path("ioconf.c")); } - -static char * -id(int unit) -{ - static char buf[32]; - - char *s; - switch(unit) - { - case UNKNOWN: - s ="CAMCONF_UNSPEC"; - break;; - - case QUES: - s ="CAMCONF_ANY"; - break; - - default: - (void) snprintf(buf, sizeof(buf), "%d", unit); - s = buf; - } - - return s; -} - -/* XXX: dufault@hda.com: wiped out mkioconf.c locally: - * All that nice "conflicting SCSI ID checking" is now - * lost and should be put back in. - */ -static void -scbus_devtab(fp) - FILE *fp; -{ - register struct device *dp; - - fprintf(fp, "\n"); - fprintf(fp, "/*\n"); - fprintf(fp, " * CAM devices.\n"); - fprintf(fp, " */\n"); - fprintf(fp, "\n"); - fprintf(fp, "#include <cam/cam_conf.h>\n"); - fprintf(fp, "\n"); - fprintf(fp, "struct cam_sim_config cam_sinit[] = {\n"); - fprintf(fp, "/* pathid, sim name, sim unit, sim bus */\n"); - - for (dp = dtab; dp; dp = dp->d_next) { - if (dp->d_type != DEVICE || dp->d_conn == 0 || - !eq(dp->d_name, "scbus")) - continue; - fprintf(fp, "{ %s, ", id(dp->d_unit)); - fprintf(fp, "\"%s\", ", dp->d_conn); - fprintf(fp, "%s, ", id(dp->d_connunit)); - fprintf(fp, "%s },\n", id(dp->d_bus)); - } - fprintf(fp, "{ 0, 0, 0, 0 }\n"); - fprintf(fp, "};\n"); - - - fprintf(fp, "\n"); - fprintf(fp, "struct cam_periph_config cam_pinit[] = {\n"); - fprintf(fp, -"/* periph name, periph unit, pathid, target, LUN, flags */\n"); - for (dp = dtab; dp; dp = dp->d_next) { - if (dp->d_type != DEVICE || dp->d_conn == 0 || - !eq(dp->d_conn, "scbus")) - continue; - - fprintf(fp, "{ "); - fprintf(fp, "\"%s\", ", dp->d_name); - fprintf(fp, "%s, ", id(dp->d_unit)); - fprintf(fp, "%s, ", id(dp->d_connunit)); - fprintf(fp, "%s, ", id(dp->d_target)); - fprintf(fp, "%s, ", id(dp->d_lun)); - fprintf(fp, " 0x%x },\n", dp->d_flags); - } - fprintf(fp, "{ 0, 0, 0, 0, 0, 0 }\n"); - fprintf(fp, "};\n"); -} |