automotive-dlt
dlt_cdh_context.c File Reference
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
#include <dirent.h>
#include <syslog.h>
#include "dlt_cdh.h"
Include dependency graph for dlt_cdh_context.c:

Go to the source code of this file.

Macros

#define PROC_FILENAME(x)
 

Functions

cdh_status_t get_exec_name (unsigned int p_pid, char *p_exec_name, int p_exec_name_maxsize)
 
cdh_status_t dump_file_to (const char *p_src_filename, FILE *p_fout)
 
static char ftypelet (mode_t bits)
 
void strmode (mode_t mode, char *str)
 
cdh_status_t list_dircontent_to (const char *p_dirname, FILE *p_fout)
 
cdh_status_t write_proc_context (const proc_info_t *p_proc)
 

Variables

char g_buffer [4096]
 

Detailed Description

Author
Magneti Marelli http://www.magnetimarelli.com
Lutz Helwing lutz_.nosp@m.helw.nosp@m.ing@m.nosp@m.ento.nosp@m.r.com

Definition in file dlt_cdh_context.c.

Macro Definition Documentation

#define PROC_FILENAME (   x)
Value:
do{\
snprintf(l_procfile, sizeof(l_procfile), "/proc/%d/"x,\
p_proc->pid);\
} while(0)

Referenced by write_proc_context().

Function Documentation

cdh_status_t dump_file_to ( const char *  p_src_filename,
FILE *  p_fout 
)

Definition at line 82 of file dlt_cdh_context.c.

References CDH_NOK, CDH_OK, g_buffer, and NULL.

Referenced by write_proc_context().

static char ftypelet ( mode_t  bits)
static

Definition at line 162 of file dlt_cdh_context.c.

Referenced by strmode().

cdh_status_t get_exec_name ( unsigned int  p_pid,
char *  p_exec_name,
int  p_exec_name_maxsize 
)

Definition at line 52 of file dlt_cdh_context.c.

References CDH_NOK, CDH_OK, CORE_MAX_FILENAME_LENGTH, g_buffer, and NULL.

Referenced by main().

cdh_status_t list_dircontent_to ( const char *  p_dirname,
FILE *  p_fout 
)

Definition at line 240 of file dlt_cdh_context.c.

References CDH_NOK, CDH_OK, CORE_MAX_FILENAME_LENGTH, NULL, and strmode().

Referenced by write_proc_context().

void strmode ( mode_t  mode,
char *  str 
)

Definition at line 202 of file dlt_cdh_context.c.

References ftypelet(), and NULL.

Referenced by list_dircontent_to().

Variable Documentation

char g_buffer[4096]

Definition at line 39 of file dlt_cdh_context.c.

Referenced by dump_file_to(), and get_exec_name().