dpkg 1.21.11
Functions
mlib.c File Reference

(81f40c4a0)

#include <config.h>
#include <compat.h>
#include <sys/types.h>
#include <errno.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <dpkg/i18n.h>
#include <dpkg/dpkg.h>
Include dependency graph for mlib.c:

Functions

void * m_malloc (size_t amount)
 
void * m_calloc (size_t nmemb, size_t size)
 
void * m_realloc (void *r, size_t amount)
 
char * m_strdup (const char *str)
 
char * m_strndup (const char *str, size_t n)
 
int m_vasprintf (char **strp, const char *fmt, va_list args)
 
int m_asprintf (char **strp, const char *fmt,...)
 
int m_dup (int oldfd)
 
void m_dup2 (int oldfd, int newfd)
 
void m_pipe (int fds[2])
 
void m_output (FILE *f, const char *name)
 
void setcloexec (int fd, const char *fn)
 

Function Documentation

◆ m_asprintf()

int m_asprintf ( char **  strp,
const char *  fmt,
  ... 
)

References args, and m_vasprintf().

Referenced by maintscript_fallback(), and maintscript_new().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m_calloc()

void * m_calloc ( size_t  nmemb,
size_t  size 
)

Referenced by pager_spawn().

Here is the caller graph for this function:

◆ m_dup()

int m_dup ( int  oldfd)

References _, ohshite(), and onerr_abort.

Here is the call graph for this function:

◆ m_dup2()

void m_dup2 ( int  oldfd,
int  newfd 
)

References _, ohshite(), and onerr_abort.

Referenced by pager_reap().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m_malloc()

void * m_malloc ( size_t  amount)

◆ m_output()

void m_output ( FILE *  f,
const char *  name 
)

References _, and ohshite().

Referenced by do_info(), predeppackage(), print_foreign_arches(), and printarch().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m_pipe()

void m_pipe ( int  fds[2])

References _, ohshite(), and onerr_abort.

Here is the call graph for this function:

◆ m_realloc()

void * m_realloc ( void *  r,
size_t  amount 
)

Referenced by varbuf_grow().

Here is the caller graph for this function:

◆ m_strdup()

char * m_strdup ( const char *  str)

Referenced by atomic_file_new(), dir_make_path(), dir_make_path_parent(), dir_sync_path_parent(), filter_add(), match_node_new(), pkg_hash_find_set(), and pkg_spec_parse().

Here is the caller graph for this function:

◆ m_strndup()

char * m_strndup ( const char *  str,
size_t  n 
)

Referenced by pkg_spec_parse().

Here is the caller graph for this function:

◆ m_vasprintf()

int m_vasprintf ( char **  strp,
const char *  fmt,
va_list  args 
)

References _, args, ohshite(), and onerr_abort.

Referenced by badusage(), dpkg_error_print(), info(), m_asprintf(), notice(), and str_fmt().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setcloexec()

void setcloexec ( int  fd,
const char *  fn 
)

References _, and ohshite().

Referenced by debug_set_output(), file_lock(), log_message(), and statusfd_add().

Here is the call graph for this function:
Here is the caller graph for this function: