Sync usage with man page.
[netbsd-mini2440.git] / sys / arch / mvme68k / stand / netboot / devopen.c
blob4d12d6b4884c060b168948d386b90afa5ce7edcb
1 /* $NetBSD: devopen.c,v 1.2 2000/07/24 18:39:50 jdolecek Exp $ */
3 #include <sys/param.h>
4 #include <stand.h>
6 /*
7 * Open the device named by the combined device/file name
8 * given as the "fname" arg, something like: "sd()bsd"
10 * However, Sun PROMs don't really let you choose which
11 * device you will talk to. You can only open the device
12 * that was used to load the boot program. Therefore, we
13 * do not accept a "device" part in the "fname" string.
14 * Pass the PROM device name to open in case it needs it.
16 int
17 devopen(struct open_file *f, const char *fname, char **file)
19 struct devsw *dp;
20 int error;
22 *file = (char *)fname;
23 dp = &devsw[0];
24 f->f_dev = dp;
25 error = (*dp->dv_open)(f, NULL);
27 return error;