OPEN(2)
NAME
open − device independent open routine
SYNOPSIS
int open(dev, name, mode)
int dev;
char ∗name;
char ∗modes;
DESCRIPTION
Open will establish connection with the device given by dev using the null-terminated string name to name an object on that device, and null-terminated string mode to specify the access mode for that object. Valid access mode characters include r (read), w (write), o (old), and n (new) as specified in ACCESS(2).
Open returns SYSERR if dev is incorrect or cannot be opened. If successful, the value returned by open depends on the device. Most calls to open return a device descriptor that can be used in subsequent calls to readf1 or write. For example, calling open on a disk device with a file name as an argument produces a descriptor by which that file can be accessed.
SEE ALSO
access(2), close(2), ckmode(3), namespace(4)
BUGS
Not all devices produce meaningful return values for open.
December 01, 1986 — Xinu Programmer’s Manual