[BACK]Return to devopen.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / arch / mvmeppc / stand / boot

File: [cvs.NetBSD.org] / src / sys / arch / mvmeppc / stand / boot / devopen.c (download)

Revision 1.2, Tue Jun 28 20:55:55 2005 UTC (17 years, 5 months ago) by junyoung
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, yamt-lazymbuf, thorpej-vnode-attr-base, thorpej-vnode-attr, ktrace-lwp-base
Changes since 1.1: +4 -7 lines

- ANSI & KNF.
- #include <lib/libsa/stand.h> rather than <stand.h>.

/*	$NetBSD: devopen.c,v 1.2 2005/06/28 20:55:55 junyoung Exp $	*/

#include <sys/param.h>
#include <lib/libsa/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(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, "net");	/* XXXSCW: Fixme */

	return error;
}