Back to index

glibc  2.9
Functions | Variables
getutent_r.c File Reference
#include <bits/libc-lock.h>
#include <stdlib.h>
#include <utmp.h>
#include "utmp-private.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

static int setutent_unknown (void)
static int getutent_r_unknown (struct utmp *buffer, struct utmp **result)
static int getutid_r_unknown (const struct utmp *line, struct utmp *buffer, struct utmp **result)
static int getutline_r_unknown (const struct utmp *id, struct utmp *buffer, struct utmp **result)
static struct utmppututline_unknown (const struct utmp *data)
static void endutent_unknown (void)
 __libc_lock_define_initialized (, __libc_utmp_lock attribute_hidden) static int setutent_unknown(void)
void __setutent (void)
 weak_alias (__setutent, setutent)
 weak_alias (__getutent_r, getutent_r)
 weak_alias (__pututline, pututline)

Variables

struct utfuncs__libc_utmp_jump_table = &__libc_utmp_unknown_functions

Function Documentation

__libc_lock_define_initialized ( __libc_utmp_lock  attribute_hidden)

Definition at line 54 of file getutent_r.c.

{
  int result;

  result = (*__libc_utmp_file_functions.setutent) ();
  if (result)
    __libc_utmp_jump_table = &__libc_utmp_file_functions;

  return result;
}
void __setutent ( void  )

Definition at line 131 of file getutent_r.c.

{
  __libc_lock_lock (__libc_utmp_lock);

  (*__libc_utmp_jump_table->setutent) ();

  __libc_lock_unlock (__libc_utmp_lock);
}

Here is the caller graph for this function:

static void endutent_unknown ( void  ) [static]

Definition at line 124 of file getutent_r.c.

{
  /* Nothing to do.  */
}
static int getutent_r_unknown ( struct utmp buffer,
struct utmp **  result 
) [static]

Definition at line 71 of file getutent_r.c.

{
  /* The backend was not yet initialized.  */
  if (setutent_unknown ())
    return (*__libc_utmp_jump_table->getutent_r) (buffer, result);

  /* Not available.  */
  *result = NULL;
  return -1;
}

Here is the call graph for this function:

static int getutid_r_unknown ( const struct utmp line,
struct utmp buffer,
struct utmp **  result 
) [static]

Definition at line 84 of file getutent_r.c.

{
  /* The backend was not yet initialized.  */
  if (setutent_unknown ())
    return (*__libc_utmp_jump_table->getutid_r) (id, buffer, result);

  /* Not available.  */
  *result = NULL;
  return -1;
}

Here is the call graph for this function:

static int getutline_r_unknown ( const struct utmp id,
struct utmp buffer,
struct utmp **  result 
) [static]

Definition at line 98 of file getutent_r.c.

{
  /* The backend was not yet initialized.  */
  if (setutent_unknown ())
    return (*__libc_utmp_jump_table->getutline_r) (line, buffer, result);

  /* Not available.  */
  *result = NULL;
  return -1;
}

Here is the call graph for this function:

static struct utmp * pututline_unknown ( const struct utmp data) [static, read]

Definition at line 112 of file getutent_r.c.

{
  /* The backend was not yet initialized.  */
  if (setutent_unknown ())
    return (*__libc_utmp_jump_table->pututline) (data);

  /* Not available.  */
  return NULL;
}

Here is the call graph for this function:

static int setutent_unknown ( void  ) [static]

Here is the caller graph for this function:

Definition at line 139 of file getutent_r.c.

{
  int retval;

  __libc_lock_lock (__libc_utmp_lock);

  retval = (*__libc_utmp_jump_table->getutent_r) (buffer, result);

  __libc_lock_unlock (__libc_utmp_lock);

  return retval;
}
weak_alias ( __getutent_r  ,
getutent_r   
)

Definition at line 155 of file getutent_r.c.

{
  struct utmp *buffer;

  __libc_lock_lock (__libc_utmp_lock);

  buffer = (*__libc_utmp_jump_table->pututline) (data);

  __libc_lock_unlock (__libc_utmp_lock);

  return buffer;
}

Definition at line 171 of file getutent_r.c.

{
  __libc_lock_lock (__libc_utmp_lock);

  (*__libc_utmp_jump_table->endutent) ();
  __libc_utmp_jump_table = &__libc_utmp_unknown_functions;

  __libc_lock_unlock (__libc_utmp_lock);
}

Variable Documentation

struct utfuncs* __libc_utmp_jump_table = &__libc_utmp_unknown_functions

Definition at line 51 of file getutent_r.c.