File:  [XINU] / xinu / sys / open.c
Revision 1.1.1.2 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:39:59 2018 UTC (8 years, 3 months ago) by root
Branches: xinu, MAIN
CVS tags: xinu-19910600, HEAD
Xinu for 68000/68010

/* open.c - open */

#include <conf.h>
#include <kernel.h>
#include <io.h>

/*------------------------------------------------------------------------
 *  open  -  open a connection to a device/file (parms 2 &3 are optional)
 *------------------------------------------------------------------------
 */
open(descrp, nam, mode)
int	descrp;
char	*nam;
char	*mode;
{
	struct	devsw	*devptr;

#ifdef	DEBUG1
	dotrace("open", &descrp, 3);
#endif
	if ( isbaddev(descrp) )
		return(SYSERR);
	devptr = &devtab[descrp];
	return(	(*devptr->dvopen)(devptr, nam, mode) );
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.