summaryrefslogtreecommitdiff
path: root/sys/arch/mvme88k/stand/netboot/devopen.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/mvme88k/stand/netboot/devopen.c')
-rw-r--r--sys/arch/mvme88k/stand/netboot/devopen.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/sys/arch/mvme88k/stand/netboot/devopen.c b/sys/arch/mvme88k/stand/netboot/devopen.c
new file mode 100644
index 00000000000..7e02e4bb845
--- /dev/null
+++ b/sys/arch/mvme88k/stand/netboot/devopen.c
@@ -0,0 +1,32 @@
+/* $OpenBSD: devopen.c,v 1.1 1998/08/22 08:37:58 smurph Exp $ */
+
+#include <sys/param.h>
+#include <stand.h>
+
+/*
+ * Open the device named by the combined device/file name
+ * given as the "fname" arg, something like: "sd()bsd"
+ *
+ * However, Sun PROMs don't really let you choose which
+ * device you will talk to. You can only open the device
+ * that was used to load the boot program. Therefore, we
+ * do not accept a "device" part in the "fname" string.
+ * Pass the PROM device name to open in case it needs it.
+ */
+int
+devopen(f, fname, file)
+ struct open_file *f;
+ const char *fname;
+ char **file;
+{
+ struct devsw *dp;
+ char *cp, *path, *devname;
+ int error;
+
+ *file = (char*)fname;
+ dp = &devsw[0];
+ f->f_dev = dp;
+ error = (*dp->dv_open)(f, NULL);
+
+ return (error);
+}