summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortakeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp>2020-10-22 13:51:25 +0900
committertakeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp>2020-10-22 13:51:25 +0900
commita7fe0018bf2edf94754b530d93e4a70e7e0141c1 (patch)
treed3f9f76050c9538ef1084fe3a46ef3bb7a714768
parent60b74f383d8ac4de8b6ae5b70f58d3bf806ba01f (diff)
ns-loglibrary branch 0.1sandbox/ToshikazuOhiwa/ns-loglibrary
-rw-r--r--log_library/Makefile.client2
-rw-r--r--log_library/client/Makefile2
-rw-r--r--log_library/client/include/loglibrarylog_internal.h2
-rw-r--r--log_library/client/include/native_service/loglibrarylog_if.h6
-rw-r--r--log_library/client/include/native_service/loglibrarylog_library.h2
-rw-r--r--log_library/client/src/loglibrarylog.c10
-rw-r--r--native_service.mk2
7 files changed, 17 insertions, 9 deletions
diff --git a/log_library/Makefile.client b/log_library/Makefile.client
index d9dbe494..fb995b35 100644
--- a/log_library/Makefile.client
+++ b/log_library/Makefile.client
@@ -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/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) {
diff --git a/native_service.mk b/native_service.mk
index 5cf73b78..729362ca 100644
--- a/native_service.mk
+++ b/native_service.mk
@@ -1,7 +1,7 @@
#############################################################
#
# Common Makefile for native_service
-# Copyright (C) 2017-2019 TOYOTA MOTOR CORPORATION
+# 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.