smbnetfs  0.6.3
About: SMBNetFS is a Linux/FreeBSD filesystem that allow you to use samba/microsoft network in the same manner as the network neighborhood in Microsoft Windows.
  Fossies Dox: smbnetfs-0.6.3.tar.bz2  ("unofficial" and yet experimental doxygen-generated source code documentation)  

common.h File Reference
#include "config.h"
#include <sys/types.h>
#include <unistd.h>
#include <time.h>
#include <sys/time.h>
#include <glib.h>
Include dependency graph for common.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


#define ATTRIB(x)   /* no attributes */
#define DEBUG_PRINT(level, fmt, args...)
#define DPRINTF(level, fmt, args...)   DEBUG_PRINT(level, "%d->%s: " fmt, getpid(), __FUNCTION__, ## args)


void common_init (void)
int common_set_smbnetfs_debug_level (int level)
int common_set_log_file (const char *logfile)
void common_debug_print (const char *fmt,...)
void common_print_backtrace (void)
static int common_get_smbnetfs_debug_level (void)


int common_debug_level

Macro Definition Documentation


#define ATTRIB (   x)    /* no attributes */

Definition at line 15 of file common.h.


#define DEBUG_PRINT (   level,
if ((level >= 0) && (level <= common_get_smbnetfs_debug_level())){ \
struct timeval __now; \
gettimeofday(&__now, NULL); \
char __tstamp[20]; \
struct tm __tm; \
localtime_r(&__now.tv_sec, &__tm); \
strftime(__tstamp, 20, "%Y-%m-%d %T", &__tm); \
common_debug_print("%.19s.%03d " fmt, __tstamp, (int)(__now.tv_usec / 1000), ## args); \
static int common_get_smbnetfs_debug_level(void)
Definition: common.h:28

Definition at line 32 of file common.h.


#define DPRINTF (   level,
)    DEBUG_PRINT(level, "%d->%s: " fmt, getpid(), __FUNCTION__, ## args)

Definition at line 47 of file common.h.

Function Documentation

◆ common_debug_print()

void common_debug_print ( const char *  fmt,

Definition at line 63 of file common.c.

References common_logfd, and m_common.

◆ common_get_smbnetfs_debug_level()

static int common_get_smbnetfs_debug_level ( void  )

◆ common_init()

void common_init ( void  )

Definition at line 21 of file common.c.

References common_logfd.

Referenced by main().

◆ common_print_backtrace()

void common_print_backtrace ( void  )

Definition at line 77 of file common.c.

References common_logfd.

Referenced by sig_handler().

◆ common_set_log_file()

int common_set_log_file ( const char *  logfile)

Definition at line 33 of file common.c.

References common_logfd, common_logfile, DPRINTF, and m_common.

Referenced by reconfigure_analyse_simple_option().

◆ common_set_smbnetfs_debug_level()

int common_set_smbnetfs_debug_level ( int  level)

Definition at line 26 of file common.c.

References common_debug_level, and DPRINTF.

Referenced by reconfigure_analyse_simple_option().

Variable Documentation

◆ common_debug_level

int common_debug_level

Definition at line 15 of file common.c.

Referenced by common_get_smbnetfs_debug_level(), and common_set_smbnetfs_debug_level().