diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-10-18 08:53:40 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-10-18 08:53:40 +0000 |
commit | d6583bb2a13f329cf0332ef2570eb8bb8fc0e39c (patch) | |
tree | ece253b876159b39c620e62b6c9b1174642e070e /sys/arch/sun3/stand/libsa/devopen.c |
initial import of NetBSD tree
Diffstat (limited to 'sys/arch/sun3/stand/libsa/devopen.c')
-rw-r--r-- | sys/arch/sun3/stand/libsa/devopen.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/sys/arch/sun3/stand/libsa/devopen.c b/sys/arch/sun3/stand/libsa/devopen.c new file mode 100644 index 00000000000..e876ddaa092 --- /dev/null +++ b/sys/arch/sun3/stand/libsa/devopen.c @@ -0,0 +1,32 @@ + +#include <sys/param.h> +#include <machine/mon.h> +#include <stand.h> +#include "promboot.h" + +/* + * Open the device named by the combined device/file name + * given as the "fname" arg, something like: "sd()netbsd" + * + * 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; + int error; + + *file = (char*)fname; + dp = &devsw[0]; + f->f_dev = dp; + error = (*dp->dv_open)(f, prom_bootdev); + + return (error); +} |