refactor: Entire code base, thread and log usage
Boils down to: - Include headers - Reduce boiler plate with helpers - Swap out explicit usages with core API layer and ensure the right API is configured beforehand
This commit is contained in:
@@ -4,6 +4,7 @@ ldflags_ezusb2-tool := \
|
||||
-lsetupapi \
|
||||
|
||||
libs_ezusb2-tool := \
|
||||
core \
|
||||
ezusb2 \
|
||||
ezusb \
|
||||
util \
|
||||
|
||||
@@ -3,11 +3,13 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "core/log-bt-ext.h"
|
||||
#include "core/log-bt.h"
|
||||
#include "core/log.h"
|
||||
|
||||
#include "ezusb/util.h"
|
||||
#include "ezusb2/ezusb2.h"
|
||||
|
||||
#include "util/log.h"
|
||||
|
||||
static int scan()
|
||||
{
|
||||
char *path;
|
||||
@@ -122,7 +124,8 @@ int main(int argc, char **argv)
|
||||
|
||||
arg_pos = 1;
|
||||
|
||||
log_to_writer(log_writer_stderr, NULL);
|
||||
core_log_bt_ext_impl_set();
|
||||
core_log_bt_ext_init_with_stderr();
|
||||
|
||||
if (!strcmp(argv[arg_pos], "scan")) {
|
||||
return scan();
|
||||
|
||||
Reference in New Issue
Block a user