Back to index

nagios-plugins  1.4.16
Functions
fcntl-safer.h File Reference
#include <sys/types.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int open_safer (char const *, int,...)
int creat_safer (char const *, mode_t)

Function Documentation

int creat_safer ( char const ,
mode_t   
)

Definition at line 28 of file creat-safer.c.

{
  return fd_safer (creat (file, mode));
}

Here is the call graph for this function:

int open_safer ( char const ,
int  ,
  ... 
)

Definition at line 29 of file open-safer.c.

{
  mode_t mode = 0;

  if (flags & O_CREAT)
    {
      va_list ap;
      va_start (ap, flags);

      /* We have to use PROMOTED_MODE_T instead of mode_t, otherwise GCC 4
         creates crashing code when 'mode_t' is smaller than 'int'.  */
      mode = va_arg (ap, PROMOTED_MODE_T);

      va_end (ap);
    }

  return fd_safer (open (file, flags, mode));
}

Here is the call graph for this function: