[BACK]Return to devopen.c CVS log [TXT][DIR] Up to [local] / sys / arch / mvme68k / stand / netboot

Annotation of sys/arch/mvme68k/stand/netboot/devopen.c, Revision 1.1

1.1     ! nbrk        1: /*     $OpenBSD: devopen.c,v 1.2 2002/03/14 03:15:56 millert 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:        char *cp, *path, *devname;
        !            24:        int error;
        !            25:
        !            26:        *file = (char *)fname;
        !            27:        dp = &devsw[0];
        !            28:        f->f_dev = dp;
        !            29:        error = (*dp->dv_open)(f, NULL);
        !            30:
        !            31:        return (error);
        !            32: }

CVSweb