diff --git a/system/adb/adb_banner.c b/system/adb/adb_banner.c index ee4ca96ae..e1c54fbbb 100644 --- a/system/adb/adb_banner.c +++ b/system/adb/adb_banner.c @@ -1,5 +1,5 @@ /**************************************************************************** - * apps/system/adb/adb_main.c + * apps/system/adb/adb_banner.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/system/adb/adb_main.c b/system/adb/adb_main.c index 2840e75a3..ca658fc40 100644 --- a/system/adb/adb_main.c +++ b/system/adb/adb_main.c @@ -24,6 +24,9 @@ #include "adb.h" +#include +#include + #if defined(CONFIG_ADBD_BOARD_INIT) || defined (CONFIG_BOARDCTL_RESET) # include #endif @@ -38,11 +41,13 @@ void adb_log_impl(FAR const char *func, int line, FAR const char *fmt, ...) { + struct va_format vaf; va_list ap; - fprintf(stderr, "%s (%d): ", func, line); va_start(ap, fmt); - vfprintf(stderr, fmt, ap); + vaf.fmt = fmt; + vaf.va = ≈ + syslog(LOG_ERR, "%s (%d): %pV", func, line, &vaf); va_end(ap); } @@ -57,13 +62,9 @@ void adb_reboot_impl(const char *target) int main(int argc, FAR char **argv) { - UNUSED(argc); - UNUSED(argv); - adb_context_t *ctx; #ifdef CONFIG_ADBD_BOARD_INIT -{ boardctl(BOARDIOC_INIT, 0); #if defined(CONFIG_ADBD_USB_SERVER) && \ @@ -106,8 +107,6 @@ int main(int argc, FAR char **argv) return 1; } #endif /* ADBD_USB_SERVER && USBDEV_COMPOSITE && BOARDCTL_USBDEVCTRL */ -} - #endif /* CONFIG_ADBD_BOARD_INIT */ #ifdef CONFIG_ADBD_NET_INIT