MentOS  0.8.0
The Mentoring Operating System
Functions
open.c File Reference

Functions

int sys_open (const char *pathname, int flags, mode_t mode)
 Given a pathname for a file, open() returns a file descriptor, a small, nonnegative integer for use in subsequent system calls. More...
 
int sys_close (int fd)
 

Detailed Description

Function Documentation

◆ sys_close()

int sys_close ( int  fd)
Parameters
fd
Returns

◆ sys_open()

int sys_open ( const char *  pathname,
int  flags,
mode_t  mode 
)

Given a pathname for a file, open() returns a file descriptor, a small, nonnegative integer for use in subsequent system calls.

Parameters
pathnameA pathname for a file.
flagsUsed to set the file status flags and file access modes of the open file description.
modeSpecifies the file mode bits be applied when a new file is created.
Returns
Returns a file descriptor, a small, nonnegative integer for use in subsequent system calls.