automotive-dlt
dlt-logstorage-list.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int logstorage_store_dev_info (const char *node, const char *path)
 Add new device in the list. More...
 
char * logstorage_delete_dev_info (const char *node)
 Remove a device from the list. More...
 

Detailed Description

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.

Author
Christoph Lipka clipk.nosp@m.a@jp.nosp@m..adit.nosp@m.-jv..nosp@m.com
Anitha BA anith.nosp@m.aamm.nosp@m.aji.b.nosp@m.agga.nosp@m.m@in..nosp@m.bosc.nosp@m.h.com ADIT 2015
Frederic Berat fbera.nosp@m.t@de.nosp@m..adit.nosp@m.-jv..nosp@m.com ADIT 2015

For further information see http://www.genivi.org/. end@

Definition in file dlt-logstorage-list.h.

Function Documentation

char* logstorage_delete_dev_info ( const char *  node)

Remove a device from the list.

If the device is removed from the list, the mount point pointer is given back to the caller. That means that he has to free it.

Parameters
nodeThe device node to be removed
Returns
the mount point if the node is found, NULL either.

Definition at line 197 of file dlt-logstorage-list.c.

References LogstorageDeviceInfo::dev_node, g_info, logstorage_find_dev_info(), LogstorageDeviceInfo::mnt_point, LogstorageDeviceInfo::next, NULL, pr_verbose, LogstorageDeviceInfo::prev, and print_list().

Referenced by check_mountpoint_from_partition().

int logstorage_store_dev_info ( const char *  node,
const char *  path 
)

Add new device in the list.

The device is only added if a configuration file has been found and if it's not already in the list.

Parameters
nodeThe device node to add
pathThe corresponding mount point path
Returns
0 on success, -1 in case of error.

Definition at line 143 of file dlt-logstorage-list.c.

References LogstorageDeviceInfo::dev_node, DLT_MOUNT_PATH_MAX, g_info, logstorage_find_dev_info(), LogstorageDeviceInfo::mnt_point, LogstorageDeviceInfo::next, NULL, pr_error, pr_verbose, LogstorageDeviceInfo::prev, and print_list().

Referenced by check_mountpoint_from_partition().