Annotation of sys/arch/aviion/stand/netboot/devopen.c, Revision 1.1
1.1 ! nbrk 1: /* $OpenBSD: devopen.c,v 1.1 2006/05/16 22:48:18 miod Exp $ */
! 2:
! 3: #include <sys/param.h>
! 4: #include <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(f, fname, file)
! 18: struct open_file *f;
! 19: const char *fname;
! 20: char **file;
! 21: {
! 22: struct devsw *dp;
! 23: int error;
! 24:
! 25: *file = (char *)fname;
! 26: dp = &devsw[0];
! 27: f->f_dev = dp;
! 28: error = (*dp->dv_open)(f, NULL);
! 29:
! 30: return (error);
! 31: }
CVSweb