Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
celllframe-node
Manage
Activity
Members
Labels
Plan
Issues
5
Issue boards
Milestones
Code
Merge requests
17
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cellframe
celllframe-node
Commits
35ca19c3
Commit
35ca19c3
authored
5 years ago
by
Alexandr Mruchok
Committed by
dmitriy.gerasimov
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
feature 2648
parent
b0859e8f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
sources/cellframe_node.h
+0
-6
0 additions, 6 deletions
sources/cellframe_node.h
sources/dap_defines.h
+8
-0
8 additions, 0 deletions
sources/dap_defines.h
sources/main.c
+2
-1
2 additions, 1 deletion
sources/main.c
with
10 additions
and
7 deletions
sources/cellframe_node.h
+
0
−
6
View file @
35ca19c3
...
...
@@ -5,16 +5,10 @@
extern
"C"
{
#endif
#ifdef __ANDROID__
#define LOG_PATH
int
cellframe_node_Main
(
int
argc
,
const
char
**
argv
);
int
cellframe_node__cli_Main
(
int
argc
,
const
char
*
argv
[]);
int
cellframe_node_tool_Main
(
int
argc
,
const
char
**
argv
);
#endif
#ifdef __cplusplus
}
#endif
...
...
This diff is collapsed.
Click to expand it.
sources/dap_defines.h
+
8
−
0
View file @
35ca19c3
#pragma once
#define NODE_NETNAME "cellframe"
#define DAP_APP_NAME NODE_NETNAME "-node"
//#ifdef _WIN32
// #define SYSTEM_PREFIX "%USERPROFILE%/opt/"DAP_APP_NAME
//#else
#ifdef __ANDROID__
#define ANDROID_STORAGE_PATH "/storage/emulated/0"
#define SYSTEM_PREFIX ANDROID_STORAGE_PATH "/opt/" DAP_APP_NAME
#else
#define SYSTEM_PREFIX "/opt/" DAP_APP_NAME
#endif
// #define SYSTEM_PREFIX "opt/"DAP_APP_NAME
//#endif
...
...
@@ -13,6 +20,7 @@
#define SYSTEM_CONFIGS_DIR SYSTEM_PREFIX"/etc"
#define LOCAL_CONFIGS_DIR LOCAL_PREFIX"/etc"
#define SYSTEM_LOGS_DIR SYSTEM_PREFIX"/var/log"
#define SYSTEM_LOGS_PATH SYSTEM_LOGS_DIR "/" DAP_APP_NAME ".log"
#define SYSTEM_CONFIG_GLOBAL_FILENAME SYSTEM_PREFIX"/etc/" DAP_APP_NAME".cfg"
#define LOCAL_CONFIG_GLOBAL LOCAL_PREFIX"/etc/" DAP_APP_NAME".cfg"
...
...
This diff is collapsed.
Click to expand it.
sources/main.c
+
2
−
1
View file @
35ca19c3
...
...
@@ -157,7 +157,8 @@ int main( int argc, const char **argv )
memcpy
(
l_log_file_path
,
s_sys_dir_path
,
l_sys_dir_path_len
);
memcpy
(
s_pid_file_path
,
s_sys_dir_path
,
l_sys_dir_path_len
);
#endif
dap_snprintf
(
l_log_file_path
+
l_sys_dir_path_len
,
sizeof
(
l_log_file_path
),
"%s/%s.log"
,
SYSTEM_LOGS_DIR
,
DAP_APP_NAME
);
dap_snprintf
(
l_log_file_path
+
l_sys_dir_path_len
,
sizeof
(
l_log_file_path
),
"%s"
,
SYSTEM_LOGS_PATH
);
dap_mkdir_with_parents
(
SYSTEM_LOGS_DIR
);
if
(
dap_common_init
(
DAP_APP_NAME
,
l_log_file_path
)
!=
0
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment