From 646f76c58bc81b2d41163b2e9dfcf279ebd9e887 Mon Sep 17 00:00:00 2001 From: Radoslaw Kaczorowski Date: Mon, 17 Jun 2019 11:19:22 +0700 Subject: define DLT_PATH_MAX for max path buffer length DLT limits the path length and does not do anything else to determine the actual value, because the least that is supported on any system that DLT runs on is 1024 bytes. Signed-off-by: Vo Trung Chi --- include/dlt/dlt_common.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'include/dlt') diff --git a/include/dlt/dlt_common.h b/include/dlt/dlt_common.h index acc1135..e41fa5c 100644 --- a/include/dlt/dlt_common.h +++ b/include/dlt/dlt_common.h @@ -349,6 +349,14 @@ enum { # define DLT_RCV_SKIP_HEADER (1 << 0) # define DLT_RCV_REMOVE (1 << 1) +/** + * Maximal length of path in DLT + * DLT limits the path length and does not do anything else to determine + * the actual value, because the least that is supported on any system + * that DLT runs on is 1024 bytes. + */ +# define DLT_PATH_MAX 1024 + /** * Maximal length of mounted path */ @@ -413,7 +421,7 @@ extern char dltSerialHeaderChar[DLT_ID_SIZE]; /** * The common base-path of the dlt-daemon-fifo and application-generated fifos */ -extern char dltFifoBaseDir[PATH_MAX + 1]; +extern char dltFifoBaseDir[DLT_PATH_MAX]; /** * The type of a DLT ID (context id, application id, etc.) -- cgit v1.2.1