summaryrefslogtreecommitdiff
path: root/src/offlinelogstorage/dlt_offline_logstorage.h
diff options
context:
space:
mode:
authorSaya Sugiura <ssugiura@jp.adit-jv.com>2020-07-31 18:13:14 +0900
committerSaya Sugiura <39760799+ssugiura@users.noreply.github.com>2021-01-06 09:27:28 +0900
commit0955febc56bf8ad49b0eabd7fc7970fd852becde (patch)
tree1abe6949ed4510bfa8cdbb97425a044a9c3ed6a1 /src/offlinelogstorage/dlt_offline_logstorage.h
parent9ed8fa6b42954562eba6f93c1c1734c7e0e70019 (diff)
downloadDLT-daemon-0955febc56bf8ad49b0eabd7fc7970fd852becde.tar.gz
logstorage: Handle wrap-around
In case there is wrap-around, the newest file must be decided based on the biggest wrap_id and corresponding working filename. Signed-off-by: Bui Nguyen Quoc Thanh <thanh.buinguyenquoc@vn.bosch.com> Signed-off-by: Dinh Cong Toan(RBVH/ECM12) <Toan.DinhCong@vn.bosch.com>
Diffstat (limited to 'src/offlinelogstorage/dlt_offline_logstorage.h')
-rw-r--r--src/offlinelogstorage/dlt_offline_logstorage.h22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/offlinelogstorage/dlt_offline_logstorage.h b/src/offlinelogstorage/dlt_offline_logstorage.h
index c9bc93b..b4acbfa 100644
--- a/src/offlinelogstorage/dlt_offline_logstorage.h
+++ b/src/offlinelogstorage/dlt_offline_logstorage.h
@@ -143,6 +143,16 @@ typedef struct DltLogStorageFileList
struct DltLogStorageFileList *next; /* Pointer to next */
} DltLogStorageFileList;
+typedef struct DltNewestFileName DltNewestFileName;
+
+struct DltNewestFileName
+{
+ char *file_name; /* The unique name of file in whole a dlt_logstorage.conf */
+ char *newest_file; /* The real newest name of file which is associated with filename.*/
+ unsigned int wrap_id; /* Identifier of wrap around happened for this file_name */
+ DltNewestFileName *next; /* Pointer to next */
+};
+
typedef struct DltLogStorageFilterConfig DltLogStorageFilterConfig;
struct DltLogStorageFilterConfig
@@ -154,6 +164,7 @@ struct DltLogStorageFilterConfig
int reset_log_level; /* reset Log level to be sent on disconnect */
char *file_name; /* File name for log storage configured for filter */
char *working_file_name; /* Current open log file name */
+ unsigned int wrap_id; /* Identifier of wrap around happened for this filter */
unsigned int file_size; /* MAX File size of storage file configured for filter */
unsigned int num_files; /* MAX number of storage files configured for filters */
int sync; /* Sync strategy */
@@ -163,7 +174,7 @@ struct DltLogStorageFilterConfig
DltLogStorageUserConfig *file_config,
char *dev_path,
int log_msg_size,
- char *newest_file);
+ DltNewestFileName *newest_file_info);
int (*dlt_logstorage_write)(DltLogStorageFilterConfig *config,
DltLogStorageUserConfig *file_config,
char *dev_path,
@@ -196,15 +207,6 @@ struct DltLogStorageFilterList
DltLogStorageFilterList *next; /* Pointer to next */
};
-typedef struct DltNewestFileName DltNewestFileName;
-
-struct DltNewestFileName
-{
- char *file_name; /* The unique name of file in whole a dlt_logstorage.conf */
- char *newest_file; /* The real newest name of file which is associated with filename.*/
- DltNewestFileName *next; /* Pointer to next */
-};
-
typedef struct
{
DltLogStorageFilterList *config_list; /* List of all filters */