1OPEN(2)                       System Calls Manual                      OPEN(2)
2
3
4

NAME

6       open - open for reading or writing
7

SYNOPSIS

9       open(name, mode)
10       char *name;
11

DESCRIPTION

13       Open  opens  the file name for reading (if mode is 0), writing (if mode
14       is 1) or for both reading and writing (if mode  is  2).   Name  is  the
15       address  of a string of ASCII characters representing a path name, ter‐
16       minated by a null character.
17
18       The file is positioned at the beginning (byte 0).   The  returned  file
19       descriptor  must  be  used  for subsequent calls for other input-output
20       functions on the file.
21

SEE ALSO

23       creat(2), read(2), write(2), dup(2), close(2)
24

DIAGNOSTICS

26       The value -1 is returned if the file does not exist, if one of the nec‐
27       essary  directories does not exist or is unreadable, if the file is not
28       readable (resp. writable), or if too many files are open.
29

ASSEMBLER

31       (open = 5.)
32       sys open; name; mode
33       (file descriptor in r0)
34
35
36
37                                                                       OPEN(2)
Impressum