Back to index

glibc  2.9
Defines | Functions
mntent.c File Reference
#include <mntent.h>
#include <stdlib.h>
#include <bits/libc-lock.h>

Go to the source code of this file.


#define BUFFER_SIZE   4096


 libc_freeres_ptr (static char *getmntent_buffer)
static void allocate (void)
struct mntentgetmntent (FILE *stream)

Define Documentation

#define BUFFER_SIZE   4096

Definition at line 30 of file mntent.c.

Function Documentation

static void allocate ( void  ) [static]

Definition at line 34 of file mntent.c.

  getmntent_buffer = (char *) malloc (BUFFER_SIZE);

Here is the caller graph for this function:

struct mntent* getmntent ( FILE stream) [read]

Definition at line 41 of file mntent.c.

  static struct mntent m;
  __libc_once_define (static, once);
  __libc_once (once, allocate);

  if (getmntent_buffer == NULL)
    /* If no core is available we don't have a chance to run the
       program successfully and so returning NULL is an acceptable
       result.  */
    return NULL;

  return __getmntent_r (stream, &m, getmntent_buffer, BUFFER_SIZE);

Here is the call graph for this function:

Here is the caller graph for this function:

libc_freeres_ptr ( static char *  getmntent_buffer)