diff options
Diffstat (limited to 'log_library/client')
5 files changed, 15 insertions, 7 deletions
diff --git a/log_library/client/Makefile b/log_library/client/Makefile index eb9c0c7f..24279270 100644 --- a/log_library/client/Makefile +++ b/log_library/client/Makefile @@ -1,5 +1,5 @@ # -# @copyright Copyright (c) 2017-2019 TOYOTA MOTOR CORPORATION. +# @copyright Copyright (c) 2017-2020 TOYOTA MOTOR CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/log_library/client/include/loglibrarylog_internal.h b/log_library/client/include/loglibrarylog_internal.h index 19ae0d38..af6e7cf1 100644 --- a/log_library/client/include/loglibrarylog_internal.h +++ b/log_library/client/include/loglibrarylog_internal.h @@ -1,5 +1,5 @@ /* - * @copyright Copyright (c) 2016-2019 TOYOTA MOTOR CORPORATION. + * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/log_library/client/include/native_service/loglibrarylog_if.h b/log_library/client/include/native_service/loglibrarylog_if.h index 7557ffa5..5bf90c3a 100644 --- a/log_library/client/include/native_service/loglibrarylog_if.h +++ b/log_library/client/include/native_service/loglibrarylog_if.h @@ -1,5 +1,5 @@ /* - * @copyright Copyright (c) 2016-2019 TOYOTA MOTOR CORPORATION. + * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,8 +34,8 @@ #define __LOGLIBRARYLOG_IF_H__ #define FRAMEWORKUNIFIEDLOG_SHARED_MEM_NAME "loglibrarylogconfig.cfg" -#define LOGLIBRARYLOG_RAMDISC_NAME "/ramd/log/frameworkunifiedlog/frameworkunified_debug.log" -#define FRAMEWORKUNIFIEDLOG_RAMDISC_PATH "/ramd/log/frameworkunifiedlog" +#define FRAMEWORKUNIFIEDLOG_RAMDISC_NAME "/ramd/BS/ss/logger_service/rwdata/frameworkunifiedlog/frameworkunified_debug.log" +#define FRAMEWORKUNIFIEDLOG_RAMDISC_PATH "/ramd/BS/ss/logger_service/rwdata/frameworkunifiedlog" // Out put mode #define FRAMEWORKUNIFIEDLOG_FLAG_MODE_DEBUG 1 // Debug diff --git a/log_library/client/include/native_service/loglibrarylog_library.h b/log_library/client/include/native_service/loglibrarylog_library.h index 8687c288..60edd01f 100644 --- a/log_library/client/include/native_service/loglibrarylog_library.h +++ b/log_library/client/include/native_service/loglibrarylog_library.h @@ -1,5 +1,5 @@ /* - * @copyright Copyright (c) 2017-2019 TOYOTA MOTOR CORPORATION. + * @copyright Copyright (c) 2017-2020 TOYOTA MOTOR CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/log_library/client/src/loglibrarylog.c b/log_library/client/src/loglibrarylog.c index f2009354..7aa7c2b6 100644 --- a/log_library/client/src/loglibrarylog.c +++ b/log_library/client/src/loglibrarylog.c @@ -1,5 +1,5 @@ /* - * @copyright Copyright (c) 2016-2019 TOYOTA MOTOR CORPORATION. + * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,6 +28,7 @@ int LOGLIBRARYLOG_Freeze(void) { int fd; int *pmap; + int ret; fd = shm_open(FRAMEWORKUNIFIEDLOG_SHARED_MEM_NAME, O_RDWR | O_CREAT, S_IRWXU | S_IRWXO); if (fd == -1) { @@ -36,6 +37,13 @@ LOGLIBRARYLOG_Freeze(void) { return -1; } + ret = ftruncate(fd, sizeof(int)); + if (ret == 0) { + fprintf(stderr, "[%s:L%d]ftruncate() error(%d)\n", __FUNCTION__, __LINE__, ret); + close(fd); + return -1; + } + pmap = mmap(NULL, sizeof(int), PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); close(fd); if (pmap == MAP_FAILED) { |