Back to index

glibc  2.9
Functions
open.c File Reference
#include <errno.h>
#include <fcntl.h>
#include <stdarg.h>
#include <stdio.h>
#include <hurd.h>
#include <hurd/fd.h>

Go to the source code of this file.

Functions

int __libc_open (const char *file, int oflag,...)
 libc_hidden_def (weak_alias(__libc_open)

Function Documentation

int __libc_open ( const char *  file,
int  oflag,
  ... 
)

Definition at line 29 of file open.c.

{
  mode_t mode;
  io_t port;

  if (oflag & O_CREAT)
    {
      va_list arg;
      va_start (arg, oflag);
      mode = va_arg (arg, mode_t);
      va_end (arg);
    }
  else
    mode = 0;

  port = __file_name_lookup (file, oflag, mode);
  if (port == MACH_PORT_NULL)
    return -1;

  return _hurd_intern_fd (port, oflag, 1);
}

Here is the call graph for this function:

Here is the caller graph for this function:

libc_hidden_def ( weak_alias __libc_open)

Definition at line 51 of file open.c.

{
  if (oflag & O_CREAT)
    __fortify_fail ("invalid open call: O_CREAT without mode");

  return __open (file, oflag);
}

Here is the call graph for this function: