automotive-dlt
|
Go to the source code of this file.
Data Structures | |
struct | DltLogstorageCtrl |
Macros | |
#define | CONF_NAME "dlt_logstorage.conf" |
#define | EVENT_UNMOUNTING 0 |
#define | EVENT_MOUNTED 1 |
#define | EVENT_SYNC_CACHE 2 |
Enumerations | |
enum | DltLogstorageHandler { CTRL_NOHANDLER = 0, CTRL_UDEV, CTRL_PROPRIETARY } |
Functions | |
DltLogstorageHandler | get_handler_type (void) |
void | set_handler_type (char *) |
char * | get_default_path (void) |
void | set_default_path (char *) |
int | get_default_event_type (void) |
void | set_default_event_type (long type) |
DltLogstorageCtrl * | get_logstorage_control (void) |
void * | dlt_logstorage_get_handler_cb (void) |
int | dlt_logstorage_get_handler_fd (void) |
int | dlt_logstorage_init_handler (void) |
Initialized the handler based on configuration. More... | |
int | dlt_logstorage_deinit_handler (void) |
Clean-up the handler based on configuration. More... | |
int | dlt_logstorage_send_event (int, char *) |
Send a logstorage event to DLT. More... | |
int | dlt_logstorage_check_config_file (char *) |
Search for config file in given mount point. More... | |
int | dlt_logstorage_check_directory_permission (char *mnt_point) |
Check if given mount point is writable. More... | |
app begin@ Copyright (C) 2013 - 2015 Advanced Driver Information Technology. This code is developed by Advanced Driver Information Technology. Copyright of Advanced Driver Information Technology, Bosch and DENSO.
This file is part of GENIVI Project Dlt - Diagnostic Log and Trace console apps.
For further information see http://www.genivi.org/. end@
Definition in file dlt-logstorage-common.h.
#define CONF_NAME "dlt_logstorage.conf" |
Definition at line 28 of file dlt-logstorage-common.h.
Referenced by dlt_logstorage_check_config_file(), and dlt_logstorage_ctrl_single_request().
#define EVENT_MOUNTED 1 |
Definition at line 31 of file dlt-logstorage-common.h.
Referenced by check_mountpoint_from_partition(), dlt_logstorage_udev_check_mounted(), and logstorage_udev_udevd_callback().
#define EVENT_SYNC_CACHE 2 |
Definition at line 32 of file dlt-logstorage-common.h.
Referenced by dlt_logstorage_ctrl_single_request(), and parse_args().
#define EVENT_UNMOUNTING 0 |
Definition at line 30 of file dlt-logstorage-common.h.
Referenced by logstorage_udev_udevd_callback().
enum DltLogstorageHandler |
Enumerator | |
---|---|
CTRL_NOHANDLER |
one shot application |
CTRL_UDEV |
Handles udev events |
CTRL_PROPRIETARY |
Handles proprietary event |
Definition at line 34 of file dlt-logstorage-common.h.
int dlt_logstorage_check_config_file | ( | char * | mnt_point | ) |
Search for config file in given mount point.
The file is searched at the top directory. The function exits once it founds it.
mnt_point | The mount point to check |
Definition at line 196 of file dlt-logstorage-common.c.
References CONF_NAME, NULL, pr_error, and pr_verbose.
Referenced by check_mountpoint_from_partition(), and dlt_logstorage_ctrl_single_request().
int dlt_logstorage_check_directory_permission | ( | char * | mnt_point | ) |
Check if given mount point is writable.
mnt_point | The mount point to check |
Definition at line 248 of file dlt-logstorage-common.c.
References NULL, and pr_error.
Referenced by dlt_logstorage_ctrl_single_request().
int dlt_logstorage_deinit_handler | ( | void | ) |
Clean-up the handler based on configuration.
Definition at line 171 of file dlt-logstorage-common.c.
References CTRL_PROPRIETARY, CTRL_UDEV, dlt_logstorage_prop_deinit(), dlt_logstorage_udev_deinit(), and get_handler_type().
Referenced by dlt_logstorage_ctrl_setup_event_loop().
void* dlt_logstorage_get_handler_cb | ( | void | ) |
Definition at line 137 of file dlt-logstorage-common.c.
References DltLogstorageCtrl::callback.
Referenced by dlt_logstorage_ctrl_setup_event_loop().
int dlt_logstorage_get_handler_fd | ( | void | ) |
Definition at line 142 of file dlt-logstorage-common.c.
References DltLogstorageCtrl::fd.
Referenced by dlt_logstorage_ctrl_setup_event_loop().
int dlt_logstorage_init_handler | ( | void | ) |
Initialized the handler based on configuration.
Definition at line 151 of file dlt-logstorage-common.c.
References CTRL_PROPRIETARY, CTRL_UDEV, dlt_logstorage_prop_init(), dlt_logstorage_udev_init(), and get_handler_type().
Referenced by dlt_logstorage_ctrl_setup_event_loop().
int dlt_logstorage_send_event | ( | int | type, |
char * | mount_point | ||
) |
Send a logstorage event to DLT.
Send an event to the dlt daemon
type | Event type (EVENT_UNMOUNTING/EVENT_MOUNTED) |
mount_point | The mount point path concerned by this event |
type | The type of the event (Mounted/Unmounting) |
mount_point | The mount point for this event |
Definition at line 327 of file dlt-logstorage-common.c.
References DltControlMsgBody::data, dlt_control_send_message(), get_timeout(), NULL, pr_error, and prepare_message_body().
Referenced by check_mountpoint_from_partition(), and dlt_logstorage_ctrl_single_request().
int get_default_event_type | ( | void | ) |
Definition at line 104 of file dlt-logstorage-common.c.
References LogstorageOptions::event_type, and g_options.
Referenced by dlt_logstorage_ctrl_single_request(), and parse_args().
char* get_default_path | ( | void | ) |
Definition at line 114 of file dlt-logstorage-common.c.
References LogstorageOptions::device_path, and g_options.
Referenced by dlt_logstorage_ctrl_single_request().
DltLogstorageHandler get_handler_type | ( | void | ) |
Definition at line 89 of file dlt-logstorage-common.c.
References g_options, and LogstorageOptions::handler_type.
Referenced by dlt_logstorage_deinit_handler(), dlt_logstorage_init_handler(), main(), and parse_args().
DltLogstorageCtrl* get_logstorage_control | ( | void | ) |
Definition at line 132 of file dlt-logstorage-common.c.
References lctrl.
Referenced by dlt_logstorage_udev_deinit(), dlt_logstorage_udev_init(), and logstorage_udev_udevd_callback().
void set_default_event_type | ( | long | type | ) |
Definition at line 109 of file dlt-logstorage-common.c.
References LogstorageOptions::event_type, and g_options.
Referenced by parse_args().
void set_default_path | ( | char * | ) |
Definition at line 119 of file dlt-logstorage-common.c.
References LogstorageOptions::device_path, DLT_MOUNT_PATH_MAX, g_options, and NULL.
Referenced by parse_args().
void set_handler_type | ( | char * | ) |
Definition at line 94 of file dlt-logstorage-common.c.
References check_proprietary_handling(), CTRL_PROPRIETARY, CTRL_UDEV, g_options, and LogstorageOptions::handler_type.
Referenced by parse_args().