Expand PMF_FN_* macros.
[netbsd-mini2440.git] / sys / arch / sun68k / stand / libsa / devopen.c
blob7451ac03812abc427fc9f6cb5684c190bf9a9994
1 /* $NetBSD: devopen.c,v 1.1.24.1 2005/01/24 08:35:03 skrll Exp $ */
4 #include <sys/types.h>
5 #include <machine/mon.h>
7 #include <stand.h>
8 #include "libsa.h"
11 * Open the device named by the combined device/file name
12 * given as the "fname" arg, something like: "sd()netbsd"
14 * However, Sun PROMs don't really let you choose which
15 * device you will talk to. You can only open the device
16 * that was used to load the boot program. Therefore, we
17 * do not accept a "device" part in the "fname" string.
18 * Pass the PROM device name to open in case it needs it.
20 int
21 devopen(struct open_file *f, const char *fname, char **file)
23 struct devsw *dp;
24 int error;
26 *file = (char*)fname;
27 dp = &devsw[0];
28 f->f_dev = dp;
29 error = (*dp->dv_open)(f, prom_bootdev);
31 return (error);