1 /* $NetBSD: devopen.c,v 1.3 2005/12/11 12:18:20 christos Exp $ */ 2 3 #include <sys/param.h> 4 #include <lib/libsa/stand.h> 5 6 /* 7 * Open the device named by the combined device/file name 8 * given as the "fname" arg, something like: "sd()bsd" 9 * 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. 15 */ 16 int 17 devopen(struct open_file *f, const char *fname, char **file) 18 { 19 struct devsw *dp; 20 int error; 21 22 *file = (char*)fname; 23 dp = &devsw[0]; 24 f->f_dev = dp; 25 error = (*dp->dv_open)(f, "net"); /* XXXSCW: Fixme */ 26 27 return error; 28 } 29