summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1997-04-06 20:08:26 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1997-04-06 20:08:26 +0000
commit3c7e2f2acecb363810b488014f9f3df2c10b80b4 (patch)
treef823ced99573915947e1f408dcc027e1be7a128c /sys/arch/i386
parentec1e97535a94593e06fda9a060295cf00e2438f9 (diff)
devboot commit
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/stand/libsa/dev_i386.c43
1 files changed, 41 insertions, 2 deletions
diff --git a/sys/arch/i386/stand/libsa/dev_i386.c b/sys/arch/i386/stand/libsa/dev_i386.c
index 0e1b75eb2ce..c80d9268af1 100644
--- a/sys/arch/i386/stand/libsa/dev_i386.c
+++ b/sys/arch/i386/stand/libsa/dev_i386.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dev_i386.c,v 1.3 1997/03/31 23:06:28 mickey Exp $ */
+/* $OpenBSD: dev_i386.c,v 1.4 1997/04/06 20:08:25 mickey Exp $ */
/*
* Copyright (c) 1996 Michael Shalayeff
@@ -49,11 +49,27 @@ devopen(struct open_file *f, const char *fname, char **file)
*file = (char *)fname;
- for (i = 0; i < ndevs && rc != 0; dp++, i++)
+#ifdef DEBUG
+ printf("devopen:");
+#endif
+
+ for (i = 0; i < ndevs && rc != 0; dp++, i++) {
+#ifdef DEBUG
+ printf(" %s", dp->dv_name);
+#endif
if ((rc = (*dp->dv_open)(f, file)) == 0) {
f->f_dev = dp;
return 0;
+ }
+#ifdef DEBUG
+ else
+ printf(":%d", rc);
+#endif
+
}
+#ifdef DEBUG
+ putchar('\n');
+#endif
if ((f->f_flags & F_NODEV) == 0)
f->f_dev = dp;
@@ -62,6 +78,29 @@ devopen(struct open_file *f, const char *fname, char **file)
}
void
+devboot(bootdev, p)
+ dev_t bootdev;
+ char *p;
+{
+#ifdef _TEST
+ *p++ = '/';
+ *p++ = 'd';
+ *p++ = 'e';
+ *p++ = 'v';
+ *p++ = '/';
+ *p++ = 'r';
+#endif
+ if (bootdev & 0x80)
+ *p++ = 'h';
+ else
+ *p++ = 'f';
+ *p++ = 'd';
+ *p++ = '0' + (bootdev & 0x7f);
+ *p++ = 'a';
+ *p = '\0';
+}
+
+void
putchar(c)
int c;
{