Logo Search packages:      
Sourcecode: chromium-browser version File versions  Download package

int open ( char const *  pathname,
int  flags,

Opens a file descriptor from a given pathname.

pathname The posix pathname (e.g., /tmp/foo) to be opened.
flags The access modes allowed. One of O_RDONLY, O_WRONLY, or O_RDWR is required. Otherwise, only O_CREAT, O_TRUNC, and O_APPEND are supported.
mode (optional) Specifies the permissions to use if a new file is created. Limited only to user permissions.
Returns non-negative file descriptor if successful. If open fails, it returns -1 and sets errno appropriately.

Definition at line 19 of file open.c.

References open().

Referenced by evdns_resolv_conf_parse(), open(), and parseOneConfigFile().

  int retval;
  va_list ap;
  mode_t mode;
  va_start(ap, flags);
  mode = va_arg(ap, mode_t);
  retval = NACL_SYSCALL(open)(pathname, flags, mode);
  if (retval < 0) {
    errno = -retval;
    return -1;
  return retval;

Generated by  Doxygen 1.6.0   Back to index