Skip to content

Commit

Permalink
tools: usid: move _init_usid after logging is initialized
Browse files Browse the repository at this point in the history
  • Loading branch information
prajnoha committed Dec 6, 2023
1 parent d41ed00 commit f028b74
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/tools/usid/usid.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,6 @@ int main(int argc, char *argv[])
int verbose = 0;
int r = -1;

if (_init_usid()) {
log_error(LOG_PREFIX, "_init_usid failed");
return EXIT_FAILURE;
}

struct option longopts[] = {{"help", 0, NULL, 'h'},
{"verbose", 0, NULL, 'v'},
{"version", 0, NULL, 'V'},
Expand Down Expand Up @@ -309,6 +304,11 @@ int main(int argc, char *argv[])

log_init(LOG_TARGET_STANDARD, verbose);

if (_init_usid()) {
log_error(LOG_PREFIX, "_init_usid failed");
return EXIT_FAILURE;
}

switch (sid_cmd_name_to_type(argv[optind])) {
case SID_CMD_ACTIVE:
r = _usid_cmd_active();
Expand Down

0 comments on commit f028b74

Please sign in to comment.