mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
unify log initialisation code in villas-hook
This commit is contained in:
parent
858dfdd35a
commit
e1813f5803
1 changed files with 7 additions and 3 deletions
10
src/hook.c
10
src/hook.c
|
@ -39,7 +39,11 @@ static void usage()
|
|||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int j, ret, cnt = 1;
|
||||
int j, ret, level, cnt;
|
||||
|
||||
/* Default values */
|
||||
level = V;
|
||||
cnt = 1;
|
||||
|
||||
char *name, *parameter;
|
||||
|
||||
|
@ -57,7 +61,7 @@ int main(int argc, char *argv[])
|
|||
cnt = atoi(optarg);
|
||||
break;
|
||||
case 'd':
|
||||
log.level = atoi(optarg);
|
||||
level = atoi(optarg);
|
||||
break;
|
||||
case 'h':
|
||||
case '?':
|
||||
|
@ -66,7 +70,7 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
}
|
||||
|
||||
log_init(&log, log.level, LOG_ALL);
|
||||
log_init(&log, level, LOG_ALL);
|
||||
memory_init(DEFAULT_NR_HUGEPAGES);
|
||||
|
||||
if (argc < optind + 1) {
|
||||
|
|
Loading…
Add table
Reference in a new issue