From 321375a7f39f9e457953e1ab2be15f63f5c5ba0e Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 30 May 2016 13:30:59 -0600 Subject: [PATCH 01/74] Update ChangeLog --- ChangeLog.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ChangeLog.txt b/ChangeLog.txt index cf8d02332..5675860a9 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1599,3 +1599,5 @@ (NUCLEO-F746ZG). From Mark Olsson (2016-05-19). * apps/netutils/esp8266: ESP8266 driver application. From Pierre-noel Bouteville (2016-05-21). + * apps/canutils/: Rename uavcan to libuavcan. From Paul Antony Patience + (2016-05-25). From 52c993f9dfcda59eee1040d0dd95b840fdc79a27 Mon Sep 17 00:00:00 2001 From: "Paul A. Patience" Date: Tue, 31 May 2016 07:58:24 -0400 Subject: [PATCH 02/74] Fix typo in ChangeLog --- ChangeLog.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 5675860a9..1d18b0b73 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1599,5 +1599,5 @@ (NUCLEO-F746ZG). From Mark Olsson (2016-05-19). * apps/netutils/esp8266: ESP8266 driver application. From Pierre-noel Bouteville (2016-05-21). - * apps/canutils/: Rename uavcan to libuavcan. From Paul Antony Patience - (2016-05-25). + * apps/canutils/: Rename uavcan to libuavcan. From Paul Alexander + Patience (2016-05-25). From 6142ed8e61aa27cedd369b7c966123857fac41fd Mon Sep 17 00:00:00 2001 From: Sebastien Lorquet Date: Wed, 1 Jun 2016 08:15:10 -0600 Subject: [PATCH 03/74] apps/exmamples/media: Allow choosign the device to be tested via a comman line argument --- ChangeLog.txt | 4 ++++ examples/media/Kconfig | 3 +++ examples/media/media_main.c | 18 ++++++++++++++---- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 1d18b0b73..908755512 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1601,3 +1601,7 @@ Bouteville (2016-05-21). * apps/canutils/: Rename uavcan to libuavcan. From Paul Alexander Patience (2016-05-25). + * apps/examples/media: You can now override the default device driver + path by providing an alternal path on the command line. From Sébastien + Lorquet (2016-06-01). + diff --git a/examples/media/Kconfig b/examples/media/Kconfig index 6450cb1d8..dec5a9a97 100644 --- a/examples/media/Kconfig +++ b/examples/media/Kconfig @@ -49,6 +49,9 @@ config EXAMPLES_MEDIA_DEVPATH ret = bchdev_register(/dev/mtdblock, , false); + NOTE: This drivr path can be overridden when the application is + executed by providing a differ device path on the 'media' command line. + config EXAMPLES_MEDIA_BLOCKSIZE int "Block size" default 512 diff --git a/examples/media/media_main.c b/examples/media/media_main.c index b1e94e2e8..6cbf21a36 100644 --- a/examples/media/media_main.c +++ b/examples/media/media_main.c @@ -127,11 +127,12 @@ static void get_blocksize(int fd, FAR struct media_info_s *info) #ifdef CONFIG_BUILD_KERNEL int main(int argc, FAR char *argv[]) #else -int media_main(int argc, char *argv[]) +int media_main(int argc, FAR char *argv[]) #endif { FAR uint8_t *txbuffer; FAR uint8_t *rxbuffer; + FAR char *devpath; struct media_info_s info; ssize_t nwritten; ssize_t nread; @@ -145,14 +146,23 @@ int media_main(int argc, char *argv[]) /* Open the character driver that wraps the media */ - fd = open(CONFIG_EXAMPLES_MEDIA_DEVPATH, O_RDWR); + if (argc < 2) + { + devpath = CONFIG_EXAMPLES_MEDIA_DEVPATH; + } + else + { + devpath = argv[1]; + } + + fd = open(argv[1], O_RDWR); + if (fd < 0) { fprintf(stderr, "ERROR: failed to open %s: %d\n", - CONFIG_EXAMPLES_MEDIA_DEVPATH, errno); + devpath, errno); return 1; } - /* Get the block size to use */ get_blocksize(fd, &info); From 7fff9a000ae99030a35b5e512c99c7ac3569538e Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 1 Jun 2016 15:45:56 -0600 Subject: [PATCH 04/74] Prep for NuttX-7.16 release --- ChangeLog.txt | 3 ++- examples/alarm/alarm_main.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 908755512..3c3ba70fd 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1574,7 +1574,7 @@ USB device interfaces that do not yet have boardctl() commands (2016-03-25). -7.16 2016-xx-xx Gregory Nutt +7.16 2016-06-01 Gregory Nutt * apps/system/sdcard: Remove the SD card application. This application violates OS/application interface rules and has been @@ -1605,3 +1605,4 @@ path by providing an alternal path on the command line. From Sébastien Lorquet (2016-06-01). +7.17 2016-xx-xx Gregory Nutt diff --git a/examples/alarm/alarm_main.c b/examples/alarm/alarm_main.c index 582cfe04b..7bfb4870b 100644 --- a/examples/alarm/alarm_main.c +++ b/examples/alarm/alarm_main.c @@ -307,7 +307,7 @@ int alarm_main(int argc, FAR char *argv[]) return EXIT_FAILURE; } - printf("Alarm set in %lu seconds\n", seconds); + printf("Alarm %d set in %lu seconds\n", alarmid, seconds); (void)close(fd); return EXIT_SUCCESS; } From 59973da9cafd6a57bec5bd6fae267859e6b622a6 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 2 Jun 2016 06:58:45 -0600 Subject: [PATCH 05/74] apps/examples/alarm: ioctl call was clobbering file descriptor. --- examples/alarm/alarm_main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/alarm/alarm_main.c b/examples/alarm/alarm_main.c index 7bfb4870b..9a2626c30 100644 --- a/examples/alarm/alarm_main.c +++ b/examples/alarm/alarm_main.c @@ -279,6 +279,7 @@ int alarm_main(int argc, FAR char *argv[]) /* Open the RTC driver */ printf("Opening %s\n", CONFIG_EXAMPLES_ALARM_DEVPATH); + fd = open(CONFIG_EXAMPLES_ALARM_DEVPATH, O_WRONLY); if (fd < 0) { @@ -297,17 +298,20 @@ int alarm_main(int argc, FAR char *argv[]) setrel.sigvalue.sival_int = alarmid; - fd = ioctl(fd, RTC_SET_RELATIVE, (unsigned long)((uintptr_t)&setrel)); - if (fd < 0) + ret = ioctl(fd, RTC_SET_RELATIVE, (unsigned long)((uintptr_t)&setrel)); + if (ret < 0) { int errcode = errno; + fprintf(stderr, "ERROR: RTC_SET_RELATIVE ioctl failed: %d\n", errcode); + (void)close(fd); return EXIT_FAILURE; } printf("Alarm %d set in %lu seconds\n", alarmid, seconds); + (void)close(fd); return EXIT_SUCCESS; } From bfff7dc4caec5fc62a024be052e9dcd73f52f9e5 Mon Sep 17 00:00:00 2001 From: Sebastien Lorquet Date: Thu, 2 Jun 2016 15:23:50 +0200 Subject: [PATCH 06/74] add kmenu files --- canutils/Kmenu | 1 + examples/Kmenu | 1 + fsutils/Kmenu | 1 + gpsutils/Kmenu | 1 + graphics/Kmenu | 1 + interpreters/Kmenu | 1 + netutils/Kmenu | 1 + system/Kmenu | 1 + 8 files changed, 8 insertions(+) create mode 100644 canutils/Kmenu create mode 100644 examples/Kmenu create mode 100644 fsutils/Kmenu create mode 100644 gpsutils/Kmenu create mode 100644 graphics/Kmenu create mode 100644 interpreters/Kmenu create mode 100644 netutils/Kmenu create mode 100644 system/Kmenu diff --git a/canutils/Kmenu b/canutils/Kmenu new file mode 100644 index 000000000..695c934b6 --- /dev/null +++ b/canutils/Kmenu @@ -0,0 +1 @@ +CAN Utilities diff --git a/examples/Kmenu b/examples/Kmenu new file mode 100644 index 000000000..ad6b7fb4b --- /dev/null +++ b/examples/Kmenu @@ -0,0 +1 @@ +Examples diff --git a/fsutils/Kmenu b/fsutils/Kmenu new file mode 100644 index 000000000..4e61ee913 --- /dev/null +++ b/fsutils/Kmenu @@ -0,0 +1 @@ +File System Utilities diff --git a/gpsutils/Kmenu b/gpsutils/Kmenu new file mode 100644 index 000000000..3fd21d77b --- /dev/null +++ b/gpsutils/Kmenu @@ -0,0 +1 @@ +GPS Utilities diff --git a/graphics/Kmenu b/graphics/Kmenu new file mode 100644 index 000000000..453def533 --- /dev/null +++ b/graphics/Kmenu @@ -0,0 +1 @@ +Graphics Support diff --git a/interpreters/Kmenu b/interpreters/Kmenu new file mode 100644 index 000000000..ec50152c2 --- /dev/null +++ b/interpreters/Kmenu @@ -0,0 +1 @@ +Interpreters diff --git a/netutils/Kmenu b/netutils/Kmenu new file mode 100644 index 000000000..3919aa206 --- /dev/null +++ b/netutils/Kmenu @@ -0,0 +1 @@ +Network Utilities diff --git a/system/Kmenu b/system/Kmenu new file mode 100644 index 000000000..038615da8 --- /dev/null +++ b/system/Kmenu @@ -0,0 +1 @@ +System Libraries and NSH Add-Ons From 9a406515d7d099b2c2eb6622257145f0db3d45bf Mon Sep 17 00:00:00 2001 From: Sebastien Lorquet Date: Thu, 2 Jun 2016 16:21:21 +0200 Subject: [PATCH 07/74] make the full tree use wildcards make.defs --- graphics/Make.defs | 12 +--- graphics/screenshot/Make.defs | 39 +++++++++++ graphics/tiff/Make.defs | 39 +++++++++++ graphics/traveler/Make.defs | 40 +++++++++++ interpreters/.gitignore | 1 - interpreters/Make.defs | 16 +---- interpreters/bas/Make.defs | 4 ++ interpreters/ficl/Make.defs | 4 ++ interpreters/micropython/Make.defs | 4 ++ interpreters/pcode/Make.defs | 4 ++ netutils/Make.defs | 76 +------------------- netutils/chat/Make.defs | 40 +++++++++++ netutils/codecs/Make.defs | 39 +++++++++++ netutils/dhcpc/Make.defs | 39 +++++++++++ netutils/dhcpd/Make.defs | 39 +++++++++++ netutils/discover/Make.defs | 39 +++++++++++ netutils/esp8266/Make.defs | 39 +++++++++++ netutils/ftpc/Make.defs | 39 +++++++++++ netutils/ftpd/Make.defs | 39 +++++++++++ netutils/json/Make.defs | 39 +++++++++++ netutils/netlib/Make.defs | 39 +++++++++++ netutils/ntpclient/Make.defs | 39 +++++++++++ netutils/pppd/Make.defs | 39 +++++++++++ netutils/smtp/Make.defs | 39 +++++++++++ netutils/telnetd/Make.defs | 39 +++++++++++ netutils/tftpc/Make.defs | 39 +++++++++++ netutils/thttpd/Make.defs | 39 +++++++++++ netutils/webclient/Make.defs | 39 +++++++++++ netutils/webserver/Make.defs | 39 +++++++++++ netutils/xmlrpc/Make.defs | 39 +++++++++++ system/Make.defs | 109 +---------------------------- system/cdcacm/Make.defs | 40 +++++++++++ system/cle/Make.defs | 40 +++++++++++ system/composite/Make.defs | 40 +++++++++++ system/cu/Make.defs | 40 +++++++++++ system/flash_eraseall/Make.defs | 40 +++++++++++ system/free/Make.defs | 40 +++++++++++ system/hex2bin/Make.defs | 40 +++++++++++ system/hexed/Make.defs | 40 +++++++++++ system/i2c/Make.defs | 40 +++++++++++ system/install/Make.defs | 40 +++++++++++ system/lm75/Make.defs | 40 +++++++++++ system/mdio/Make.defs | 40 +++++++++++ system/netdb/Make.defs | 40 +++++++++++ system/nxplayer/Make.defs | 40 +++++++++++ system/prun/Make.defs | 40 +++++++++++ system/ramtest/Make.defs | 40 +++++++++++ system/readline/Make.defs | 40 +++++++++++ system/sched_note/Make.defs | 40 +++++++++++ system/stackmonitor/Make.defs | 40 +++++++++++ system/sudoku/Make.defs | 40 +++++++++++ system/symtab/Make.defs | 40 +++++++++++ system/usbmonitor/Make.defs | 40 +++++++++++ system/usbmsc/Make.defs | 40 +++++++++++ system/vi/Make.defs | 40 +++++++++++ system/zmodem/Make.defs | 40 +++++++++++ system/zoneinfo/Make.defs | 40 +++++++++++ 57 files changed, 1920 insertions(+), 210 deletions(-) create mode 100644 graphics/screenshot/Make.defs create mode 100644 graphics/tiff/Make.defs create mode 100644 graphics/traveler/Make.defs create mode 100644 interpreters/bas/Make.defs create mode 100644 interpreters/ficl/Make.defs create mode 100644 interpreters/micropython/Make.defs create mode 100644 interpreters/pcode/Make.defs create mode 100644 netutils/chat/Make.defs create mode 100644 netutils/codecs/Make.defs create mode 100644 netutils/dhcpc/Make.defs create mode 100644 netutils/dhcpd/Make.defs create mode 100644 netutils/discover/Make.defs create mode 100644 netutils/esp8266/Make.defs create mode 100644 netutils/ftpc/Make.defs create mode 100644 netutils/ftpd/Make.defs create mode 100644 netutils/json/Make.defs create mode 100644 netutils/netlib/Make.defs create mode 100644 netutils/ntpclient/Make.defs create mode 100644 netutils/pppd/Make.defs create mode 100644 netutils/smtp/Make.defs create mode 100644 netutils/telnetd/Make.defs create mode 100644 netutils/tftpc/Make.defs create mode 100644 netutils/thttpd/Make.defs create mode 100644 netutils/webclient/Make.defs create mode 100644 netutils/webserver/Make.defs create mode 100644 netutils/xmlrpc/Make.defs create mode 100644 system/cdcacm/Make.defs create mode 100644 system/cle/Make.defs create mode 100644 system/composite/Make.defs create mode 100644 system/cu/Make.defs create mode 100644 system/flash_eraseall/Make.defs create mode 100644 system/free/Make.defs create mode 100644 system/hex2bin/Make.defs create mode 100644 system/hexed/Make.defs create mode 100644 system/i2c/Make.defs create mode 100644 system/install/Make.defs create mode 100644 system/lm75/Make.defs create mode 100644 system/mdio/Make.defs create mode 100644 system/netdb/Make.defs create mode 100644 system/nxplayer/Make.defs create mode 100644 system/prun/Make.defs create mode 100644 system/ramtest/Make.defs create mode 100644 system/readline/Make.defs create mode 100644 system/sched_note/Make.defs create mode 100644 system/stackmonitor/Make.defs create mode 100644 system/sudoku/Make.defs create mode 100644 system/symtab/Make.defs create mode 100644 system/usbmonitor/Make.defs create mode 100644 system/usbmsc/Make.defs create mode 100644 system/vi/Make.defs create mode 100644 system/zmodem/Make.defs create mode 100644 system/zoneinfo/Make.defs diff --git a/graphics/Make.defs b/graphics/Make.defs index 987c387b6..15499db75 100644 --- a/graphics/Make.defs +++ b/graphics/Make.defs @@ -34,14 +34,4 @@ # ############################################################################ -ifeq ($(CONFIG_TIFF),y) -CONFIGURED_APPS += graphics/tiff -endif - -ifeq ($(CONFIG_GRAPHICS_SCREENSHOT),y) -CONFIGURED_APPS += graphics/screenshot -endif - -ifeq ($(CONFIG_GRAPHICS_TRAVELER),y) -CONFIGURED_APPS += graphics/traveler -endif +include $(wildcard graphics/*/Make.defs) diff --git a/graphics/screenshot/Make.defs b/graphics/screenshot/Make.defs new file mode 100644 index 000000000..ca52928f6 --- /dev/null +++ b/graphics/screenshot/Make.defs @@ -0,0 +1,39 @@ +############################################################################ +# apps/graphics/screenshot/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2012 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_GRAPHICS_SCREENSHOT),y) +CONFIGURED_APPS += graphics/screenshot +endif diff --git a/graphics/tiff/Make.defs b/graphics/tiff/Make.defs new file mode 100644 index 000000000..ff2795356 --- /dev/null +++ b/graphics/tiff/Make.defs @@ -0,0 +1,39 @@ +############################################################################ +# apps/graphics/tiff/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2012 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_TIFF),y) +CONFIGURED_APPS += graphics/tiff +endif diff --git a/graphics/traveler/Make.defs b/graphics/traveler/Make.defs new file mode 100644 index 000000000..4e5495d42 --- /dev/null +++ b/graphics/traveler/Make.defs @@ -0,0 +1,40 @@ +############################################################################ +# apps/graphics/traveler/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2012 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_GRAPHICS_TRAVELER),y) +CONFIGURED_APPS += graphics/traveler +endif + diff --git a/interpreters/.gitignore b/interpreters/.gitignore index bee9a7372..e69de29bb 100644 --- a/interpreters/.gitignore +++ b/interpreters/.gitignore @@ -1 +0,0 @@ -/pcode diff --git a/interpreters/Make.defs b/interpreters/Make.defs index 98a675ee3..7893b58e7 100644 --- a/interpreters/Make.defs +++ b/interpreters/Make.defs @@ -34,18 +34,4 @@ # ############################################################################ -ifeq ($(CONFIG_INTERPRETERS_BAS),y) -CONFIGURED_APPS += interpreters/bas -endif - -ifeq ($(CONFIG_INTERPRETERS_FICL),y) -CONFIGURED_APPS += interpreters/ficl -endif - -ifeq ($(CONFIG_INTERPRETERS_MICROPYTHON),y) -CONFIGURED_APPS += interpreters/micropython -endif - -ifeq ($(CONFIG_INTERPRETERS_PCODE),y) -CONFIGURED_APPS += interpreters/pcode -endif +include $(wildcard interpreters/*/Make.defs) diff --git a/interpreters/bas/Make.defs b/interpreters/bas/Make.defs new file mode 100644 index 000000000..e5175ae00 --- /dev/null +++ b/interpreters/bas/Make.defs @@ -0,0 +1,4 @@ +ifeq ($(CONFIG_INTERPRETERS_BAS),y) +CONFIGURED_APPS += interpreters/bas +endif + diff --git a/interpreters/ficl/Make.defs b/interpreters/ficl/Make.defs new file mode 100644 index 000000000..ec8c3f4c1 --- /dev/null +++ b/interpreters/ficl/Make.defs @@ -0,0 +1,4 @@ +ifeq ($(CONFIG_INTERPRETERS_FICL),y) +CONFIGURED_APPS += interpreters/ficl +endif + diff --git a/interpreters/micropython/Make.defs b/interpreters/micropython/Make.defs new file mode 100644 index 000000000..aa2888a83 --- /dev/null +++ b/interpreters/micropython/Make.defs @@ -0,0 +1,4 @@ +ifeq ($(CONFIG_INTERPRETERS_MICROPYTHON),y) +CONFIGURED_APPS += interpreters/micropython +endif + diff --git a/interpreters/pcode/Make.defs b/interpreters/pcode/Make.defs new file mode 100644 index 000000000..f4ccce58c --- /dev/null +++ b/interpreters/pcode/Make.defs @@ -0,0 +1,4 @@ +ifeq ($(CONFIG_INTERPRETERS_PCODE),y) +CONFIGURED_APPS += interpreters/pcode +endif + diff --git a/netutils/Make.defs b/netutils/Make.defs index d03af9969..58443df23 100644 --- a/netutils/Make.defs +++ b/netutils/Make.defs @@ -34,78 +34,4 @@ # ############################################################################ -ifeq ($(CONFIG_NETUTILS_CHAT),y) -CONFIGURED_APPS += netutils/chat -endif - -ifeq ($(CONFIG_NETUTILS_CODECS),y) -CONFIGURED_APPS += netutils/codecs -endif - -ifeq ($(CONFIG_NETUTILS_DHCPC),y) -CONFIGURED_APPS += netutils/dhcpc -endif - -ifeq ($(CONFIG_NETUTILS_DHCPD),y) -CONFIGURED_APPS += netutils/dhcpd -endif - -ifeq ($(CONFIG_NETUTILS_ESP8266),y) -CONFIGURED_APPS += netutils/esp8266 -endif - -ifeq ($(CONFIG_NETUTILS_FTPC),y) -CONFIGURED_APPS += netutils/ftpc -endif - -ifeq ($(CONFIG_NETUTILS_FTPD),y) -CONFIGURED_APPS += netutils/ftpd -endif - -ifeq ($(CONFIG_NETUTILS_JSON),y) -CONFIGURED_APPS += netutils/json -endif - -ifeq ($(CONFIG_NETUTILS_NTPCLIENT),y) -CONFIGURED_APPS += netutils/ntpclient -endif - -ifeq ($(CONFIG_NETUTILS_PPPD),y) -CONFIGURED_APPS += netutils/pppd -endif - -ifeq ($(CONFIG_NETUTILS_SMTP),y) -CONFIGURED_APPS += netutils/smtp -endif - -ifeq ($(CONFIG_NETUTILS_TELNETD),y) -CONFIGURED_APPS += netutils/telnetd -endif - -ifeq ($(CONFIG_NETUTILS_TFTPC),y) -CONFIGURED_APPS += netutils/tftpc -endif - -ifeq ($(CONFIG_NETUTILS_THTTPD),y) -CONFIGURED_APPS += netutils/thttpd -endif - -ifeq ($(CONFIG_NETUTILS_NETLIB),y) -CONFIGURED_APPS += netutils/netlib -endif - -ifeq ($(CONFIG_NETUTILS_WEBCLIENT),y) -CONFIGURED_APPS += netutils/webclient -endif - -ifeq ($(CONFIG_NETUTILS_WEBSERVER),y) -CONFIGURED_APPS += netutils/webserver -endif - -ifeq ($(CONFIG_NETUTILS_DISCOVER),y) -CONFIGURED_APPS += netutils/discover -endif - -ifeq ($(CONFIG_NETUTILS_XMLRPC),y) -CONFIGURED_APPS += netutils/xmlrpc -endif +include $(wildcard netutils/*/Make.defs) diff --git a/netutils/chat/Make.defs b/netutils/chat/Make.defs new file mode 100644 index 000000000..540388363 --- /dev/null +++ b/netutils/chat/Make.defs @@ -0,0 +1,40 @@ +############################################################################ +# apps/netutils/chat/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_NETUTILS_CHAT),y) +CONFIGURED_APPS += netutils/chat +endif + diff --git a/netutils/codecs/Make.defs b/netutils/codecs/Make.defs new file mode 100644 index 000000000..73b984c36 --- /dev/null +++ b/netutils/codecs/Make.defs @@ -0,0 +1,39 @@ +# apps/netutils/codecs/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_NETUTILS_CODECS),y) +CONFIGURED_APPS += netutils/codecs +endif + diff --git a/netutils/dhcpc/Make.defs b/netutils/dhcpc/Make.defs new file mode 100644 index 000000000..4a60fc4eb --- /dev/null +++ b/netutils/dhcpc/Make.defs @@ -0,0 +1,39 @@ +# apps/netutils/dhcpc/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_NETUTILS_DHCPC),y) +CONFIGURED_APPS += netutils/dhcpc +endif + diff --git a/netutils/dhcpd/Make.defs b/netutils/dhcpd/Make.defs new file mode 100644 index 000000000..a2c0611be --- /dev/null +++ b/netutils/dhcpd/Make.defs @@ -0,0 +1,39 @@ +# apps/netutils/dhcpd/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_NETUTILS_DHCPD),y) +CONFIGURED_APPS += netutils/dhcpd +endif + diff --git a/netutils/discover/Make.defs b/netutils/discover/Make.defs new file mode 100644 index 000000000..5db6699a9 --- /dev/null +++ b/netutils/discover/Make.defs @@ -0,0 +1,39 @@ +# apps/netutils/discover/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_NETUTILS_DISCOVER),y) +CONFIGURED_APPS += netutils/discover +endif + diff --git a/netutils/esp8266/Make.defs b/netutils/esp8266/Make.defs new file mode 100644 index 000000000..7b61e3046 --- /dev/null +++ b/netutils/esp8266/Make.defs @@ -0,0 +1,39 @@ +# apps/netutils/esp8266/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_NETUTILS_ESP8266),y) +CONFIGURED_APPS += netutils/esp8266 +endif + diff --git a/netutils/ftpc/Make.defs b/netutils/ftpc/Make.defs new file mode 100644 index 000000000..166aecc15 --- /dev/null +++ b/netutils/ftpc/Make.defs @@ -0,0 +1,39 @@ +# apps/netutils/ftpc/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_NETUTILS_FTPC),y) +CONFIGURED_APPS += netutils/ftpc +endif + diff --git a/netutils/ftpd/Make.defs b/netutils/ftpd/Make.defs new file mode 100644 index 000000000..82ea6bd5d --- /dev/null +++ b/netutils/ftpd/Make.defs @@ -0,0 +1,39 @@ +# apps/netutils/ftpd/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_NETUTILS_FTPD),y) +CONFIGURED_APPS += netutils/ftpd +endif + diff --git a/netutils/json/Make.defs b/netutils/json/Make.defs new file mode 100644 index 000000000..f60652fbb --- /dev/null +++ b/netutils/json/Make.defs @@ -0,0 +1,39 @@ +# apps/netutils/json/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_NETUTILS_JSON),y) +CONFIGURED_APPS += netutils/json +endif + diff --git a/netutils/netlib/Make.defs b/netutils/netlib/Make.defs new file mode 100644 index 000000000..e9d4252e4 --- /dev/null +++ b/netutils/netlib/Make.defs @@ -0,0 +1,39 @@ +# apps/netutils/netlib/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_NETUTILS_NETLIB),y) +CONFIGURED_APPS += netutils/netlib +endif + diff --git a/netutils/ntpclient/Make.defs b/netutils/ntpclient/Make.defs new file mode 100644 index 000000000..f2dabeca4 --- /dev/null +++ b/netutils/ntpclient/Make.defs @@ -0,0 +1,39 @@ +# apps/netutils/ntpclient/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_NETUTILS_NTPCLIENT),y) +CONFIGURED_APPS += netutils/ntpclient +endif + diff --git a/netutils/pppd/Make.defs b/netutils/pppd/Make.defs new file mode 100644 index 000000000..61699d441 --- /dev/null +++ b/netutils/pppd/Make.defs @@ -0,0 +1,39 @@ +# apps/netutils/pppd/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_NETUTILS_PPPD),y) +CONFIGURED_APPS += netutils/pppd +endif + diff --git a/netutils/smtp/Make.defs b/netutils/smtp/Make.defs new file mode 100644 index 000000000..a40e29b20 --- /dev/null +++ b/netutils/smtp/Make.defs @@ -0,0 +1,39 @@ +# apps/netutils/smtp/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_NETUTILS_SMTP),y) +CONFIGURED_APPS += netutils/smtp +endif + diff --git a/netutils/telnetd/Make.defs b/netutils/telnetd/Make.defs new file mode 100644 index 000000000..a95c79615 --- /dev/null +++ b/netutils/telnetd/Make.defs @@ -0,0 +1,39 @@ +# apps/netutils/telnetd/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_NETUTILS_TELNETD),y) +CONFIGURED_APPS += netutils/telnetd +endif + diff --git a/netutils/tftpc/Make.defs b/netutils/tftpc/Make.defs new file mode 100644 index 000000000..3b9436917 --- /dev/null +++ b/netutils/tftpc/Make.defs @@ -0,0 +1,39 @@ +# apps/netutils/tftpc/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_NETUTILS_TFTPC),y) +CONFIGURED_APPS += netutils/tftpc +endif + diff --git a/netutils/thttpd/Make.defs b/netutils/thttpd/Make.defs new file mode 100644 index 000000000..a6d0c2e48 --- /dev/null +++ b/netutils/thttpd/Make.defs @@ -0,0 +1,39 @@ +# apps/netutils/thttpd/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_NETUTILS_THTTPD),y) +CONFIGURED_APPS += netutils/thttpd +endif + diff --git a/netutils/webclient/Make.defs b/netutils/webclient/Make.defs new file mode 100644 index 000000000..2e2bbf9cb --- /dev/null +++ b/netutils/webclient/Make.defs @@ -0,0 +1,39 @@ +# apps/netutils/webclient/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_NETUTILS_WEBCLIENT),y) +CONFIGURED_APPS += netutils/webclient +endif + diff --git a/netutils/webserver/Make.defs b/netutils/webserver/Make.defs new file mode 100644 index 000000000..0ccea3061 --- /dev/null +++ b/netutils/webserver/Make.defs @@ -0,0 +1,39 @@ +# apps/netutils/webserver/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_NETUTILS_WEBSERVER),y) +CONFIGURED_APPS += netutils/webserver +endif + diff --git a/netutils/xmlrpc/Make.defs b/netutils/xmlrpc/Make.defs new file mode 100644 index 000000000..776efb18b --- /dev/null +++ b/netutils/xmlrpc/Make.defs @@ -0,0 +1,39 @@ +# apps/netutils/xmlrpc/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_NETUTILS_XMLRPC),y) +CONFIGURED_APPS += netutils/xmlrpc +endif + diff --git a/system/Make.defs b/system/Make.defs index 984d9f670..a54e610a1 100644 --- a/system/Make.defs +++ b/system/Make.defs @@ -34,111 +34,4 @@ # ############################################################################ -ifeq ($(CONFIG_SYSTEM_CDCACM),y) -CONFIGURED_APPS += system/cdcacm -endif - -ifeq ($(CONFIG_SYSTEM_CLE),y) -CONFIGURED_APPS += system/cle -endif - -ifeq ($(CONFIG_SYSTEM_COMPOSITE),y) -CONFIGURED_APPS += system/composite -endif - -ifeq ($(CONFIG_SYSTEM_CUTERM),y) -CONFIGURED_APPS += system/cu -endif - -ifeq ($(CONFIG_SYSTEM_FREE),y) -CONFIGURED_APPS += system/free -endif - -ifeq ($(CONFIG_SYSTEM_HEX2BIN),y) -CONFIGURED_APPS += system/hex2bin -endif - -ifeq ($(CONFIG_SYSTEM_HEXED),y) -CONFIGURED_APPS += system/hexed -endif - -ifeq ($(CONFIG_SYSTEM_I2CTOOL),y) -CONFIGURED_APPS += system/i2c -endif - -ifeq ($(CONFIG_SYSTEM_INSTALL),y) -CONFIGURED_APPS += system/install -endif - -ifeq ($(CONFIG_SYSTEM_FLASH_ERASEALL),y) -CONFIGURED_APPS += system/flash_eraseall -endif - -ifeq ($(CONFIG_SYSTEM_LM75),y) -CONFIGURED_APPS += system/lm75 -endif - -ifeq ($(CONFIG_SYSTEM_NETDB),y) -CONFIGURED_APPS += system/netdb -endif - -ifeq ($(CONFIG_SYSTEM_NXPLAYER),y) -CONFIGURED_APPS += system/nxplayer -endif - -ifeq ($(CONFIG_SYSTEM_PRUN),y) -CONFIGURED_APPS += system/prun -endif - -ifeq ($(CONFIG_SYSTEM_MDIO),y) -CONFIGURED_APPS += system/mdio -endif - -ifeq ($(CONFIG_SYSTEM_RAMTEST),y) -CONFIGURED_APPS += system/ramtest -endif - -ifeq ($(CONFIG_SYSTEM_READLINE),y) -CONFIGURED_APPS += system/readline -endif - -ifeq ($(CONFIG_SYSTEM_NOTE),y) -CONFIGURED_APPS += system/sched_note -endif - -ifeq ($(CONFIG_SYSTEM_SUDOKU),y) -CONFIGURED_APPS += system/sudoku -endif - -ifeq ($(CONFIG_SYSTEM_STACKMONITOR),y) -CONFIGURED_APPS += system/stackmonitor -endif - -ifeq ($(CONFIG_SYSTEM_SYMTAB),y) -CONFIGURED_APPS += system/symtab -endif - -ifeq ($(CONFIG_SYSTEM_UBLOXMODEM),y) -CONFIGURED_APPS += system/ubloxmodem -endif - -ifeq ($(CONFIG_SYSTEM_USBMONITOR),y) -CONFIGURED_APPS += system/usbmonitor -endif - -ifeq ($(CONFIG_SYSTEM_USBMSC),y) -CONFIGURED_APPS += system/usbmsc -endif - -ifeq ($(CONFIG_SYSTEM_VI),y) -CONFIGURED_APPS += system/vi -endif - -ifeq ($(CONFIG_SYSTEM_ZMODEM),y) -CONFIGURED_APPS += system/zmodem -endif - -ifeq ($(CONFIG_SYSTEM_ZONEINFO),y) -CONFIGURED_APPS += system/zoneinfo -endif - +include $(wildcard system/*/Make.defs) diff --git a/system/cdcacm/Make.defs b/system/cdcacm/Make.defs new file mode 100644 index 000000000..0e58498c8 --- /dev/null +++ b/system/cdcacm/Make.defs @@ -0,0 +1,40 @@ +############################################################################ +# apps/system/cdcacm/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_SYSTEM_CDCACM),y) +CONFIGURED_APPS += system/cdcacm +endif + diff --git a/system/cle/Make.defs b/system/cle/Make.defs new file mode 100644 index 000000000..6ffd966b1 --- /dev/null +++ b/system/cle/Make.defs @@ -0,0 +1,40 @@ +############################################################################ +# apps/system/cle/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_SYSTEM_CLE),y) +CONFIGURED_APPS += system/cle +endif + diff --git a/system/composite/Make.defs b/system/composite/Make.defs new file mode 100644 index 000000000..1cdd2d24d --- /dev/null +++ b/system/composite/Make.defs @@ -0,0 +1,40 @@ +############################################################################ +# apps/system/composite/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_SYSTEM_COMPOSITE),y) +CONFIGURED_APPS += system/composite +endif + diff --git a/system/cu/Make.defs b/system/cu/Make.defs new file mode 100644 index 000000000..f67b6d10a --- /dev/null +++ b/system/cu/Make.defs @@ -0,0 +1,40 @@ +############################################################################ +# apps/system/cu/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_SYSTEM_CUTERM),y) +CONFIGURED_APPS += system/cu +endif + diff --git a/system/flash_eraseall/Make.defs b/system/flash_eraseall/Make.defs new file mode 100644 index 000000000..bd1c8a501 --- /dev/null +++ b/system/flash_eraseall/Make.defs @@ -0,0 +1,40 @@ +############################################################################ +# apps/system/flash_eraseall/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_SYSTEM_FLASH_ERASEALL),y) +CONFIGURED_APPS += system/flash_eraseall +endif + diff --git a/system/free/Make.defs b/system/free/Make.defs new file mode 100644 index 000000000..5935b0a48 --- /dev/null +++ b/system/free/Make.defs @@ -0,0 +1,40 @@ +############################################################################ +# apps/system/free/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_SYSTEM_FREE),y) +CONFIGURED_APPS += system/free +endif + diff --git a/system/hex2bin/Make.defs b/system/hex2bin/Make.defs new file mode 100644 index 000000000..d89cd2341 --- /dev/null +++ b/system/hex2bin/Make.defs @@ -0,0 +1,40 @@ +############################################################################ +# apps/system/hex2bin/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_SYSTEM_HEX2BIN),y) +CONFIGURED_APPS += system/hex2bin +endif + diff --git a/system/hexed/Make.defs b/system/hexed/Make.defs new file mode 100644 index 000000000..f47238fe2 --- /dev/null +++ b/system/hexed/Make.defs @@ -0,0 +1,40 @@ +############################################################################ +# apps/system/hexed/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_SYSTEM_HEXED),y) +CONFIGURED_APPS += system/hexed +endif + diff --git a/system/i2c/Make.defs b/system/i2c/Make.defs new file mode 100644 index 000000000..d9cbd061c --- /dev/null +++ b/system/i2c/Make.defs @@ -0,0 +1,40 @@ +############################################################################ +# apps/system/i2c/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2015 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_SYSTEM_I2CTOOL),y) +CONFIGURED_APPS += system/i2c +endif + diff --git a/system/install/Make.defs b/system/install/Make.defs new file mode 100644 index 000000000..d238d610c --- /dev/null +++ b/system/install/Make.defs @@ -0,0 +1,40 @@ +############################################################################ +# apps/system/install/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2015 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_SYSTEM_INSTALL),y) +CONFIGURED_APPS += system/install +endif + diff --git a/system/lm75/Make.defs b/system/lm75/Make.defs new file mode 100644 index 000000000..fff78f04e --- /dev/null +++ b/system/lm75/Make.defs @@ -0,0 +1,40 @@ +############################################################################ +# apps/system/lm75/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_SYSTEM_LM75),y) +CONFIGURED_APPS += system/lm75 +endif + diff --git a/system/mdio/Make.defs b/system/mdio/Make.defs new file mode 100644 index 000000000..6868d7c9c --- /dev/null +++ b/system/mdio/Make.defs @@ -0,0 +1,40 @@ +############################################################################ +# apps/system/mdio/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_SYSTEM_MDIO),y) +CONFIGURED_APPS += system/mdio +endif + diff --git a/system/netdb/Make.defs b/system/netdb/Make.defs new file mode 100644 index 000000000..91d532649 --- /dev/null +++ b/system/netdb/Make.defs @@ -0,0 +1,40 @@ +############################################################################ +# apps/system/netdb/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_SYSTEM_NETDB),y) +CONFIGURED_APPS += system/netdb +endif + diff --git a/system/nxplayer/Make.defs b/system/nxplayer/Make.defs new file mode 100644 index 000000000..c3f912559 --- /dev/null +++ b/system/nxplayer/Make.defs @@ -0,0 +1,40 @@ +############################################################################ +# apps/system/nxplayer/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_SYSTEM_NXPLAYER),y) +CONFIGURED_APPS += system/nxplayer +endif + diff --git a/system/prun/Make.defs b/system/prun/Make.defs new file mode 100644 index 000000000..06ab6b63c --- /dev/null +++ b/system/prun/Make.defs @@ -0,0 +1,40 @@ +############################################################################ +# apps/system/prun/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_SYSTEM_PRUN),y) +CONFIGURED_APPS += system/prun +endif + diff --git a/system/ramtest/Make.defs b/system/ramtest/Make.defs new file mode 100644 index 000000000..3b192bdc0 --- /dev/null +++ b/system/ramtest/Make.defs @@ -0,0 +1,40 @@ +############################################################################ +# apps/system/ramtest/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_SYSTEM_RAMTEST),y) +CONFIGURED_APPS += system/ramtest +endif + diff --git a/system/readline/Make.defs b/system/readline/Make.defs new file mode 100644 index 000000000..7baaf41e0 --- /dev/null +++ b/system/readline/Make.defs @@ -0,0 +1,40 @@ +############################################################################ +# apps/system/readline/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_SYSTEM_READLINE),y) +CONFIGURED_APPS += system/readline +endif + diff --git a/system/sched_note/Make.defs b/system/sched_note/Make.defs new file mode 100644 index 000000000..8f998fe6f --- /dev/null +++ b/system/sched_note/Make.defs @@ -0,0 +1,40 @@ +############################################################################ +# apps/system/sched_note/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_SYSTEM_NOTE),y) +CONFIGURED_APPS += system/sched_note +endif + diff --git a/system/stackmonitor/Make.defs b/system/stackmonitor/Make.defs new file mode 100644 index 000000000..85da0edfb --- /dev/null +++ b/system/stackmonitor/Make.defs @@ -0,0 +1,40 @@ +############################################################################ +# apps/system/stackmonitor/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_SYSTEM_STACKMONITOR),y) +CONFIGURED_APPS += system/stackmonitor +endif + diff --git a/system/sudoku/Make.defs b/system/sudoku/Make.defs new file mode 100644 index 000000000..0695a50c5 --- /dev/null +++ b/system/sudoku/Make.defs @@ -0,0 +1,40 @@ +############################################################################ +# apps/system/sudoku/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_SYSTEM_SUDOKU),y) +CONFIGURED_APPS += system/sudoku +endif + diff --git a/system/symtab/Make.defs b/system/symtab/Make.defs new file mode 100644 index 000000000..5985029e4 --- /dev/null +++ b/system/symtab/Make.defs @@ -0,0 +1,40 @@ +############################################################################ +# apps/system/symtab/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_SYSTEM_SYMTAB),y) +CONFIGURED_APPS += system/symtab +endif + diff --git a/system/usbmonitor/Make.defs b/system/usbmonitor/Make.defs new file mode 100644 index 000000000..fe2eecd6b --- /dev/null +++ b/system/usbmonitor/Make.defs @@ -0,0 +1,40 @@ +############################################################################ +# apps/system/usbmonitor/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_SYSTEM_USBMONITOR),y) +CONFIGURED_APPS += system/usbmonitor +endif + diff --git a/system/usbmsc/Make.defs b/system/usbmsc/Make.defs new file mode 100644 index 000000000..a4cb9065d --- /dev/null +++ b/system/usbmsc/Make.defs @@ -0,0 +1,40 @@ +############################################################################ +# apps/system/usbmsc/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_SYSTEM_USBMSC),y) +CONFIGURED_APPS += system/usbmsc +endif + diff --git a/system/vi/Make.defs b/system/vi/Make.defs new file mode 100644 index 000000000..8cd14add9 --- /dev/null +++ b/system/vi/Make.defs @@ -0,0 +1,40 @@ +############################################################################ +# apps/system/vi/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_SYSTEM_VI),y) +CONFIGURED_APPS += system/vi +endif + diff --git a/system/zmodem/Make.defs b/system/zmodem/Make.defs new file mode 100644 index 000000000..355627776 --- /dev/null +++ b/system/zmodem/Make.defs @@ -0,0 +1,40 @@ +############################################################################ +# apps/system/zmodem/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_SYSTEM_ZMODEM),y) +CONFIGURED_APPS += system/zmodem +endif + diff --git a/system/zoneinfo/Make.defs b/system/zoneinfo/Make.defs new file mode 100644 index 000000000..a3732808a --- /dev/null +++ b/system/zoneinfo/Make.defs @@ -0,0 +1,40 @@ +############################################################################ +# apps/system/zoneinfo/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_SYSTEM_ZONEINFO),y) +CONFIGURED_APPS += system/zoneinfo +endif + From bfff5e7179ce9e0116f88f2c7171899936fb2156 Mon Sep 17 00:00:00 2001 From: Sebastien Lorquet Date: Thu, 2 Jun 2016 16:24:30 +0200 Subject: [PATCH 08/74] Add empty preconfig rules to 'leaf' makefiles --- builtin/Makefile | 2 ++ canutils/libcanard/Makefile | 2 ++ canutils/libuavcan/Makefile | 2 ++ examples/bastest/Makefile | 2 ++ examples/bridge/Makefile | 2 ++ examples/cc3000/Makefile | 2 ++ examples/chat/Makefile | 2 ++ examples/elf/Makefile | 2 ++ examples/ftpd/Makefile | 2 ++ examples/module/Makefile | 2 ++ examples/nettest/Makefile | 2 ++ examples/nxflat/Makefile | 2 ++ examples/poll/Makefile | 2 ++ examples/posix_spawn/Makefile | 2 ++ examples/romfs/Makefile | 2 ++ examples/thttpd/Makefile | 2 ++ examples/tiff/Makefile | 2 ++ examples/udgram/Makefile | 2 ++ examples/udp/Makefile | 2 ++ examples/udpblaster/Makefile | 2 ++ examples/unionfs/Makefile | 2 ++ examples/usbserial/Makefile | 2 ++ examples/ustream/Makefile | 2 ++ examples/webserver/Makefile | 2 ++ fsutils/inifile/Makefile | 2 ++ fsutils/mksmartfs/Makefile | 2 ++ fsutils/passwd/Makefile | 2 ++ gpsutils/minmea/Makefile | 2 ++ graphics/screenshot/Makefile | 2 ++ graphics/tiff/Makefile | 2 ++ graphics/traveler/Makefile | 2 ++ interpreters/bas/Makefile | 2 ++ interpreters/ficl/Makefile | 2 ++ interpreters/micropython/Makefile | 2 ++ modbus/Makefile | 2 ++ netutils/chat/Makefile | 2 ++ netutils/codecs/Makefile | 2 ++ netutils/dhcpc/Makefile | 2 ++ netutils/dhcpd/Makefile | 2 ++ netutils/discover/Makefile | 2 ++ netutils/esp8266/Makefile | 2 ++ netutils/ftpc/Makefile | 2 ++ netutils/ftpd/Makefile | 2 ++ netutils/json/Makefile | 2 ++ netutils/netlib/Makefile | 2 ++ netutils/ntpclient/Makefile | 2 ++ netutils/ping/Makefile | 2 ++ netutils/pppd/Makefile | 2 ++ netutils/smtp/Makefile | 2 ++ netutils/telnetd/Makefile | 2 ++ netutils/tftpc/Makefile | 2 ++ netutils/thttpd/Makefile | 2 ++ netutils/webclient/Makefile | 2 ++ netutils/webserver/Makefile | 2 ++ netutils/xmlrpc/Makefile | 2 ++ nshlib/Makefile | 2 ++ platform/Makefile | 2 ++ system/cdcacm/Makefile | 2 ++ system/cle/Makefile | 2 ++ system/composite/Makefile | 2 ++ system/cu/Makefile | 2 ++ system/flash_eraseall/Makefile | 4 +++- system/free/Makefile | 2 ++ system/hex2bin/Makefile | 2 ++ system/hexed/Makefile | 2 ++ system/i2c/Makefile | 2 ++ system/install/Makefile | 2 ++ system/lm75/Makefile | 2 ++ system/mdio/Makefile | 2 ++ system/netdb/Makefile | 2 ++ system/nxplayer/Makefile | 2 ++ system/prun/Makefile | 2 ++ system/ramtest/Makefile | 4 +++- system/readline/Makefile | 2 ++ system/sched_note/Makefile | 2 +- system/stackmonitor/Makefile | 2 ++ system/sudoku/Makefile | 2 ++ system/symtab/Makefile | 4 +++- system/ubloxmodem/Makefile | 2 ++ system/usbmonitor/Makefile | 2 ++ system/usbmsc/Makefile | 2 ++ system/vi/Makefile | 2 ++ system/zmodem/Makefile | 2 ++ system/zoneinfo/Makefile | 3 +++ 84 files changed, 171 insertions(+), 4 deletions(-) diff --git a/builtin/Makefile b/builtin/Makefile index 29f828dc7..6af1922ad 100644 --- a/builtin/Makefile +++ b/builtin/Makefile @@ -136,3 +136,5 @@ distclean: clean $(call DELFILE, builtin_proto.h) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/canutils/libcanard/Makefile b/canutils/libcanard/Makefile index 79c2bb853..9f15c15f3 100644 --- a/canutils/libcanard/Makefile +++ b/canutils/libcanard/Makefile @@ -109,3 +109,5 @@ distclean: clean $(call DELFILE, $(LIBCANARD_PACKNAME)) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/canutils/libuavcan/Makefile b/canutils/libuavcan/Makefile index 05fc45f61..b1d52eac7 100644 --- a/canutils/libuavcan/Makefile +++ b/canutils/libuavcan/Makefile @@ -262,3 +262,5 @@ distclean: clean $(call DELFILE, $(PYUAVCAN_PACKNAME)) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/examples/bastest/Makefile b/examples/bastest/Makefile index f6f788570..0269b1015 100644 --- a/examples/bastest/Makefile +++ b/examples/bastest/Makefile @@ -157,3 +157,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/examples/bridge/Makefile b/examples/bridge/Makefile index 345d080f5..da45bc5ea 100644 --- a/examples/bridge/Makefile +++ b/examples/bridge/Makefile @@ -166,3 +166,5 @@ distclean: clean $(call DELFILE, bridge_config.h) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/examples/cc3000/Makefile b/examples/cc3000/Makefile index fa385a81e..be6943860 100644 --- a/examples/cc3000/Makefile +++ b/examples/cc3000/Makefile @@ -154,3 +154,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/examples/chat/Makefile b/examples/chat/Makefile index 811e80291..e5031e729 100644 --- a/examples/chat/Makefile +++ b/examples/chat/Makefile @@ -130,3 +130,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/examples/elf/Makefile b/examples/elf/Makefile index c813e1eb1..78834c7de 100644 --- a/examples/elf/Makefile +++ b/examples/elf/Makefile @@ -136,3 +136,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/examples/ftpd/Makefile b/examples/ftpd/Makefile index 0675f0a46..74c0788b5 100644 --- a/examples/ftpd/Makefile +++ b/examples/ftpd/Makefile @@ -133,3 +133,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/examples/module/Makefile b/examples/module/Makefile index 680b6e58c..bc1bf23c6 100644 --- a/examples/module/Makefile +++ b/examples/module/Makefile @@ -153,3 +153,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/examples/nettest/Makefile b/examples/nettest/Makefile index fbefe3701..08a6a8737 100644 --- a/examples/nettest/Makefile +++ b/examples/nettest/Makefile @@ -187,3 +187,5 @@ distclean: clean -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/examples/nxflat/Makefile b/examples/nxflat/Makefile index ccc7d4c97..33f766684 100644 --- a/examples/nxflat/Makefile +++ b/examples/nxflat/Makefile @@ -127,3 +127,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/examples/poll/Makefile b/examples/poll/Makefile index 092945e85..43540a5d4 100644 --- a/examples/poll/Makefile +++ b/examples/poll/Makefile @@ -125,3 +125,5 @@ distclean: clean $(call DELFILE, *.dSYM) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/examples/posix_spawn/Makefile b/examples/posix_spawn/Makefile index 2227e0958..9d8c87b18 100644 --- a/examples/posix_spawn/Makefile +++ b/examples/posix_spawn/Makefile @@ -156,3 +156,5 @@ spawn_main.o: spawn_main.c \ symtab.o: filesystem/symtab.c \ $(TOPDIR)/include/nuttx/compiler.h \ $(TOPDIR)/include/nuttx/binfmt/symtab.h +.PHONY: preconfig +preconfig: diff --git a/examples/romfs/Makefile b/examples/romfs/Makefile index a6873c8a1..baa56436c 100644 --- a/examples/romfs/Makefile +++ b/examples/romfs/Makefile @@ -153,3 +153,5 @@ distclean: clean -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/examples/thttpd/Makefile b/examples/thttpd/Makefile index be777fcf1..1b1cafc1a 100644 --- a/examples/thttpd/Makefile +++ b/examples/thttpd/Makefile @@ -137,3 +137,5 @@ distclean: clean -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/examples/tiff/Makefile b/examples/tiff/Makefile index 28078595f..9aa4efd0c 100644 --- a/examples/tiff/Makefile +++ b/examples/tiff/Makefile @@ -138,3 +138,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/examples/udgram/Makefile b/examples/udgram/Makefile index a6903f8ce..09da3f620 100644 --- a/examples/udgram/Makefile +++ b/examples/udgram/Makefile @@ -179,3 +179,5 @@ distclean: clean -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/examples/udp/Makefile b/examples/udp/Makefile index 0ac348fba..3603ee0c3 100644 --- a/examples/udp/Makefile +++ b/examples/udp/Makefile @@ -158,3 +158,5 @@ distclean: clean -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/examples/udpblaster/Makefile b/examples/udpblaster/Makefile index 654a914a9..f014d68fc 100644 --- a/examples/udpblaster/Makefile +++ b/examples/udpblaster/Makefile @@ -167,3 +167,5 @@ distclean: clean -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/examples/unionfs/Makefile b/examples/unionfs/Makefile index 6eed24c52..2bffcda91 100644 --- a/examples/unionfs/Makefile +++ b/examples/unionfs/Makefile @@ -157,3 +157,5 @@ distclean: clean -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/examples/usbserial/Makefile b/examples/usbserial/Makefile index 3b8444449..6fec07d81 100644 --- a/examples/usbserial/Makefile +++ b/examples/usbserial/Makefile @@ -135,3 +135,5 @@ distclean: clean -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/examples/ustream/Makefile b/examples/ustream/Makefile index b5570cbe3..9d559ef62 100644 --- a/examples/ustream/Makefile +++ b/examples/ustream/Makefile @@ -171,3 +171,5 @@ distclean: clean -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/examples/webserver/Makefile b/examples/webserver/Makefile index 3f4b1c1bb..b4e77de3b 100644 --- a/examples/webserver/Makefile +++ b/examples/webserver/Makefile @@ -140,3 +140,5 @@ distclean: clean -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/fsutils/inifile/Makefile b/fsutils/inifile/Makefile index 9bf948f6e..a19fa902f 100644 --- a/fsutils/inifile/Makefile +++ b/fsutils/inifile/Makefile @@ -96,3 +96,5 @@ distclean: clean -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/fsutils/mksmartfs/Makefile b/fsutils/mksmartfs/Makefile index 9e4d06588..6a8582ff5 100644 --- a/fsutils/mksmartfs/Makefile +++ b/fsutils/mksmartfs/Makefile @@ -102,3 +102,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/fsutils/passwd/Makefile b/fsutils/passwd/Makefile index a64daa69a..13c2bd05c 100644 --- a/fsutils/passwd/Makefile +++ b/fsutils/passwd/Makefile @@ -108,3 +108,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/gpsutils/minmea/Makefile b/gpsutils/minmea/Makefile index d522f536f..541124121 100644 --- a/gpsutils/minmea/Makefile +++ b/gpsutils/minmea/Makefile @@ -97,3 +97,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/graphics/screenshot/Makefile b/graphics/screenshot/Makefile index 87f8674ad..1c2789b06 100644 --- a/graphics/screenshot/Makefile +++ b/graphics/screenshot/Makefile @@ -139,3 +139,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/graphics/tiff/Makefile b/graphics/tiff/Makefile index bc109bd5d..ee09e12bf 100644 --- a/graphics/tiff/Makefile +++ b/graphics/tiff/Makefile @@ -96,3 +96,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/graphics/traveler/Makefile b/graphics/traveler/Makefile index 54454fa9f..ecbd0e54a 100644 --- a/graphics/traveler/Makefile +++ b/graphics/traveler/Makefile @@ -183,3 +183,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/interpreters/bas/Makefile b/interpreters/bas/Makefile index 9f8e3e23a..0ef548393 100644 --- a/interpreters/bas/Makefile +++ b/interpreters/bas/Makefile @@ -120,3 +120,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/interpreters/ficl/Makefile b/interpreters/ficl/Makefile index 958b5f84c..a97bf1b89 100644 --- a/interpreters/ficl/Makefile +++ b/interpreters/ficl/Makefile @@ -118,3 +118,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/interpreters/micropython/Makefile b/interpreters/micropython/Makefile index 1fdc67676..48b78b044 100644 --- a/interpreters/micropython/Makefile +++ b/interpreters/micropython/Makefile @@ -182,3 +182,5 @@ distclean: clean -include $(MICROPYTHON_SRCDIR)/mkrules.mk -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/modbus/Makefile b/modbus/Makefile index 9ed7dc967..78b8d60e9 100644 --- a/modbus/Makefile +++ b/modbus/Makefile @@ -119,3 +119,5 @@ distclean: clean -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/netutils/chat/Makefile b/netutils/chat/Makefile index 42c3972f0..475ee5f13 100644 --- a/netutils/chat/Makefile +++ b/netutils/chat/Makefile @@ -96,3 +96,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/netutils/codecs/Makefile b/netutils/codecs/Makefile index 3d77f47fe..d75df86a7 100644 --- a/netutils/codecs/Makefile +++ b/netutils/codecs/Makefile @@ -94,3 +94,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/netutils/dhcpc/Makefile b/netutils/dhcpc/Makefile index ffa88a9e8..33ef5f49d 100644 --- a/netutils/dhcpc/Makefile +++ b/netutils/dhcpc/Makefile @@ -100,3 +100,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/netutils/dhcpd/Makefile b/netutils/dhcpd/Makefile index 7fb52b33d..cd4ca87cd 100644 --- a/netutils/dhcpd/Makefile +++ b/netutils/dhcpd/Makefile @@ -100,3 +100,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/netutils/discover/Makefile b/netutils/discover/Makefile index 4337e9ed7..69dc1e6c5 100644 --- a/netutils/discover/Makefile +++ b/netutils/discover/Makefile @@ -103,3 +103,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/netutils/esp8266/Makefile b/netutils/esp8266/Makefile index 7aac00a5a..f9814c5ed 100644 --- a/netutils/esp8266/Makefile +++ b/netutils/esp8266/Makefile @@ -96,3 +96,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/netutils/ftpc/Makefile b/netutils/ftpc/Makefile index a0075f58e..18714156e 100644 --- a/netutils/ftpc/Makefile +++ b/netutils/ftpc/Makefile @@ -116,3 +116,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/netutils/ftpd/Makefile b/netutils/ftpd/Makefile index 6fb76ba8d..b1195f9d4 100644 --- a/netutils/ftpd/Makefile +++ b/netutils/ftpd/Makefile @@ -100,3 +100,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/netutils/json/Makefile b/netutils/json/Makefile index 44237d238..1f38e3de8 100644 --- a/netutils/json/Makefile +++ b/netutils/json/Makefile @@ -94,3 +94,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/netutils/netlib/Makefile b/netutils/netlib/Makefile index ddf54a32b..b066db72f 100644 --- a/netutils/netlib/Makefile +++ b/netutils/netlib/Makefile @@ -142,3 +142,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/netutils/ntpclient/Makefile b/netutils/ntpclient/Makefile index 79014d5a8..a141d0379 100755 --- a/netutils/ntpclient/Makefile +++ b/netutils/ntpclient/Makefile @@ -100,3 +100,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/netutils/ping/Makefile b/netutils/ping/Makefile index d195ef1fc..d35650eba 100644 --- a/netutils/ping/Makefile +++ b/netutils/ping/Makefile @@ -104,3 +104,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/netutils/pppd/Makefile b/netutils/pppd/Makefile index a228c2a7f..ca9eff13e 100644 --- a/netutils/pppd/Makefile +++ b/netutils/pppd/Makefile @@ -99,3 +99,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/netutils/smtp/Makefile b/netutils/smtp/Makefile index 450fafab0..68db15d49 100644 --- a/netutils/smtp/Makefile +++ b/netutils/smtp/Makefile @@ -100,3 +100,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/netutils/telnetd/Makefile b/netutils/telnetd/Makefile index ccfc4f88a..8c79aae7c 100644 --- a/netutils/telnetd/Makefile +++ b/netutils/telnetd/Makefile @@ -100,3 +100,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/netutils/tftpc/Makefile b/netutils/tftpc/Makefile index b629978a5..c65873da1 100644 --- a/netutils/tftpc/Makefile +++ b/netutils/tftpc/Makefile @@ -102,3 +102,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/netutils/thttpd/Makefile b/netutils/thttpd/Makefile index b78f2ae5d..57425ec2e 100644 --- a/netutils/thttpd/Makefile +++ b/netutils/thttpd/Makefile @@ -188,3 +188,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/netutils/webclient/Makefile b/netutils/webclient/Makefile index 10dd2c1eb..3fe6c6458 100644 --- a/netutils/webclient/Makefile +++ b/netutils/webclient/Makefile @@ -100,3 +100,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/netutils/webserver/Makefile b/netutils/webserver/Makefile index 47fd1047a..bca1a75ab 100644 --- a/netutils/webserver/Makefile +++ b/netutils/webserver/Makefile @@ -107,3 +107,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/netutils/xmlrpc/Makefile b/netutils/xmlrpc/Makefile index bcd17b7a6..51f28f884 100644 --- a/netutils/xmlrpc/Makefile +++ b/netutils/xmlrpc/Makefile @@ -101,3 +101,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/nshlib/Makefile b/nshlib/Makefile index 553e1bc40..5675d2ce2 100644 --- a/nshlib/Makefile +++ b/nshlib/Makefile @@ -178,3 +178,5 @@ distclean: clean -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/platform/Makefile b/platform/Makefile index a6f030a89..07083810e 100644 --- a/platform/Makefile +++ b/platform/Makefile @@ -150,3 +150,5 @@ distclean: clean -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/system/cdcacm/Makefile b/system/cdcacm/Makefile index fe5207eda..c0a5e6395 100644 --- a/system/cdcacm/Makefile +++ b/system/cdcacm/Makefile @@ -143,3 +143,5 @@ distclean: clean -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/system/cle/Makefile b/system/cle/Makefile index 33fd03afa..1d6cd90ee 100644 --- a/system/cle/Makefile +++ b/system/cle/Makefile @@ -103,3 +103,5 @@ distclean: clean -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/system/composite/Makefile b/system/composite/Makefile index 50819b772..7d03bf75a 100644 --- a/system/composite/Makefile +++ b/system/composite/Makefile @@ -143,3 +143,5 @@ distclean: clean -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/system/cu/Makefile b/system/cu/Makefile index 68024a0e9..394e2a140 100644 --- a/system/cu/Makefile +++ b/system/cu/Makefile @@ -139,3 +139,5 @@ distclean: clean -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/system/flash_eraseall/Makefile b/system/flash_eraseall/Makefile index 07d9d142e..4d0e7b399 100644 --- a/system/flash_eraseall/Makefile +++ b/system/flash_eraseall/Makefile @@ -1,5 +1,5 @@ ############################################################################ -# apps/system/install/Makefile +# apps/system/flash_eraseall/Makefile # # Copyright (C) 2011 Uros Platise. All rights reserved. # Copyright (C) 2012-2013 Gregory Nutt. All rights reserved. @@ -147,3 +147,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/system/free/Makefile b/system/free/Makefile index fb6aa73a2..5f777b763 100644 --- a/system/free/Makefile +++ b/system/free/Makefile @@ -142,3 +142,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/system/hex2bin/Makefile b/system/hex2bin/Makefile index 6c5b34340..390fa2c5b 100644 --- a/system/hex2bin/Makefile +++ b/system/hex2bin/Makefile @@ -179,3 +179,5 @@ distclean: clean -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/system/hexed/Makefile b/system/hexed/Makefile index b4cec99c8..fc115d076 100644 --- a/system/hexed/Makefile +++ b/system/hexed/Makefile @@ -146,3 +146,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/system/i2c/Makefile b/system/i2c/Makefile index c9160c9c8..fe03441f2 100644 --- a/system/i2c/Makefile +++ b/system/i2c/Makefile @@ -134,3 +134,5 @@ distclean: clean -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/system/install/Makefile b/system/install/Makefile index 65a3e97d1..7053f5307 100644 --- a/system/install/Makefile +++ b/system/install/Makefile @@ -147,3 +147,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/system/lm75/Makefile b/system/lm75/Makefile index a80286254..dd08d7c6b 100644 --- a/system/lm75/Makefile +++ b/system/lm75/Makefile @@ -147,3 +147,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/system/mdio/Makefile b/system/mdio/Makefile index 2d400ea09..db2a01baf 100644 --- a/system/mdio/Makefile +++ b/system/mdio/Makefile @@ -135,3 +135,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/system/netdb/Makefile b/system/netdb/Makefile index 3719c1f91..3cc74eaf7 100644 --- a/system/netdb/Makefile +++ b/system/netdb/Makefile @@ -117,3 +117,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/system/nxplayer/Makefile b/system/nxplayer/Makefile index 3b01c4e13..411833515 100644 --- a/system/nxplayer/Makefile +++ b/system/nxplayer/Makefile @@ -156,3 +156,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/system/prun/Makefile b/system/prun/Makefile index 73d5ca470..61e6d10a7 100644 --- a/system/prun/Makefile +++ b/system/prun/Makefile @@ -153,3 +153,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/system/ramtest/Makefile b/system/ramtest/Makefile index f9078cf72..5f097956a 100644 --- a/system/ramtest/Makefile +++ b/system/ramtest/Makefile @@ -41,7 +41,7 @@ ifeq ($(WINTOOL),y) INCDIROPT = -w endif -# USB Monitor Application +# RAM test PRIORITY = SCHED_PRIORITY_DEFAULT STACKSIZE = 768 @@ -140,3 +140,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/system/readline/Makefile b/system/readline/Makefile index 191c36cb9..0466f914f 100644 --- a/system/readline/Makefile +++ b/system/readline/Makefile @@ -112,3 +112,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/system/sched_note/Makefile b/system/sched_note/Makefile index 913d7ae20..b6caf3f69 100644 --- a/system/sched_note/Makefile +++ b/system/sched_note/Makefile @@ -1,5 +1,5 @@ ############################################################################ -# apps/system/note/Makefile +# apps/system/sched_note/Makefile # # Copyright (C) 2016 Gregory Nutt. All rights reserved. # Author: Gregory Nutt diff --git a/system/stackmonitor/Makefile b/system/stackmonitor/Makefile index 40624f5fe..576b74949 100644 --- a/system/stackmonitor/Makefile +++ b/system/stackmonitor/Makefile @@ -144,3 +144,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/system/sudoku/Makefile b/system/sudoku/Makefile index 18a6865df..6543639c4 100644 --- a/system/sudoku/Makefile +++ b/system/sudoku/Makefile @@ -143,3 +143,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/system/symtab/Makefile b/system/symtab/Makefile index 196c1a786..1f9946f38 100644 --- a/system/symtab/Makefile +++ b/system/symtab/Makefile @@ -1,5 +1,5 @@ ############################################################################ -# apps/system/system/Makefile +# apps/system/symtab/Makefile # # Copyright (C) 2015 Gregory Nutt. All rights reserved. # Author: Gregory Nutt @@ -102,3 +102,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/system/ubloxmodem/Makefile b/system/ubloxmodem/Makefile index e6979c627..5d057e70d 100644 --- a/system/ubloxmodem/Makefile +++ b/system/ubloxmodem/Makefile @@ -132,3 +132,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/system/usbmonitor/Makefile b/system/usbmonitor/Makefile index 5afb249db..9bb0c8534 100644 --- a/system/usbmonitor/Makefile +++ b/system/usbmonitor/Makefile @@ -117,3 +117,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/system/usbmsc/Makefile b/system/usbmsc/Makefile index 7d2ef010b..1c9e89839 100644 --- a/system/usbmsc/Makefile +++ b/system/usbmsc/Makefile @@ -146,3 +146,5 @@ distclean: clean -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/system/vi/Makefile b/system/vi/Makefile index b679115df..83f39253b 100644 --- a/system/vi/Makefile +++ b/system/vi/Makefile @@ -144,3 +144,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/system/zmodem/Makefile b/system/zmodem/Makefile index 739f52390..e1bdff5bd 100644 --- a/system/zmodem/Makefile +++ b/system/zmodem/Makefile @@ -155,3 +155,5 @@ distclean: clean $(call DELFILE, .depend) -include Make.dep +.PHONY: preconfig +preconfig: diff --git a/system/zoneinfo/Makefile b/system/zoneinfo/Makefile index b2b4d8d14..ae8b5c05e 100755 --- a/system/zoneinfo/Makefile +++ b/system/zoneinfo/Makefile @@ -170,3 +170,6 @@ distclean: clean $(call DELDIR, tzcode) -include Make.dep +.PHONY:preconfig +preconfig: + From b354a41fd42e190d471bc8a7a297a3022c89106a Mon Sep 17 00:00:00 2001 From: Sebastien Lorquet Date: Thu, 2 Jun 2016 16:25:51 +0200 Subject: [PATCH 09/74] Use directory.mk for recursive dir makefiles --- graphics/Makefile | 38 +--------------------------------- interpreters/Makefile | 44 +--------------------------------------- netutils/Makefile | 35 +------------------------------- system/Makefile | 47 +------------------------------------------ 4 files changed, 4 insertions(+), 160 deletions(-) diff --git a/graphics/Makefile b/graphics/Makefile index 7f33fe2a4..60b1c91ae 100644 --- a/graphics/Makefile +++ b/graphics/Makefile @@ -33,40 +33,4 @@ # ############################################################################ --include $(TOPDIR)/.config - -# Sub-directories - -SUBDIRS = tiff screenshot traveler - -# Sub-directories that might need context setup - -CNTXTDIRS = - -all: nothing -.PHONY: nothing context depend clean distclean - -define SDIR_template -$(1)_$(2): - $(Q) $(MAKE) -C $(1) $(2) TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" -endef - -# $(foreach SDIR, $(CNTXTDIRS), $(eval $(call SDIR_template,$(SDIR),context))) -$(foreach SDIR, $(SUBDIRS), $(eval $(call SDIR_template,$(SDIR),depend))) -$(foreach SDIR, $(SUBDIRS), $(eval $(call SDIR_template,$(SDIR),clean))) -$(foreach SDIR, $(SUBDIRS), $(eval $(call SDIR_template,$(SDIR),distclean))) - -nothing: - -install: - -context: # $(foreach SDIR, $(CNTXTDIRS), $(SDIR)_context) - -depend: $(foreach SDIR, $(SUBDIRS), $(SDIR)_depend) - -clean: $(foreach SDIR, $(SUBDIRS), $(SDIR)_clean) - -distclean: clean $(foreach SDIR, $(SUBDIRS), $(SDIR)_distclean) - --include Make.dep - +include $(APPDIR)/Directory.mk diff --git a/interpreters/Makefile b/interpreters/Makefile index acbbd6e3b..0e499e268 100644 --- a/interpreters/Makefile +++ b/interpreters/Makefile @@ -33,46 +33,4 @@ # ############################################################################ --include $(TOPDIR)/.config - -# Sub-directories containing interpreter runtime - -SUBDIRS = bas ficl micropython pcode prun - -# Create the list of installed runtime modules (INSTALLED_DIRS) - -ifeq ($(CONFIG_WINDOWS_NATIVE),y) -define ADD_DIRECTORY -INSTALLED_DIRS += ${shell if exist $1\Makefile (echo $1)} -endef -else -define ADD_DIRECTORY -INSTALLED_DIRS += ${shell if [ -r $1/Makefile ]; then echo "$1"; fi} -endef -endif - -$(foreach DIR, $(SUBDIRS), $(eval $(call ADD_DIRECTORY,$(DIR)))) - -all: nothing -.PHONY: nothing context depend clean distclean - -define SDIR_template -$(1)_$(2): - $(Q) $(MAKE) -C $(1) $(2) TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" -endef - -$(foreach SDIR, $(INSTALLED_DIRS), $(eval $(call SDIR_template,$(SDIR),depend))) -$(foreach SDIR, $(INSTALLED_DIRS), $(eval $(call SDIR_template,$(SDIR),clean))) -$(foreach SDIR, $(INSTALLED_DIRS), $(eval $(call SDIR_template,$(SDIR),distclean))) - -nothing: - -install: - -context: - -depend: $(foreach SDIR, $(INSTALLED_DIRS), $(SDIR)_depend) - -clean: $(foreach SDIR, $(INSTALLED_DIRS), $(SDIR)_clean) - -distclean: $(foreach SDIR, $(INSTALLED_DIRS), $(SDIR)_distclean) +include $(APPDIR)/Directory.mk diff --git a/netutils/Makefile b/netutils/Makefile index 2bafef333..3cab860f7 100644 --- a/netutils/Makefile +++ b/netutils/Makefile @@ -33,37 +33,4 @@ # ############################################################################ --include $(TOPDIR)/.config # Current configuration - -# Sub-directories - -SUBDIRS = chat json codecs esp8266 -ifeq ($(CONFIG_NET),y) -SUBDIRS += netlib dhcpc dhcpd discover ftpc ftpd smtp telnetd -SUBDIRS += webclient webserver tftpc thttpd xmlrpc pppd -endif - -all: nothing - -.PHONY: nothing context depend clean distclean - -define SDIR_template -$(1)_$(2): - $(Q) $(MAKE) -C $(1) $(2) TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" -endef - -$(foreach SDIR, $(SUBDIRS), $(eval $(call SDIR_template,$(SDIR),depend))) -$(foreach SDIR, $(SUBDIRS), $(eval $(call SDIR_template,$(SDIR),clean))) -$(foreach SDIR, $(SUBDIRS), $(eval $(call SDIR_template,$(SDIR),distclean))) - -nothing: - -install: - -context: - -depend: $(foreach SDIR, $(SUBDIRS), $(SDIR)_depend) - -clean: $(foreach SDIR, $(SUBDIRS), $(SDIR)_clean) - -distclean: $(foreach SDIR, $(SUBDIRS), $(SDIR)_distclean) +include $(APPDIR)/Directory.mk diff --git a/system/Makefile b/system/Makefile index 04b2deef5..eae61b31c 100644 --- a/system/Makefile +++ b/system/Makefile @@ -33,49 +33,4 @@ # ############################################################################ --include $(TOPDIR)/.config # Current configuration - -# Sub-directories containing system tasks/libraries - -SUBDIRS = cdcacm cle composite cu flash_eraseall free i2c hex2bin install -SUBDIRS += hexed lm75 mdio netdb nxplayer ramtest readline -SUBDIRS += stackmonitor sudoku symtab ubloxmodem usbmonitor usbmsc vi -SUBDIRS += zmodem zoneinfo - -# Create the list of installed runtime modules (INSTALLED_DIRS) - -ifeq ($(CONFIG_WINDOWS_NATIVE),y) -define ADD_DIRECTORY - INSTALLED_DIRS += $(if $(wildcard .\$1\Makefile),$1,) -endef -else -define ADD_DIRECTORY - INSTALLED_DIRS += $(if $(wildcard ./$1/Makefile),$1,) -endef -endif - -$(foreach DIR, $(SUBDIRS), $(eval $(call ADD_DIRECTORY,$(DIR)))) - -all: nothing -.PHONY: nothing context depend clean distclean - -define SDIR_template -$(1)_$(2): - $(Q) $(MAKE) -C $(1) $(2) TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" -endef - -$(foreach SDIR, $(INSTALLED_DIRS), $(eval $(call SDIR_template,$(SDIR),depend))) -$(foreach SDIR, $(INSTALLED_DIRS), $(eval $(call SDIR_template,$(SDIR),clean))) -$(foreach SDIR, $(INSTALLED_DIRS), $(eval $(call SDIR_template,$(SDIR),distclean))) - -nothing: - -install: - -context: - -depend: $(foreach SDIR, $(INSTALLED_DIRS), $(SDIR)_depend) - -clean: $(foreach SDIR, $(INSTALLED_DIRS), $(SDIR)_clean) - -distclean: $(foreach SDIR, $(INSTALLED_DIRS), $(SDIR)_distclean) +include $(APPDIR)/Directory.mk From ae6c0b832c6b5009ba206d06aac0c1098cf95798 Mon Sep 17 00:00:00 2001 From: Sebastien Lorquet Date: Thu, 2 Jun 2016 16:26:32 +0200 Subject: [PATCH 10/74] Individual app kconfig fixes --- graphics/traveler/Kconfig | 7 +++++ netutils/ping/Kconfig | 61 ++++++++++++++++++++------------------- 2 files changed, 38 insertions(+), 30 deletions(-) diff --git a/graphics/traveler/Kconfig b/graphics/traveler/Kconfig index f1a02a4f9..df1fee8a6 100644 --- a/graphics/traveler/Kconfig +++ b/graphics/traveler/Kconfig @@ -2,8 +2,15 @@ # For a description of the syntax of this configuration file, # see the file kconfig-language.txt in the NuttX tools repository. # +config GRAPHICS_TRAVELER + bool "Traveler game" + default n + select FSUTILS_INIFILE + ---help--- + Enable or disable the graphic Traveler game if GRAPHICS_TRAVELER + comment "Color configuration" choice diff --git a/netutils/ping/Kconfig b/netutils/ping/Kconfig index 81efef2bb..0986ebc94 100644 --- a/netutils/ping/Kconfig +++ b/netutils/ping/Kconfig @@ -1,30 +1,31 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -config NETUTILS_PING - bool "ICMP ping support" - default n - depends on NET_IPv4 && NET_ICMP && NET_PKT - help - Build in support for a IPv4 ping command. This command ping will - send the ICMP ECHO_REQUEST and wait for the ICMP ECHO_RESPONSE from - the remote peer. - -config NETUTILS_PING6 - bool "ICMPv6 ping support" - default n - depends on NET_IPv6 && NET_ICMPv6 && NET_PKT - help - Build in support for a IPv6 ping command. This command ping will - send the ICMPv6 ECHO_REQUEST and wait for the ICMPv6 ECHO_RESPONSE - from the remote peer. - -if NETUTILS_PING || NETUTILS_PING6 - -config NETUTILS_PING_SIGNO - int "Ping timeout signal" - default 13 - -endif # NETUTILS_PING || NETUTILS_PING6 \ No newline at end of file +# +# For a description of the syntax of this configuration file, +# see the file kconfig-language.txt in the NuttX tools repository. +# + +config NETUTILS_PING + bool "ICMP ping support" + default n + depends on NET_IPv4 && NET_ICMP && NET_PKT + help + Build in support for a IPv4 ping command. This command ping will + send the ICMP ECHO_REQUEST and wait for the ICMP ECHO_RESPONSE from + the remote peer. + +config NETUTILS_PING6 + bool "ICMPv6 ping support" + default n + depends on NET_IPv6 && NET_ICMPv6 && NET_PKT + help + Build in support for a IPv6 ping command. This command ping will + send the ICMPv6 ECHO_REQUEST and wait for the ICMPv6 ECHO_RESPONSE + from the remote peer. + +if NETUTILS_PING || NETUTILS_PING6 + +config NETUTILS_PING_SIGNO + int "Ping timeout signal" + default 13 + +endif # NETUTILS_PING || NETUTILS_PING6 + From a9aa753fa4d282bc0aa48333ece593bdb5dc707b Mon Sep 17 00:00:00 2001 From: Sebastien Lorquet Date: Thu, 2 Jun 2016 16:34:00 +0200 Subject: [PATCH 11/74] Recursive Kconfig autogeneration --- Application.mk | 4 +- Directory.mk | 5 ++ Make.defs | 8 ++++ Makefile | 15 ++---- canutils/.gitignore | 2 + canutils/Kconfig | 11 ----- examples/.gitignore | 2 + examples/Kconfig | 102 ---------------------------------------- fsutils/.gitignore | 2 + fsutils/Kconfig | 12 ----- gpsutils/.gitignore | 2 + gpsutils/Kconfig | 10 ---- graphics/.gitignore | 2 + graphics/Kconfig | 36 -------------- interpreters/.gitignore | 2 + interpreters/Kconfig | 25 ---------- netutils/.gitignore | 4 +- netutils/Kconfig | 28 ----------- system/.gitignore | 2 + system/Kconfig | 36 -------------- tools/mkkconfig.sh | 62 ++++++++++-------------- 21 files changed, 62 insertions(+), 310 deletions(-) create mode 100644 canutils/.gitignore delete mode 100644 canutils/Kconfig create mode 100644 examples/.gitignore delete mode 100644 examples/Kconfig create mode 100644 fsutils/.gitignore delete mode 100644 fsutils/Kconfig create mode 100644 gpsutils/.gitignore delete mode 100644 gpsutils/Kconfig create mode 100644 graphics/.gitignore delete mode 100644 graphics/Kconfig delete mode 100644 interpreters/Kconfig delete mode 100644 netutils/Kconfig create mode 100644 system/.gitignore delete mode 100644 system/Kconfig diff --git a/Application.mk b/Application.mk index 5b7a4e5ad..cc62e8dc6 100644 --- a/Application.mk +++ b/Application.mk @@ -69,7 +69,7 @@ ROOTDEPPATH = --dep-path . VPATH = all: .built -.PHONY: clean depend distclean +.PHONY: clean preconfig depend distclean $(AOBJS): %$(OBJEXT): %.S $(call ASSEMBLE, $<, $@) @@ -103,6 +103,8 @@ else install: endif +preconfig: + ifeq ($(CONFIG_NSH_BUILTIN_APPS),y) ifneq ($(APPNAME),) ifneq ($(PRIORITY),) diff --git a/Directory.mk b/Directory.mk index 9c233fe9c..a9880178e 100644 --- a/Directory.mk +++ b/Directory.mk @@ -34,6 +34,7 @@ ############################################################################ -include $(TOPDIR)/.config # Current configuration +include $(APPDIR)/Make.defs # Sub-directories @@ -48,6 +49,7 @@ $(1)_$(2): $(Q) $(MAKE) -C $(1) $(2) TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" endef +$(foreach SDIR, $(SUBDIRS), $(eval $(call SDIR_template,$(SDIR),preconfig))) $(foreach SDIR, $(SUBDIRS), $(eval $(call SDIR_template,$(SDIR),context))) $(foreach SDIR, $(SUBDIRS), $(eval $(call SDIR_template,$(SDIR),depend))) $(foreach SDIR, $(SUBDIRS), $(eval $(call SDIR_template,$(SDIR),clean))) @@ -57,6 +59,9 @@ nothing: install: +preconfig: $(foreach SDIR, $(SUBDIRS), $(SDIR)_preconfig) + $(MKKCONFIG) -m "$(shell cat Kmenu)" + context: $(foreach SDIR, $(SUBDIRS), $(SDIR)_context) depend: $(foreach SDIR, $(SUBDIRS), $(SDIR)_depend) diff --git a/Make.defs b/Make.defs index 77007503b..ab9f3fe6c 100644 --- a/Make.defs +++ b/Make.defs @@ -53,3 +53,11 @@ define REGISTER $(Q) touch "$(BUILTIN_REGISTRY)$(DELIM).updated" endef endif + +# Tools + +ifeq ($(CONFIG_WINDOWS_NATIVE),y) + MKKCONFIG = $(APPDIR)\tools\mkkconfig.bat +else + MKKCONFIG = $(APPDIR)/tools/mkkconfig.sh +endif diff --git a/Makefile b/Makefile index 76b23eddd..6039d15b6 100644 --- a/Makefile +++ b/Makefile @@ -39,14 +39,7 @@ APPDIR = ${shell pwd} TOPDIR ?= $(APPDIR)/import -include $(TOPDIR)/Make.defs - -# Tools - -ifeq ($(CONFIG_WINDOWS_NATIVE),y) - MKKCONFIG = ${shell $(APPDIR)\tools\mkkconfig.bat} -else - MKKCONFIG = ${shell $(APPDIR)/tools/mkkconfig.sh} -endif +-include $(APPDIR)/Make.defs # Application Directories @@ -90,6 +83,7 @@ $(1)_$(2): $(Q) $(MAKE) -C $(1) $(2) TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" BIN_DIR="$(BIN_DIR)" endef +$(foreach SDIR, $(BUILDIRS), $(eval $(call SDIR_template,$(SDIR),preconfig))) $(foreach SDIR, $(CONFIGURED_APPS), $(eval $(call SDIR_template,$(SDIR),all))) $(foreach SDIR, $(CONFIGURED_APPS), $(eval $(call SDIR_template,$(SDIR),install))) $(foreach SDIR, $(CONFIGURED_APPS), $(eval $(call SDIR_template,$(SDIR),context))) @@ -119,11 +113,10 @@ context_serialize: context: context_serialize -Kconfig: $(MKKCONFIG) +preconfig:$(foreach SDIR, $(BUILDIRS), $(SDIR)_preconfig) + echo subdirs done $(MKKCONFIG) -preconfig: Kconfig - .depdirs: $(foreach SDIR, $(CONFIGURED_APPS), $(SDIR)_depend) .depend: context Makefile .depdirs diff --git a/canutils/.gitignore b/canutils/.gitignore new file mode 100644 index 000000000..99f41601f --- /dev/null +++ b/canutils/.gitignore @@ -0,0 +1,2 @@ +/Kconfig + diff --git a/canutils/Kconfig b/canutils/Kconfig deleted file mode 100644 index 5fe2e45ce..000000000 --- a/canutils/Kconfig +++ /dev/null @@ -1,11 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -menu "CAN Utilities" - -source "$APPSDIR/canutils/libcanard/Kconfig" -source "$APPSDIR/canutils/libuavcan/Kconfig" - -endmenu # CAN Utilities diff --git a/examples/.gitignore b/examples/.gitignore new file mode 100644 index 000000000..99f41601f --- /dev/null +++ b/examples/.gitignore @@ -0,0 +1,2 @@ +/Kconfig + diff --git a/examples/Kconfig b/examples/Kconfig deleted file mode 100644 index bf8a2b3de..000000000 --- a/examples/Kconfig +++ /dev/null @@ -1,102 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -menu "Examples" - -source "$APPSDIR/examples/adc/Kconfig" -source "$APPSDIR/examples/ajoystick/Kconfig" -source "$APPSDIR/examples/alarm/Kconfig" -source "$APPSDIR/examples/bastest/Kconfig" -source "$APPSDIR/examples/bridge/Kconfig" -source "$APPSDIR/examples/buttons/Kconfig" -source "$APPSDIR/examples/can/Kconfig" -source "$APPSDIR/examples/cc3000/Kconfig" -source "$APPSDIR/examples/chat/Kconfig" -source "$APPSDIR/examples/configdata/Kconfig" -source "$APPSDIR/examples/cpuhog/Kconfig" -source "$APPSDIR/examples/cxxtest/Kconfig" -source "$APPSDIR/examples/dhcpd/Kconfig" -source "$APPSDIR/examples/djoystick/Kconfig" -source "$APPSDIR/examples/elf/Kconfig" -source "$APPSDIR/examples/fstest/Kconfig" -source "$APPSDIR/examples/ftpc/Kconfig" -source "$APPSDIR/examples/ftpd/Kconfig" -source "$APPSDIR/examples/hello/Kconfig" -source "$APPSDIR/examples/helloxx/Kconfig" -source "$APPSDIR/examples/json/Kconfig" -source "$APPSDIR/examples/hidkbd/Kconfig" -source "$APPSDIR/examples/keypadtest/Kconfig" -source "$APPSDIR/examples/igmp/Kconfig" -source "$APPSDIR/examples/i2schar/Kconfig" -source "$APPSDIR/examples/lcdrw/Kconfig" -source "$APPSDIR/examples/leds/Kconfig" -source "$APPSDIR/examples/ltdc/Kconfig" -source "$APPSDIR/examples/media/Kconfig" -source "$APPSDIR/examples/mm/Kconfig" -source "$APPSDIR/examples/modbus/Kconfig" -source "$APPSDIR/examples/module/Kconfig" -source "$APPSDIR/examples/mount/Kconfig" -source "$APPSDIR/examples/mtdpart/Kconfig" -source "$APPSDIR/examples/mtdrwb/Kconfig" -source "$APPSDIR/examples/netloop/Kconfig" -source "$APPSDIR/examples/netpkt/Kconfig" -source "$APPSDIR/examples/nettest/Kconfig" -source "$APPSDIR/examples/nrf24l01_term/Kconfig" -source "$APPSDIR/examples/nsh/Kconfig" -source "$APPSDIR/examples/null/Kconfig" -source "$APPSDIR/examples/nx/Kconfig" -source "$APPSDIR/examples/nxterm/Kconfig" -source "$APPSDIR/examples/nxffs/Kconfig" -source "$APPSDIR/examples/nxflat/Kconfig" -source "$APPSDIR/examples/nxhello/Kconfig" -source "$APPSDIR/examples/nximage/Kconfig" -source "$APPSDIR/examples/nxlines/Kconfig" -source "$APPSDIR/examples/nxtext/Kconfig" -source "$APPSDIR/examples/ostest/Kconfig" -source "$APPSDIR/examples/pashello/Kconfig" -source "$APPSDIR/examples/pca9635/Kconfig" -source "$APPSDIR/examples/pipe/Kconfig" -source "$APPSDIR/examples/poll/Kconfig" -source "$APPSDIR/examples/pppd/Kconfig" -source "$APPSDIR/examples/pwm/Kconfig" -source "$APPSDIR/examples/posix_spawn/Kconfig" -source "$APPSDIR/examples/qencoder/Kconfig" -source "$APPSDIR/examples/random/Kconfig" -source "$APPSDIR/examples/relays/Kconfig" -source "$APPSDIR/examples/rgbled/Kconfig" -source "$APPSDIR/examples/rgmp/Kconfig" -source "$APPSDIR/examples/romfs/Kconfig" -source "$APPSDIR/examples/sendmail/Kconfig" -source "$APPSDIR/examples/serialblaster/Kconfig" -source "$APPSDIR/examples/serialrx/Kconfig" -source "$APPSDIR/examples/serloop/Kconfig" -source "$APPSDIR/examples/slcd/Kconfig" -source "$APPSDIR/examples/flash_test/Kconfig" -source "$APPSDIR/examples/smart_test/Kconfig" -source "$APPSDIR/examples/smart/Kconfig" -source "$APPSDIR/examples/smp/Kconfig" -source "$APPSDIR/examples/tcpecho/Kconfig" -source "$APPSDIR/examples/telnetd/Kconfig" -source "$APPSDIR/examples/thttpd/Kconfig" -source "$APPSDIR/examples/timer/Kconfig" -source "$APPSDIR/examples/tiff/Kconfig" -source "$APPSDIR/examples/touchscreen/Kconfig" -source "$APPSDIR/examples/uavcan/Kconfig" -source "$APPSDIR/examples/udp/Kconfig" -source "$APPSDIR/examples/udpblaster/Kconfig" -source "$APPSDIR/examples/discover/Kconfig" -source "$APPSDIR/examples/webserver/Kconfig" -source "$APPSDIR/examples/unionfs/Kconfig" -source "$APPSDIR/examples/usbserial/Kconfig" -source "$APPSDIR/examples/usbterm/Kconfig" -source "$APPSDIR/examples/udgram/Kconfig" -source "$APPSDIR/examples/ustream/Kconfig" -source "$APPSDIR/examples/watchdog/Kconfig" -source "$APPSDIR/examples/wget/Kconfig" -source "$APPSDIR/examples/wgetjson/Kconfig" -source "$APPSDIR/examples/xmlrpc/Kconfig" -source "$APPSDIR/examples/zerocross/Kconfig" - -endmenu # Examples diff --git a/fsutils/.gitignore b/fsutils/.gitignore new file mode 100644 index 000000000..99f41601f --- /dev/null +++ b/fsutils/.gitignore @@ -0,0 +1,2 @@ +/Kconfig + diff --git a/fsutils/Kconfig b/fsutils/Kconfig deleted file mode 100644 index b6f57cc34..000000000 --- a/fsutils/Kconfig +++ /dev/null @@ -1,12 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -menu "File System Utilities" - -source "$APPSDIR/fsutils/inifile/Kconfig" -source "$APPSDIR/fsutils/mksmartfs/Kconfig" -source "$APPSDIR/fsutils/passwd/Kconfig" - -endmenu # FS Utilities diff --git a/gpsutils/.gitignore b/gpsutils/.gitignore new file mode 100644 index 000000000..99f41601f --- /dev/null +++ b/gpsutils/.gitignore @@ -0,0 +1,2 @@ +/Kconfig + diff --git a/gpsutils/Kconfig b/gpsutils/Kconfig deleted file mode 100644 index 9797cd6f3..000000000 --- a/gpsutils/Kconfig +++ /dev/null @@ -1,10 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -menu "GPS Utilities" - -source "$APPSDIR/gpsutils/minmea/Kconfig" - -endmenu # GPS Utilities diff --git a/graphics/.gitignore b/graphics/.gitignore new file mode 100644 index 000000000..99f41601f --- /dev/null +++ b/graphics/.gitignore @@ -0,0 +1,2 @@ +/Kconfig + diff --git a/graphics/Kconfig b/graphics/Kconfig deleted file mode 100644 index e8cdcaed5..000000000 --- a/graphics/Kconfig +++ /dev/null @@ -1,36 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -menu "Graphics Support" - -config TIFF - bool "TIFF file generation library" - default n - ---help--- - Enable support for the TIFF file generation program. - -if TIFF - -menu "TIFF Screenshot Utility" -source "$APPSDIR/graphics/screenshot/Kconfig" -endmenu - -endif # TIFF - -config GRAPHICS_TRAVELER - bool "Traveler game" - default n - select FSUTILS_INIFILE - ---help--- - Enable or disable the graphic Traveler game - -if GRAPHICS_TRAVELER - -menu "Traveler game" -source "$APPSDIR/graphics/traveler/Kconfig" -endmenu - -endif # GRAPHICS_TRAVELER -endmenu # Graphics Support diff --git a/interpreters/.gitignore b/interpreters/.gitignore index e69de29bb..99f41601f 100644 --- a/interpreters/.gitignore +++ b/interpreters/.gitignore @@ -0,0 +1,2 @@ +/Kconfig + diff --git a/interpreters/Kconfig b/interpreters/Kconfig deleted file mode 100644 index bed828685..000000000 --- a/interpreters/Kconfig +++ /dev/null @@ -1,25 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -menu "Interpreters" - -source "$APPSDIR/interpreters/bas/Kconfig" -source "$APPSDIR/interpreters/ficl/Kconfig" - -config INTERPRETERS_PCODE - bool "Pascal p-code interpreter" - default n - ---help--- - Enable support for the Pascal p-code interpreter. See the README.txt - file at located in the NuttX Pascal repository and also the - README.txt file in the apps/interpreter directory. Use of this - configuration implies that you have performed the required - installation of the Pascal run-time code. - -if INTERPRETERS_PCODE -endif - -source "$APPSDIR/interpreters/micropython/Kconfig" -endmenu # Interpreters diff --git a/netutils/.gitignore b/netutils/.gitignore index 123ef2355..6b672f6b9 100644 --- a/netutils/.gitignore +++ b/netutils/.gitignore @@ -12,4 +12,6 @@ *.sym *.adb *.lib -*.src +*.srci +/Kconfig + diff --git a/netutils/Kconfig b/netutils/Kconfig deleted file mode 100644 index 2f439ce7d..000000000 --- a/netutils/Kconfig +++ /dev/null @@ -1,28 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -menu "Network Utilities" - -source "$APPSDIR/netutils/chat/Kconfig" -source "$APPSDIR/netutils/codecs/Kconfig" -source "$APPSDIR/netutils/dhcpc/Kconfig" -source "$APPSDIR/netutils/dhcpd/Kconfig" -source "$APPSDIR/netutils/esp8266/Kconfig" -source "$APPSDIR/netutils/ftpc/Kconfig" -source "$APPSDIR/netutils/ftpd/Kconfig" -source "$APPSDIR/netutils/json/Kconfig" -source "$APPSDIR/netutils/smtp/Kconfig" -source "$APPSDIR/netutils/telnetd/Kconfig" -source "$APPSDIR/netutils/tftpc/Kconfig" -source "$APPSDIR/netutils/thttpd/Kconfig" -source "$APPSDIR/netutils/netlib/Kconfig" -source "$APPSDIR/netutils/webclient/Kconfig" -source "$APPSDIR/netutils/webserver/Kconfig" -source "$APPSDIR/netutils/ntpclient/Kconfig" -source "$APPSDIR/netutils/discover/Kconfig" -source "$APPSDIR/netutils/xmlrpc/Kconfig" -source "$APPSDIR/netutils/pppd/Kconfig" - -endmenu # Network Utilities diff --git a/system/.gitignore b/system/.gitignore new file mode 100644 index 000000000..99f41601f --- /dev/null +++ b/system/.gitignore @@ -0,0 +1,2 @@ +/Kconfig + diff --git a/system/Kconfig b/system/Kconfig deleted file mode 100644 index 3a57198fb..000000000 --- a/system/Kconfig +++ /dev/null @@ -1,36 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -menu "System Libraries and NSH Add-Ons" - -source "$APPSDIR/system/free/Kconfig" -source "$APPSDIR/system/cle/Kconfig" -source "$APPSDIR/system/cu/Kconfig" -source "$APPSDIR/system/install/Kconfig" -source "$APPSDIR/system/flash_eraseall/Kconfig" -source "$APPSDIR/system/hex2bin/Kconfig" -source "$APPSDIR/system/i2c/Kconfig" -source "$APPSDIR/system/hexed/Kconfig" -source "$APPSDIR/system/netdb/Kconfig" -source "$APPSDIR/system/nxplayer/Kconfig" -source "$APPSDIR/system/ramtest/Kconfig" -source "$APPSDIR/system/readline/Kconfig" -source "$APPSDIR/system/prun/Kconfig" -source "$APPSDIR/system/mdio/Kconfig" -source "$APPSDIR/system/sudoku/Kconfig" -source "$APPSDIR/system/lm75/Kconfig" -source "$APPSDIR/system/vi/Kconfig" -source "$APPSDIR/system/sched_note/Kconfig" -source "$APPSDIR/system/stackmonitor/Kconfig" -source "$APPSDIR/system/symtab/Kconfig" -source "$APPSDIR/system/cdcacm/Kconfig" -source "$APPSDIR/system/composite/Kconfig" -source "$APPSDIR/system/ubloxmodem/Kconfig" -source "$APPSDIR/system/usbmsc/Kconfig" -source "$APPSDIR/system/usbmonitor/Kconfig" -source "$APPSDIR/system/zmodem/Kconfig" -source "$APPSDIR/system/zoneinfo/Kconfig" - -endmenu # System Libraries and NSH Add-Ons diff --git a/tools/mkkconfig.sh b/tools/mkkconfig.sh index 714ca5117..0be3245f2 100755 --- a/tools/mkkconfig.sh +++ b/tools/mkkconfig.sh @@ -34,18 +34,18 @@ # Get the input parameter list -USAGE="USAGE: mkkconfig.sh [-d] [-h] [-t ] [-o ]" -unset TOPDIR +USAGE="USAGE: mkkconfig.sh [-d] [-h] [-m ] [-o ]" KCONFIG=Kconfig +unset MENU while [ ! -z "$1" ]; do case $1 in -d ) set -x ;; - -t ) + -m ) shift - TOPDIR=$1 + MENU=$1 ;; -o ) shift @@ -64,44 +64,32 @@ while [ ! -z "$1" ]; do shift done -# Check arguments -if [ -z "$TOPDIR" ]; then - if [ -x "tools/mkkconfig.sh" ]; then - TOPDIR=$PWD - else - cd .. || { echo "cd .. failed"; exit 1; } - if [ -x "tools/mkkconfig.sh" ]; then - TOPDIR=$PWD - else - echo "ERROR: This script must be executed from a known location" - echo " OR you must provide the path in the command line" - echo $USAGE - exit 1 - fi - fi -else - if [ ! -x "${TOPDIR}/tools/mkkconfig.sh" ]; then - echo "ERROR: \"${TOPDIR}\" is not correct" - echo $USAGE - exit 1 - fi - cd ${TOPDIR} || { echo "cd ${TOPDIR} failed"; exit 1; } +if [ -f ${KCONFIG} ]; then + rm ${KCONFIG} || { echo "ERROR: Failed to remove $PWD/${KCONFIG}"; exit 1; } fi -if [ -f ${TOPDIR}/${KCONFIG} ]; then - rm ${TOPDIR}/${KCONFIG} || { echo "ERROR: Failed to remove ${TOPDIR}/${KCONFIG}"; exit 1; } +echo mkkconfig in $PWD + +KCONFIG_LIST=`ls -1 $PWD/*/Kconfig` + +echo "#" > ${KCONFIG} +echo "# For a description of the syntax of this configuration file," >> ${KCONFIG} +echo "# see the file kconfig-language.txt in the NuttX tools repository." >> ${KCONFIG} +echo "#" >> ${KCONFIG} +echo "# This file is autogenerated, do not edit." >> ${KCONFIG} +echo "#" >> ${KCONFIG} +echo "" >> ${KCONFIG} + +if [ ! -z "${MENU}" ]; then + echo "menu \"${MENU}\"" >> ${KCONFIG} fi -KCONFIG_LIST=`ls -1 */Kconfig` - -echo "#" > ${TOPDIR}/${KCONFIG} -echo "# For a description of the syntax of this configuration file," >> ${TOPDIR}/${KCONFIG} -echo "# see the file kconfig-language.txt in the NuttX tools repository." >> ${TOPDIR}/${KCONFIG} -echo "#" >> ${TOPDIR}/${KCONFIG} -echo "" >> ${TOPDIR}/${KCONFIG} - for FILE in ${KCONFIG_LIST}; do - echo "source \"\$APPSDIR/${FILE}\"" >> ${TOPDIR}/${KCONFIG} + echo "source \"${FILE}\"" >> ${KCONFIG} done +if [ ! -z "${MENU}" ]; then + echo "endmenu # ${MENU}" >> ${KCONFIG} +fi + From 80ae4683fe77ab81d233da6bca013dbc3c66e4e9 Mon Sep 17 00:00:00 2001 From: Sebastien Lorquet Date: Thu, 2 Jun 2016 16:34:22 +0200 Subject: [PATCH 12/74] Add kconfig files for pcode and tiff --- graphics/tiff/Kconfig | 9 +++++++++ interpreters/pcode/Kconfig | 13 +++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 graphics/tiff/Kconfig create mode 100644 interpreters/pcode/Kconfig diff --git a/graphics/tiff/Kconfig b/graphics/tiff/Kconfig new file mode 100644 index 000000000..7c3858271 --- /dev/null +++ b/graphics/tiff/Kconfig @@ -0,0 +1,9 @@ +config TIFF + bool "TIFF file generation library" + default n + ---help--- + Enable support for the TIFF file generation program. + +if TIFF +endif # TIFF + diff --git a/interpreters/pcode/Kconfig b/interpreters/pcode/Kconfig new file mode 100644 index 000000000..f63ca56f4 --- /dev/null +++ b/interpreters/pcode/Kconfig @@ -0,0 +1,13 @@ +config INTERPRETERS_PCODE + bool "Pascal p-code interpreter" + default n + ---help--- + Enable support for the Pascal p-code interpreter. See the README.txt + file at located in the NuttX Pascal repository and also the + README.txt file in the apps/interpreter directory. Use of this + configuration implies that you have performed the required + installation of the Pascal run-time code. + +if INTERPRETERS_PCODE +endif + From 6217849db28a0bd9faa2e88402b9f2dd26e8fb96 Mon Sep 17 00:00:00 2001 From: Sebastien Lorquet Date: Thu, 2 Jun 2016 16:54:39 +0200 Subject: [PATCH 13/74] fix a gitignore rule --- netutils/.gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netutils/.gitignore b/netutils/.gitignore index 6b672f6b9..685ae41bd 100644 --- a/netutils/.gitignore +++ b/netutils/.gitignore @@ -12,6 +12,6 @@ *.sym *.adb *.lib -*.srci +*.src /Kconfig From 12c0b3ca30277b3fb67ec2f4604f2d9efd0f1100 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 2 Jun 2016 10:21:48 -0600 Subject: [PATCH 14/74] apps/system/flash_erraseall: Removed because it violates the OS/application interface. --- ChangeLog.txt | 4 + system/Kconfig | 1 - system/Make.defs | 4 - system/Makefile | 2 +- system/flash_eraseall/.gitignore | 11 -- system/flash_eraseall/Kconfig | 15 --- system/flash_eraseall/Makefile | 149 ------------------------- system/flash_eraseall/README.txt | 12 -- system/flash_eraseall/flash_eraseall.c | 80 ------------- 9 files changed, 5 insertions(+), 273 deletions(-) delete mode 100644 system/flash_eraseall/.gitignore delete mode 100644 system/flash_eraseall/Kconfig delete mode 100644 system/flash_eraseall/Makefile delete mode 100644 system/flash_eraseall/README.txt delete mode 100644 system/flash_eraseall/flash_eraseall.c diff --git a/ChangeLog.txt b/ChangeLog.txt index 3c3ba70fd..38b74c9a2 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1606,3 +1606,7 @@ Lorquet (2016-06-01). 7.17 2016-xx-xx Gregory Nutt + + * apps/system/flash_eraseall: Removed! This logic violates the OS/ + application interface and cannot be supported (2016-06-03). + diff --git a/system/Kconfig b/system/Kconfig index 3a57198fb..ecf6b6317 100644 --- a/system/Kconfig +++ b/system/Kconfig @@ -9,7 +9,6 @@ source "$APPSDIR/system/free/Kconfig" source "$APPSDIR/system/cle/Kconfig" source "$APPSDIR/system/cu/Kconfig" source "$APPSDIR/system/install/Kconfig" -source "$APPSDIR/system/flash_eraseall/Kconfig" source "$APPSDIR/system/hex2bin/Kconfig" source "$APPSDIR/system/i2c/Kconfig" source "$APPSDIR/system/hexed/Kconfig" diff --git a/system/Make.defs b/system/Make.defs index 984d9f670..dd822d15a 100644 --- a/system/Make.defs +++ b/system/Make.defs @@ -70,10 +70,6 @@ ifeq ($(CONFIG_SYSTEM_INSTALL),y) CONFIGURED_APPS += system/install endif -ifeq ($(CONFIG_SYSTEM_FLASH_ERASEALL),y) -CONFIGURED_APPS += system/flash_eraseall -endif - ifeq ($(CONFIG_SYSTEM_LM75),y) CONFIGURED_APPS += system/lm75 endif diff --git a/system/Makefile b/system/Makefile index 04b2deef5..c62d8ea9d 100644 --- a/system/Makefile +++ b/system/Makefile @@ -37,7 +37,7 @@ # Sub-directories containing system tasks/libraries -SUBDIRS = cdcacm cle composite cu flash_eraseall free i2c hex2bin install +SUBDIRS = cdcacm cle composite cu free i2c hex2bin install SUBDIRS += hexed lm75 mdio netdb nxplayer ramtest readline SUBDIRS += stackmonitor sudoku symtab ubloxmodem usbmonitor usbmsc vi SUBDIRS += zmodem zoneinfo diff --git a/system/flash_eraseall/.gitignore b/system/flash_eraseall/.gitignore deleted file mode 100644 index 83bd7b811..000000000 --- a/system/flash_eraseall/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -/Make.dep -/.depend -/.built -/*.asm -/*.rel -/*.lst -/*.sym -/*.adb -/*.lib -/*.src -/*.obj diff --git a/system/flash_eraseall/Kconfig b/system/flash_eraseall/Kconfig deleted file mode 100644 index 64ea620d2..000000000 --- a/system/flash_eraseall/Kconfig +++ /dev/null @@ -1,15 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -config SYSTEM_FLASH_ERASEALL - bool "FLASH Erase-all Command" - default n - depends on MTD && NSH_BUILTIN_APPS && !BUILD_PROTECTED && !BUILD_KERNEL - ---help--- - Enable support for the FLASH eraseall tool. - -if SYSTEM_FLASH_ERASEALL -endif - diff --git a/system/flash_eraseall/Makefile b/system/flash_eraseall/Makefile deleted file mode 100644 index 07d9d142e..000000000 --- a/system/flash_eraseall/Makefile +++ /dev/null @@ -1,149 +0,0 @@ -############################################################################ -# apps/system/install/Makefile -# -# Copyright (C) 2011 Uros Platise. All rights reserved. -# Copyright (C) 2012-2013 Gregory Nutt. All rights reserved. -# Author: Uros Platise -# Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# TODO, this makefile should run make under the app dirs, instead of -# sourcing the Make.defs! - --include $(TOPDIR)/.config --include $(TOPDIR)/Make.defs -include $(APPDIR)/Make.defs - -ifeq ($(WINTOOL),y) -INCDIROPT = -w -endif - -# Hello Application -# TODO: appname can be automatically extracted from the directory name - -APPNAME = flash_eraseall -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 1024 - -ASRCS = -CSRCS = -MAINSRC = flash_eraseall.c - -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) -MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) - -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) -OBJS = $(AOBJS) $(COBJS) - -ifneq ($(CONFIG_BUILD_KERNEL),y) - OBJS += $(MAINOBJ) -endif - -ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) -else -ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) -else - BIN = ../../libapps$(LIBEXT) -endif -endif - -ifeq ($(WINTOOL),y) - INSTALL_DIR = "${shell cygpath -w $(BIN_DIR)}" -else - INSTALL_DIR = $(BIN_DIR) -endif - -CONFIG_XYZ_PROGNAME ?= flash_eraseall$(EXEEXT) -PROGNAME = $(CONFIG_XYZ_PROGNAME) - -ROOTDEPPATH = --dep-path . - -# Common build - -VPATH = - -all: .built -.PHONY: context depend clean distclean - -$(AOBJS): %$(OBJEXT): %.S - $(call ASSEMBLE, $<, $@) - -$(COBJS) $(MAINOBJ): %$(OBJEXT): %.c - $(call COMPILE, $<, $@) - -.built: $(OBJS) - $(call ARCHIVE, $(BIN), $(OBJS)) - $(Q) touch .built - -ifeq ($(CONFIG_BUILD_KERNEL),y) -$(BIN_DIR)$(DELIM)$(PROGNAME): $(OBJS) $(MAINOBJ) - @echo "LD: $(PROGNAME)" - $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $(INSTALL_DIR)$(DELIM)$(PROGNAME) $(ARCHCRT0OBJ) $(MAINOBJ) $(LDLIBS) - $(Q) $(NM) -u $(INSTALL_DIR)$(DELIM)$(PROGNAME) - -install: $(BIN_DIR)$(DELIM)$(PROGNAME) - -else -install: - -endif - -# Register application - -ifeq ($(CONFIG_NSH_BUILTIN_APPS),y) -$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile - $(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main) - -context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat -else -context: -endif - -# Create dependencies - -.depend: Makefile $(SRCS) - $(Q) $(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep - $(Q) touch $@ - -depend: .depend - -clean: - $(call DELFILE, .built) - $(call CLEAN) - -distclean: clean - $(call DELFILE, Make.dep) - $(call DELFILE, .depend) - --include Make.dep diff --git a/system/flash_eraseall/README.txt b/system/flash_eraseall/README.txt deleted file mode 100644 index 0b90d7f22..000000000 --- a/system/flash_eraseall/README.txt +++ /dev/null @@ -1,12 +0,0 @@ -Flash Erase-all -=============== - - Source: NuttX - Author: Ken Pettit - Date: 5 May 2013 - -This application erases the FLASH of an MTD flash block. It is simply -a wrapper that calls the NuttX flash_eraseall interface. - -Usage: - flash_eraseall diff --git a/system/flash_eraseall/flash_eraseall.c b/system/flash_eraseall/flash_eraseall.c deleted file mode 100644 index 8142c036a..000000000 --- a/system/flash_eraseall/flash_eraseall.c +++ /dev/null @@ -1,80 +0,0 @@ -/**************************************************************************** - * apps/system/flash_eraseall/flash_eraseall.c - * - * Copyright (C) 2013 Ken Pettit. All rights reserved. - * Author: Ken Pettit - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include -#include - -#include -#include -#include -#include - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private data - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -#ifdef CONFIG_BUILD_KERNEL -int main(int argc, FAR char *argv[]) -#else -int flash_eraseall_main(int argc, char *argv[]) -#endif -{ - /* Argument given? */ - - if (argc < 2) - { - fprintf(stderr, "usage: flash_eraseall flash_block_device\n"); - return -1; - } - - /* Do the job */ - - flash_eraseall(argv[1]); - - return 0; -} From ae41d462b4348039b161a2c57a04bbf4769b6db3 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 2 Jun 2016 10:51:21 -0600 Subject: [PATCH 15/74] Update ChangeLog --- ChangeLog.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 38b74c9a2..2c04f50ba 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1608,5 +1608,6 @@ 7.17 2016-xx-xx Gregory Nutt * apps/system/flash_eraseall: Removed! This logic violates the OS/ - application interface and cannot be supported (2016-06-03). + application interface and cannot be supported. The old code can still + be found in the 'Obsoleted' repository (2016-06-03). From 2541a4cb13f0fa02fa1bd1586e244093012d9ae2 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 3 Jun 2016 07:58:54 -0600 Subject: [PATCH 16/74] apps/fsutils/flash_eraseall: Add MDIOC_BULKERASE IOCTL wrapper function --- ChangeLog.txt | 2 + fsutils/Kconfig | 1 + fsutils/flash_eraseall/.gitignore | 11 +++ fsutils/flash_eraseall/Kconfig | 15 ++++ fsutils/flash_eraseall/Make.defs | 38 +++++++++ fsutils/flash_eraseall/Makefile | 102 ++++++++++++++++++++++++ fsutils/flash_eraseall/flash_eraseall.c | 97 ++++++++++++++++++++++ include/fsutils/flash_eraseall.h | 61 ++++++++++++++ 8 files changed, 327 insertions(+) create mode 100644 fsutils/flash_eraseall/.gitignore create mode 100644 fsutils/flash_eraseall/Kconfig create mode 100644 fsutils/flash_eraseall/Make.defs create mode 100644 fsutils/flash_eraseall/Makefile create mode 100644 fsutils/flash_eraseall/flash_eraseall.c create mode 100644 include/fsutils/flash_eraseall.h diff --git a/ChangeLog.txt b/ChangeLog.txt index 2c04f50ba..cb9d30d0b 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1610,4 +1610,6 @@ * apps/system/flash_eraseall: Removed! This logic violates the OS/ application interface and cannot be supported. The old code can still be found in the 'Obsoleted' repository (2016-06-03). + * apps/fsutils/flash_eraseall: IOCTL wrapper for MDCIO_BULKERASE command + (2016-06-04). diff --git a/fsutils/Kconfig b/fsutils/Kconfig index b6f57cc34..ce853cfda 100644 --- a/fsutils/Kconfig +++ b/fsutils/Kconfig @@ -5,6 +5,7 @@ menu "File System Utilities" +source "$APPSDIR/fsutils/flash_eraseall/Kconfig" source "$APPSDIR/fsutils/inifile/Kconfig" source "$APPSDIR/fsutils/mksmartfs/Kconfig" source "$APPSDIR/fsutils/passwd/Kconfig" diff --git a/fsutils/flash_eraseall/.gitignore b/fsutils/flash_eraseall/.gitignore new file mode 100644 index 000000000..83bd7b811 --- /dev/null +++ b/fsutils/flash_eraseall/.gitignore @@ -0,0 +1,11 @@ +/Make.dep +/.depend +/.built +/*.asm +/*.rel +/*.lst +/*.sym +/*.adb +/*.lib +/*.src +/*.obj diff --git a/fsutils/flash_eraseall/Kconfig b/fsutils/flash_eraseall/Kconfig new file mode 100644 index 000000000..01728391f --- /dev/null +++ b/fsutils/flash_eraseall/Kconfig @@ -0,0 +1,15 @@ +# +# For a description of the syntax of this configuration file, +# see the file kconfig-language.txt in the NuttX tools repository. +# + +config FSUTILS_FLASH_ERASEALL + bool "flash_eraseall() function" + default n + ---help--- + Enables support for the callable flash_eraseall() function that can + be used to erase all FLASH backing up a block device driver. + +if FSUTILS_FLASH_ERASEALL + +endif # FSUTILS_FLASH_ERASEALL diff --git a/fsutils/flash_eraseall/Make.defs b/fsutils/flash_eraseall/Make.defs new file mode 100644 index 000000000..ab55a031e --- /dev/null +++ b/fsutils/flash_eraseall/Make.defs @@ -0,0 +1,38 @@ +############################################################################ +# apps/fsutils/flash_eraseall/Make.defs +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_FSUTILS_FLASH_ERASEALL),y) +CONFIGURED_APPS += fsutils/flash_eraseall +endif diff --git a/fsutils/flash_eraseall/Makefile b/fsutils/flash_eraseall/Makefile new file mode 100644 index 000000000..85139c3c3 --- /dev/null +++ b/fsutils/flash_eraseall/Makefile @@ -0,0 +1,102 @@ +############################################################################ +# apps/fsutils/flash_eraseall/Makefile +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +-include $(TOPDIR)/.config +-include $(TOPDIR)/Make.defs +include $(APPDIR)/Make.defs + +# Password file access library + +ASRCS = +CSRCS = + +ifeq ($(CONFIG_FSUTILS_FLASH_ERASEALL),y) +CSRCS += flash_eraseall.c +endif + +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) + +SRCS = $(ASRCS) $(CSRCS) +OBJS = $(AOBJS) $(COBJS) + +ifeq ($(CONFIG_WINDOWS_NATIVE),y) + BIN = ..\..\libapps$(LIBEXT) +else +ifeq ($(WINTOOL),y) + BIN = ..\\..\\libapps$(LIBEXT) +else + BIN = ../../libapps$(LIBEXT) +endif +endif + +ROOTDEPPATH = --dep-path . + +# Common build + +VPATH = + +all: .built +.PHONY: context depend clean distclean + +$(AOBJS): %$(OBJEXT): %.S + $(call ASSEMBLE, $<, $@) + +$(COBJS): %$(OBJEXT): %.c + $(call COMPILE, $<, $@) + +.built: $(OBJS) + $(call ARCHIVE, $(BIN), $(OBJS)) + $(Q) touch .built + +install: + +context: + +.depend: Makefile $(SRCS) + $(Q) $(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep + $(Q) touch $@ + +depend: .depend + +clean: + $(call DELFILE, .built) + $(call CLEAN) + +distclean: clean + $(call DELFILE, Make.dep) + $(call DELFILE, .depend) + +-include Make.dep diff --git a/fsutils/flash_eraseall/flash_eraseall.c b/fsutils/flash_eraseall/flash_eraseall.c new file mode 100644 index 000000000..9deb0570b --- /dev/null +++ b/fsutils/flash_eraseall/flash_eraseall.c @@ -0,0 +1,97 @@ +/**************************************************************************** + * apps/fsutils/flash_eraseall/flash_eraseall.c + * + * Copyright (C) 2011, 2016 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include +#include +#include + +#include +#include + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: flash_eraseall + * + * Description: + * Call a block driver with the MDIOC_BULKERASE ioctl command. This will + * cause the MTD driver to erase all of the flash. + * + ****************************************************************************/ + +int flash_eraseall(FAR const char *driver) +{ + int errcode; + int fd; + int ret; + + /* Open the block driver */ + + fd = open(driver, O_RDONLY); + if (fd < 0) + { + errcode = errno; + fdbg("ERROR: Failed to open '%s': %d\n", driver, errcode); + ret = -errcode; + } + else + { + /* Invoke the block driver ioctl method */ + + ret = ioctl(fd, MTDIOC_BULKERASE, 0); + if (ret < 0) + { + errcode = errno; + fdbg("ERROR: MTD ioctl(%04x) failed: %d\n", MTDIOC_BULKERASE, errcode); + ret = -errcode; + } + + /* Close the block driver */ + + (void)close(fd); + } + + return ret; +} diff --git a/include/fsutils/flash_eraseall.h b/include/fsutils/flash_eraseall.h new file mode 100644 index 000000000..69d1ee55c --- /dev/null +++ b/include/fsutils/flash_eraseall.h @@ -0,0 +1,61 @@ +/**************************************************************************** + * apps/include/fsutils/flash_eraseall.h + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +#ifndef __APPS_INCLUDE_FSUTILS_FLASH_ERASEALL_H +#define __APPS_INCLUDE_FSUTILS_FLASH_ERASEALL_H 1 + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include +#include + +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +/**************************************************************************** + * Name: flash_eraseall + * + * Description: + * Call a block driver with the MDIOC_BULKERASE ioctl command. This will + * cause the MTD driver to erase all of the flash. + * + ****************************************************************************/ + +int flash_eraseall(FAR const char *driver); + +#endif /* __APPS_INCLUDE_FSUTILS_FLASH_ERASEALL_H */ From 3734b4c96644e3c8a3d66494c1db7245844b5e01 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 3 Jun 2016 08:15:37 -0600 Subject: [PATCH 17/74] Restore apps/system/flash_eraseall/ using new IOCTL wrapper --- ChangeLog.txt | 2 + system/Kconfig | 1 + system/Make.defs | 4 + system/Makefile | 2 +- system/flash_eraseall/.gitignore | 11 ++ system/flash_eraseall/Kconfig | 15 +++ system/flash_eraseall/Makefile | 151 +++++++++++++++++++++++++ system/flash_eraseall/README.txt | 12 ++ system/flash_eraseall/flash_eraseall.c | 71 ++++++++++++ 9 files changed, 268 insertions(+), 1 deletion(-) create mode 100644 system/flash_eraseall/.gitignore create mode 100644 system/flash_eraseall/Kconfig create mode 100644 system/flash_eraseall/Makefile create mode 100644 system/flash_eraseall/README.txt create mode 100644 system/flash_eraseall/flash_eraseall.c diff --git a/ChangeLog.txt b/ChangeLog.txt index cb9d30d0b..db39f1a84 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1612,4 +1612,6 @@ be found in the 'Obsoleted' repository (2016-06-03). * apps/fsutils/flash_eraseall: IOCTL wrapper for MDCIO_BULKERASE command (2016-06-04). + * apps/system/flash_eraseall: Restored! Using the new IOCTL wrapper at + apps/fsutils/flash_eraseall (2016-06-04). diff --git a/system/Kconfig b/system/Kconfig index ecf6b6317..fac8504fe 100644 --- a/system/Kconfig +++ b/system/Kconfig @@ -8,6 +8,7 @@ menu "System Libraries and NSH Add-Ons" source "$APPSDIR/system/free/Kconfig" source "$APPSDIR/system/cle/Kconfig" source "$APPSDIR/system/cu/Kconfig" +source "$APPSDIR/system/flash_eraseall/Kconfig" source "$APPSDIR/system/install/Kconfig" source "$APPSDIR/system/hex2bin/Kconfig" source "$APPSDIR/system/i2c/Kconfig" diff --git a/system/Make.defs b/system/Make.defs index dd822d15a..73d964f30 100644 --- a/system/Make.defs +++ b/system/Make.defs @@ -50,6 +50,10 @@ ifeq ($(CONFIG_SYSTEM_CUTERM),y) CONFIGURED_APPS += system/cu endif +ifeq ($(CONFIG_SYSTEM_FLASH_ERASEALL),y) +CONFIGURED_APPS += system/flash_eraseall +endif + ifeq ($(CONFIG_SYSTEM_FREE),y) CONFIGURED_APPS += system/free endif diff --git a/system/Makefile b/system/Makefile index c62d8ea9d..3d4722e8d 100644 --- a/system/Makefile +++ b/system/Makefile @@ -37,7 +37,7 @@ # Sub-directories containing system tasks/libraries -SUBDIRS = cdcacm cle composite cu free i2c hex2bin install +SUBDIRS = cdcacm cle composite cu free flash_eraseall i2c hex2bin install SUBDIRS += hexed lm75 mdio netdb nxplayer ramtest readline SUBDIRS += stackmonitor sudoku symtab ubloxmodem usbmonitor usbmsc vi SUBDIRS += zmodem zoneinfo diff --git a/system/flash_eraseall/.gitignore b/system/flash_eraseall/.gitignore new file mode 100644 index 000000000..83bd7b811 --- /dev/null +++ b/system/flash_eraseall/.gitignore @@ -0,0 +1,11 @@ +/Make.dep +/.depend +/.built +/*.asm +/*.rel +/*.lst +/*.sym +/*.adb +/*.lib +/*.src +/*.obj diff --git a/system/flash_eraseall/Kconfig b/system/flash_eraseall/Kconfig new file mode 100644 index 000000000..64ea620d2 --- /dev/null +++ b/system/flash_eraseall/Kconfig @@ -0,0 +1,15 @@ +# +# For a description of the syntax of this configuration file, +# see the file kconfig-language.txt in the NuttX tools repository. +# + +config SYSTEM_FLASH_ERASEALL + bool "FLASH Erase-all Command" + default n + depends on MTD && NSH_BUILTIN_APPS && !BUILD_PROTECTED && !BUILD_KERNEL + ---help--- + Enable support for the FLASH eraseall tool. + +if SYSTEM_FLASH_ERASEALL +endif + diff --git a/system/flash_eraseall/Makefile b/system/flash_eraseall/Makefile new file mode 100644 index 000000000..d9e97e5d1 --- /dev/null +++ b/system/flash_eraseall/Makefile @@ -0,0 +1,151 @@ +############################################################################ +# apps/system/flash_eraseall/Makefile +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Copyright (C) 2013 Ken Pettit. All rights reserved. +# Author: Ken Pettit +# Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +# TODO, this makefile should run make under the app dirs, instead of +# sourcing the Make.defs! + +-include $(TOPDIR)/.config +-include $(TOPDIR)/Make.defs +include $(APPDIR)/Make.defs + +ifeq ($(WINTOOL),y) +INCDIROPT = -w +endif + +# Hello Application +# TODO: appname can be automatically extracted from the directory name + +APPNAME = flash_eraseall +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 1024 + +ASRCS = +CSRCS = +MAINSRC = flash_eraseall.c + +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) +MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) + +SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) +OBJS = $(AOBJS) $(COBJS) + +ifneq ($(CONFIG_BUILD_KERNEL),y) + OBJS += $(MAINOBJ) +endif + +ifeq ($(CONFIG_WINDOWS_NATIVE),y) + BIN = ..\..\libapps$(LIBEXT) +else +ifeq ($(WINTOOL),y) + BIN = ..\\..\\libapps$(LIBEXT) +else + BIN = ../../libapps$(LIBEXT) +endif +endif + +ifeq ($(WINTOOL),y) + INSTALL_DIR = "${shell cygpath -w $(BIN_DIR)}" +else + INSTALL_DIR = $(BIN_DIR) +endif + +CONFIG_XYZ_PROGNAME ?= flash_eraseall$(EXEEXT) +PROGNAME = $(CONFIG_XYZ_PROGNAME) + +ROOTDEPPATH = --dep-path . + +# Common build + +VPATH = + +all: .built +.PHONY: preconfig context depend clean distclean + +$(AOBJS): %$(OBJEXT): %.S + $(call ASSEMBLE, $<, $@) + +$(COBJS) $(MAINOBJ): %$(OBJEXT): %.c + $(call COMPILE, $<, $@) + +.built: $(OBJS) + $(call ARCHIVE, $(BIN), $(OBJS)) + $(Q) touch .built + +ifeq ($(CONFIG_BUILD_KERNEL),y) +$(BIN_DIR)$(DELIM)$(PROGNAME): $(OBJS) $(MAINOBJ) + @echo "LD: $(PROGNAME)" + $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $(INSTALL_DIR)$(DELIM)$(PROGNAME) $(ARCHCRT0OBJ) $(MAINOBJ) $(LDLIBS) + $(Q) $(NM) -u $(INSTALL_DIR)$(DELIM)$(PROGNAME) + +install: $(BIN_DIR)$(DELIM)$(PROGNAME) + +else +install: + +endif + +preconfig: + +# Register application + +ifeq ($(CONFIG_NSH_BUILTIN_APPS),y) +$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile + $(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main) + +context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat +else +context: +endif + +# Create dependencies + +.depend: Makefile $(SRCS) + $(Q) $(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep + $(Q) touch $@ + +depend: .depend + +clean: + $(call DELFILE, .built) + $(call CLEAN) + +distclean: clean + $(call DELFILE, Make.dep) + $(call DELFILE, .depend) + +-include Make.dep diff --git a/system/flash_eraseall/README.txt b/system/flash_eraseall/README.txt new file mode 100644 index 000000000..0b90d7f22 --- /dev/null +++ b/system/flash_eraseall/README.txt @@ -0,0 +1,12 @@ +Flash Erase-all +=============== + + Source: NuttX + Author: Ken Pettit + Date: 5 May 2013 + +This application erases the FLASH of an MTD flash block. It is simply +a wrapper that calls the NuttX flash_eraseall interface. + +Usage: + flash_eraseall diff --git a/system/flash_eraseall/flash_eraseall.c b/system/flash_eraseall/flash_eraseall.c new file mode 100644 index 000000000..48896d563 --- /dev/null +++ b/system/flash_eraseall/flash_eraseall.c @@ -0,0 +1,71 @@ +/**************************************************************************** + * apps/system/flash_eraseall/flash_eraseall.c + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Copyright (C) 2013 Ken Pettit. All rights reserved. + * Author: Ken Pettit + * Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include + +#include + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +#ifdef CONFIG_BUILD_KERNEL +int main(int argc, FAR char *argv[]) +#else +int flash_eraseall_main(int argc, char *argv[]) +#endif +{ + /* Argument given? */ + + if (argc < 2) + { + fprintf(stderr, "usage: flash_eraseall flash_block_device\n"); + return -1; + } + + /* Do the job */ + + flash_eraseall(argv[1]); + + return 0; +} From d06b721ba2052f15224440daae129c5589142c8d Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 3 Jun 2016 09:11:22 -0600 Subject: [PATCH 18/74] Fix new dependencies for flash_eraseall --- fsutils/flash_eraseall/Kconfig | 1 + system/flash_eraseall/Kconfig | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/fsutils/flash_eraseall/Kconfig b/fsutils/flash_eraseall/Kconfig index 01728391f..25217c251 100644 --- a/fsutils/flash_eraseall/Kconfig +++ b/fsutils/flash_eraseall/Kconfig @@ -6,6 +6,7 @@ config FSUTILS_FLASH_ERASEALL bool "flash_eraseall() function" default n + depends on MTD ---help--- Enables support for the callable flash_eraseall() function that can be used to erase all FLASH backing up a block device driver. diff --git a/system/flash_eraseall/Kconfig b/system/flash_eraseall/Kconfig index 64ea620d2..3f378aca1 100644 --- a/system/flash_eraseall/Kconfig +++ b/system/flash_eraseall/Kconfig @@ -6,7 +6,8 @@ config SYSTEM_FLASH_ERASEALL bool "FLASH Erase-all Command" default n - depends on MTD && NSH_BUILTIN_APPS && !BUILD_PROTECTED && !BUILD_KERNEL + depends on MTD && NSH_BUILTIN_APPS + select FSUTILS_FLASH_ERASEALL ---help--- Enable support for the FLASH eraseall tool. From 19be2cafea4960269225f7b9a78b7e5442e11494 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sun, 5 Jun 2016 08:41:02 -0600 Subject: [PATCH 19/74] Fix name collision in flash_eraseall restoration. --- system/flash_eraseall/Makefile | 2 +- .../flash_eraseall/{flash_eraseall.c => flash_eraseall_main.c} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename system/flash_eraseall/{flash_eraseall.c => flash_eraseall_main.c} (100%) diff --git a/system/flash_eraseall/Makefile b/system/flash_eraseall/Makefile index d9e97e5d1..cad71b307 100644 --- a/system/flash_eraseall/Makefile +++ b/system/flash_eraseall/Makefile @@ -55,7 +55,7 @@ STACKSIZE = 1024 ASRCS = CSRCS = -MAINSRC = flash_eraseall.c +MAINSRC = flash_eraseall_main.c AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/system/flash_eraseall/flash_eraseall.c b/system/flash_eraseall/flash_eraseall_main.c similarity index 100% rename from system/flash_eraseall/flash_eraseall.c rename to system/flash_eraseall/flash_eraseall_main.c From a442f52a1efa56f0e78359efe309d86004015e88 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sun, 5 Jun 2016 09:18:04 -0600 Subject: [PATCH 20/74] apps/canutils/libuavcan: Fix for recent change to STM32 timer frequency definiitions --- ...96ace50155573e545ed9bf2fb09964ee2367.patch | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/canutils/libuavcan/nuttx-b04396ace50155573e545ed9bf2fb09964ee2367.patch b/canutils/libuavcan/nuttx-b04396ace50155573e545ed9bf2fb09964ee2367.patch index 2751c666f..7ad7d9170 100644 --- a/canutils/libuavcan/nuttx-b04396ace50155573e545ed9bf2fb09964ee2367.patch +++ b/canutils/libuavcan/nuttx-b04396ace50155573e545ed9bf2fb09964ee2367.patch @@ -23,3 +23,43 @@ } }; +--- libuavcan/libuavcan_drivers/stm32/driver/src/uc_stm32_clock.cpp.orig 2016-06-05 09:12:29.086814547 -0600 ++++ libuavcan/libuavcan_drivers/stm32/driver/src/uc_stm32_clock.cpp 2016-06-05 09:15:03.676810202 -0600 +@@ -31,17 +31,30 @@ + + # if UAVCAN_STM32_NUTTX + # define TIMX UAVCAN_STM32_GLUE3(STM32_TIM, UAVCAN_STM32_TIMER_NUMBER, _BASE) +-# define TMR_REG(o) (TIMX + (o)) +-# define TIMX_INPUT_CLOCK STM32_TIM27_FREQUENCY ++# define TMR_REG(o) (TIMX + (o)) + +-# define TIMX_IRQn UAVCAN_STM32_GLUE2(STM32_IRQ_TIM, UAVCAN_STM32_TIMER_NUMBER) ++# if UAVCAN_STM32_TIMER_NUMBER == 2 ++# define TIMX_INPUT_CLOCK BOARD_TIM2_FREQUENCY ++# elif UAVCAN_STM32_TIMER_NUMBER == 3 ++# define TIMX_INPUT_CLOCK BOARD_TIM3_FREQUENCY ++# elif UAVCAN_STM32_TIMER_NUMBER == 4 ++# define TIMX_INPUT_CLOCK BOARD_TIM4_FREQUENCY ++# elif UAVCAN_STM32_TIMER_NUMBER == 5 ++# define TIMX_INPUT_CLOCK BOARD_TIM5_FREQUENCY ++# elif UAVCAN_STM32_TIMER_NUMBER == 6 ++# define TIMX_INPUT_CLOCK BOARD_TIM6_FREQUENCY ++# elif UAVCAN_STM32_TIMER_NUMBER == 7 ++# define TIMX_INPUT_CLOCK BOARD_TIM7_FREQUENCY ++# endif ++ ++# define TIMX_IRQn UAVCAN_STM32_GLUE2(STM32_IRQ_TIM, UAVCAN_STM32_TIMER_NUMBER) + # endif + + # if UAVCAN_STM32_TIMER_NUMBER >= 2 && UAVCAN_STM32_TIMER_NUMBER <= 7 +-# define TIMX_RCC_ENR RCC->APB1ENR +-# define TIMX_RCC_RSTR RCC->APB1RSTR +-# define TIMX_RCC_ENR_MASK UAVCAN_STM32_GLUE3(RCC_APB1ENR_TIM, UAVCAN_STM32_TIMER_NUMBER, EN) +-# define TIMX_RCC_RSTR_MASK UAVCAN_STM32_GLUE3(RCC_APB1RSTR_TIM, UAVCAN_STM32_TIMER_NUMBER, RST) ++# define TIMX_RCC_ENR RCC->APB1ENR ++# define TIMX_RCC_RSTR RCC->APB1RSTR ++# define TIMX_RCC_ENR_MASK UAVCAN_STM32_GLUE3(RCC_APB1ENR_TIM, UAVCAN_STM32_TIMER_NUMBER, EN) ++# define TIMX_RCC_RSTR_MASK UAVCAN_STM32_GLUE3(RCC_APB1RSTR_TIM, UAVCAN_STM32_TIMER_NUMBER, RST) + # else + # error "This UAVCAN_STM32_TIMER_NUMBER is not supported yet" + # endif From 98a9769a287d0c0e5d169b3509605442c8e4c096 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sun, 5 Jun 2016 14:49:23 -0600 Subject: [PATCH 21/74] Updata ChangeLog --- ChangeLog.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index db39f1a84..98fd596e6 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1607,6 +1607,8 @@ 7.17 2016-xx-xx Gregory Nutt + * apps/examples/alarm: ioctl call was clobbering file descriptor + (2016-06-02). * apps/system/flash_eraseall: Removed! This logic violates the OS/ application interface and cannot be supported. The old code can still be found in the 'Obsoleted' repository (2016-06-03). @@ -1614,4 +1616,5 @@ (2016-06-04). * apps/system/flash_eraseall: Restored! Using the new IOCTL wrapper at apps/fsutils/flash_eraseall (2016-06-04). - + * apps/canutils/libuavcan: Fix for recent change to STM32 timer frequency + definiitions (2016-06-05). From ff8f65370e28e5bda082205d12292e3bfa6b3480 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 6 Jun 2016 07:12:16 -0600 Subject: [PATCH 22/74] Update ChangeLog --- ChangeLog.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ChangeLog.txt b/ChangeLog.txt index 98fd596e6..9815bd2a7 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1618,3 +1618,11 @@ apps/fsutils/flash_eraseall (2016-06-04). * apps/canutils/libuavcan: Fix for recent change to STM32 timer frequency definiitions (2016-06-05). + * Many files: Change to the way that Kconfig files are generated in order + to better support reuse of the apps/ directory in NuttX products. Changes + include: add kmenu files, make the full tree use wildcards make.defs, Add + empty preconfig rules to 'leaf' makefiles, Use directory.mk for recursive + dir makefiles, Individual app kconfig fixes, Recursive Kconfig + autogeneration, Add kconfig files for pcode and tiff, and fix a gitignore + rule, From Sébastien Lorquet (2016-06-06). + From e725f5e9e16811537e7b423836acdbabaf2111e0 Mon Sep 17 00:00:00 2001 From: Sebastien Lorquet Date: Mon, 6 Jun 2016 09:42:29 -0600 Subject: [PATCH 23/74] Another changed needed with last Kmenu-related changes --- fsutils/flash_eraseall/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fsutils/flash_eraseall/Makefile b/fsutils/flash_eraseall/Makefile index 85139c3c3..b7f6c2288 100644 --- a/fsutils/flash_eraseall/Makefile +++ b/fsutils/flash_eraseall/Makefile @@ -83,6 +83,8 @@ $(COBJS): %$(OBJEXT): %.c install: +preconfig: + context: .depend: Makefile $(SRCS) From 807e51ad05056c5f63a901976ff6b1c89f993f8d Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 6 Jun 2016 12:30:01 -0600 Subject: [PATCH 24/74] Update tools/mkkconfig.bat; silence some Makefile output --- Directory.mk | 2 +- Makefile | 3 +-- tools/mkkconfig.bat | 59 +++++++++++++++++---------------------------- 3 files changed, 24 insertions(+), 40 deletions(-) diff --git a/Directory.mk b/Directory.mk index a9880178e..e02230dd0 100644 --- a/Directory.mk +++ b/Directory.mk @@ -60,7 +60,7 @@ nothing: install: preconfig: $(foreach SDIR, $(SUBDIRS), $(SDIR)_preconfig) - $(MKKCONFIG) -m "$(shell cat Kmenu)" + $(Q) $(MKKCONFIG) -m "$(shell cat Kmenu)" context: $(foreach SDIR, $(SUBDIRS), $(SDIR)_context) diff --git a/Makefile b/Makefile index 6039d15b6..d8c848434 100644 --- a/Makefile +++ b/Makefile @@ -114,8 +114,7 @@ context_serialize: context: context_serialize preconfig:$(foreach SDIR, $(BUILDIRS), $(SDIR)_preconfig) - echo subdirs done - $(MKKCONFIG) + $(Q) $(MKKCONFIG) .depdirs: $(foreach SDIR, $(CONFIGURED_APPS), $(SDIR)_depend) diff --git a/tools/mkkconfig.bat b/tools/mkkconfig.bat index c2a2a1986..69082e8c5 100755 --- a/tools/mkkconfig.bat +++ b/tools/mkkconfig.bat @@ -2,7 +2,7 @@ REM apps/tools/mkkconfig.bat REM -REM Copyright (C) 2015 Gregory Nutt. All rights reserved. +REM Copyright (C) 2015-2016 Gregory Nutt. All rights reserved. REM Author: Gregory Nutt REM REM Redistribution and use in source and binary forms, with or without @@ -35,12 +35,12 @@ REM REM Parse command line arguments -SET topdir= +SET menu= SET kconfig=Kconfig :ArgLoop IF "%1"=="" GOTO :EndOfLoop -IF "%1"=="-t" GOTO :SetTopDir +IF "%1"=="-m" GOTO :SetMenu IF "%1"=="-o" GOTO :SetKconfig IF "%1"=="-h" GOTO :ShowUsage @@ -51,9 +51,9 @@ GOTO :ShowUsage SET debug=-d GOTO :NextArg -:SetTopDir +:SetMenu SHIFT -SET topdir=%1 +SET menu=%1 GOTO :NextArg :SetKconfig @@ -67,34 +67,6 @@ GOTO :ArgLoop REM Check input Parameters :EndOfLoop -IF "%topdir%"=="" ( - IF EXIST tools\mkkconfig.bat ( - SET topdir=%cd% - ) ELSE ( - cd .. - IF %ERRORLEVEL% GTR 0 ( - Echo ERROR: failed cd .. - GOTO :End - ) - IF EXIST tools\mkkconfig.bat ( - SET topdir=%cd% - ) ELSE ( - Echo ERROR: Cannot find top directory - GOTO :End - ) - ) -) ELSE ( - IF NOT EXIST "%topdir%" ( - Echo ERROR: %topdir% does not EXIST - GOTO :End - ) - Cd %topdir% - IF %ERRORLEVEL% GTR 0 ( - Echo ERROR: failed cd %topdir% - GOTO :End - ) -) - IF EXIST %kconfig% ( Del /f /q %kconfig% REM IF %ERRORLEVEL% GTR 0 ( @@ -107,27 +79,40 @@ Echo # > %kconfig% Echo # For a description of the syntax of this configuration file, >> %kconfig% Echo # see the file kconfig-language.txt in the NuttX tools repository. >> %kconfig% Echo # >> %kconfig% +Echo # This file is autogenerated, do not edit. >> %kconfig% +Echo # >> %kconfig% +Echo >> %kconfig% + +IF %menu% NEQ "" ( + Echo menu "%menu%" >> %kconfig% +) DIR /B /A:D >_tmp_.dat Echo source "$APPSDIR/builtin/Kconfig" >> %kconfig% FOR /F "tokens=*" %%s IN (_tmp_.dat) do ( - if "%%s" NEQ "builtin" Echo source "$APPSDIR/%%s/Kconfig" >> %kconfig% + IF EXIST %%s\Kconfig ( + Echo source "$APPSDIR/%%s/Kconfig" >> %kconfig% + ) ) DEL _tmp_.dat +IF %menu% NEQ "" ( + Echo endmenu # %menu% >> %kconfig% +) + GOTO :End REM Exit showing usage :ShowUsage -Echo USAGE: %0 [-d] [-t ^] [-o ^] +Echo USAGE: %0 [-d] [-m ^] [-o ^] Echo %0 [-h] Echo Where: Echo ^<-d^>: Echo Enables debug output -Echo -t ^: -Echo Identifies the top applicatino directory +Echo -m ^: +Echo Menu description Echo -o ^: Echo Identifies the specific configuratin for the selected ^. Echo This must correspond to a sub-directory under the board directory at From 86e2a3594692a46ac7c1c72fc108583f9d67dff6 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 6 Jun 2016 12:47:52 -0600 Subject: [PATCH 25/74] mkkconfig.bat: Clean up a few things --- tools/mkkconfig.bat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/mkkconfig.bat b/tools/mkkconfig.bat index 69082e8c5..cc58b8527 100755 --- a/tools/mkkconfig.bat +++ b/tools/mkkconfig.bat @@ -35,7 +35,7 @@ REM REM Parse command line arguments -SET menu= +SET menu="" SET kconfig=Kconfig :ArgLoop @@ -81,7 +81,7 @@ Echo # see the file kconfig-language.txt in the NuttX tools repository. >> %kcon Echo # >> %kconfig% Echo # This file is autogenerated, do not edit. >> %kconfig% Echo # >> %kconfig% -Echo >> %kconfig% +Echo[ >> %kconfig% IF %menu% NEQ "" ( Echo menu "%menu%" >> %kconfig% From 29eb3f00f01ec41bb211b23de684983c7de1ca6c Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 6 Jun 2016 12:52:33 -0600 Subject: [PATCH 26/74] Add a blank line --- interpreters/bas/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/interpreters/bas/Makefile b/interpreters/bas/Makefile index 0ef548393..f20c311cd 100644 --- a/interpreters/bas/Makefile +++ b/interpreters/bas/Makefile @@ -121,4 +121,5 @@ distclean: clean -include Make.dep .PHONY: preconfig + preconfig: From 8de50dc0cfa1e77e4876e1e1606e8569a840efa7 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 7 Jun 2016 08:43:21 -0600 Subject: [PATCH 27/74] Add a default value for DELIM --- Makefile | 7 ++++++- netutils/thttpd/Makefile | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d8c848434..3f527d6cb 100644 --- a/Makefile +++ b/Makefile @@ -113,9 +113,14 @@ context_serialize: context: context_serialize -preconfig:$(foreach SDIR, $(BUILDIRS), $(SDIR)_preconfig) +$(TOPDIR)/.config: + +Kconfig: $(TOPDIR)/.config + $(foreach SDIR, $(BUILDIRS), $(SDIR)_preconfig) $(Q) $(MKKCONFIG) +preconfig: Kconfig + .depdirs: $(foreach SDIR, $(CONFIGURED_APPS), $(SDIR)_depend) .depend: context Makefile .depdirs diff --git a/netutils/thttpd/Makefile b/netutils/thttpd/Makefile index 57425ec2e..44583ed15 100644 --- a/netutils/thttpd/Makefile +++ b/netutils/thttpd/Makefile @@ -35,6 +35,8 @@ -include $(TOPDIR)/.config -include $(TOPDIR)/Make.defs + +DELIM = $(strip /) include $(APPDIR)$(DELIM)Make.defs # THTTPD Library From 33b876306db2272c77e8e14e82758178aec96090 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 7 Jun 2016 08:58:48 -0600 Subject: [PATCH 28/74] preconfig target only executes if .config file changes --- Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 3f527d6cb..fc6fed558 100644 --- a/Makefile +++ b/Makefile @@ -78,12 +78,17 @@ BIN = libapps$(LIBEXT) all: $(BIN) .PHONY: import install context context_serialize context_rest .depdirs preconfig depend clean distclean +define MAKE_template + $(Q) $(MAKE) -C $(1) $(2) TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" BIN_DIR="$(BIN_DIR)" + +endef + define SDIR_template $(1)_$(2): $(Q) $(MAKE) -C $(1) $(2) TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" BIN_DIR="$(BIN_DIR)" + endef -$(foreach SDIR, $(BUILDIRS), $(eval $(call SDIR_template,$(SDIR),preconfig))) $(foreach SDIR, $(CONFIGURED_APPS), $(eval $(call SDIR_template,$(SDIR),all))) $(foreach SDIR, $(CONFIGURED_APPS), $(eval $(call SDIR_template,$(SDIR),install))) $(foreach SDIR, $(CONFIGURED_APPS), $(eval $(call SDIR_template,$(SDIR),context))) @@ -116,7 +121,7 @@ context: context_serialize $(TOPDIR)/.config: Kconfig: $(TOPDIR)/.config - $(foreach SDIR, $(BUILDIRS), $(SDIR)_preconfig) + $(foreach SDIR, $(BUILDIRS), $(call MAKE_template,$(SDIR),preconfig)) $(Q) $(MKKCONFIG) preconfig: Kconfig From c8d718b21173f24bbed7613e7229af92efaafebf Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 8 Jun 2016 08:56:20 -0600 Subject: [PATCH 29/74] Makefile: remove dependency on .config --- Makefile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Makefile b/Makefile index fc6fed558..1b580c0da 100644 --- a/Makefile +++ b/Makefile @@ -118,9 +118,7 @@ context_serialize: context: context_serialize -$(TOPDIR)/.config: - -Kconfig: $(TOPDIR)/.config +Kconfig: $(foreach SDIR, $(BUILDIRS), $(call MAKE_template,$(SDIR),preconfig)) $(Q) $(MKKCONFIG) From b5891c8b1a79c025309e56c721bf3f0be791ee58 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 8 Jun 2016 09:44:16 -0600 Subject: [PATCH 30/74] Eliminate some warnings --- system/hexed/src/hexed.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/hexed/src/hexed.c b/system/hexed/src/hexed.c index ef2137349..a9a682576 100644 --- a/system/hexed/src/hexed.c +++ b/system/hexed/src/hexed.c @@ -229,7 +229,7 @@ int parseargs(FAR char *argv[]) FAR struct command_s *cmd; FAR char *fname; FAR char *opt; - int optc; + int optc = 0; fname = NULL; cmd = g_cmdtbl; From 0dfe0baf2b245b4075397e84c57e0af2f7bc12af Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 8 Jun 2016 18:02:37 -0600 Subject: [PATCH 31/74] apps/examples/ostest: SIG_DFL is no long assignment compatible with the sa_sigaction functin pointer. --- examples/ostest/posixtimer.c | 4 ++-- examples/ostest/sighand.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/ostest/posixtimer.c b/examples/ostest/posixtimer.c index 355cb8ec6..82eae67d9 100644 --- a/examples/ostest/posixtimer.c +++ b/examples/ostest/posixtimer.c @@ -1,7 +1,7 @@ /**************************************************************************** * examples/ostest/posixtimer.c * - * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009, 2011, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -258,7 +258,7 @@ errorout: /* Detach the signal handler */ - act.sa_sigaction = SIG_DFL; + act.sa_handler = SIG_DFL; status = sigaction(MY_TIMER_SIGNAL, &act, &oact); printf("timer_test: done\n" ); diff --git a/examples/ostest/sighand.c b/examples/ostest/sighand.c index 138c54e73..0064c30aa 100644 --- a/examples/ostest/sighand.c +++ b/examples/ostest/sighand.c @@ -1,7 +1,7 @@ /**************************************************************************** * apps/examples/ostest/sighand.c * - * Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008, 2011, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -213,7 +213,7 @@ static int waiter_main(int argc, char *argv[]) /* Detach the signal handler */ - act.sa_sigaction = SIG_DFL; + act.sa_handler = SIG_DFL; (void)sigaction(WAKEUP_SIGNAL, &act, &oact); printf("waiter_main: done\n" ); @@ -331,7 +331,7 @@ void sighand_test(void) /* Detach the signal handler */ #ifdef CONFIG_SCHED_HAVE_PARENT - act.sa_sigaction = SIG_DFL; + act.sa_handler = SIG_DFL; (void)sigaction(SIGCHLD, &act, &oact); #endif From 33c6a6bb758595aa8cb58f1905f9ec516d236735 Mon Sep 17 00:00:00 2001 From: Marten Svanfeldt Date: Mon, 19 Oct 2015 12:05:17 +0800 Subject: [PATCH 32/74] Make NSH net-initialization be a configuration option Signed-off-by: Marten Svanfeldt --- nshlib/Kconfig | 10 ++++++++++ nshlib/nsh.h | 2 +- nshlib/nsh_netinit.c | 4 ++-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/nshlib/Kconfig b/nshlib/Kconfig index 81c14f173..eabdcb6f6 100644 --- a/nshlib/Kconfig +++ b/nshlib/Kconfig @@ -942,6 +942,15 @@ config NSH_ARCHINIT menu "Networking Configuration" depends on NET +config NSH_NETINIT + bool "Network initialization" + default y + depends on NET + ---help--- + This option enables/disables all network initialization in NSH. + +if NSH_NETINIT + config NSH_NETINIT_THREAD bool "Network initialization thread" default n @@ -1389,6 +1398,7 @@ config NSH_MACADDR MAC address must provided with this selection. endif # NSH_NOMAC +endif # NSH_NETINIT config NSH_MAX_ROUNDTRIP int "Max Ping Round-Trip (DSEC)" diff --git a/nshlib/nsh.h b/nshlib/nsh.h index 1ed07a124..48166ea58 100644 --- a/nshlib/nsh.h +++ b/nshlib/nsh.h @@ -843,7 +843,7 @@ int nsh_romfsetc(void); # define nsh_romfsetc() (-ENOSYS) #endif -#ifdef CONFIG_NET +#ifdef CONFIG_NSH_NETINIT int nsh_netinit(void); #else # define nsh_netinit() (-ENOSYS) diff --git a/nshlib/nsh_netinit.c b/nshlib/nsh_netinit.c index 38e20aeb2..03e6b6c42 100644 --- a/nshlib/nsh_netinit.c +++ b/nshlib/nsh_netinit.c @@ -74,7 +74,7 @@ #include "nsh.h" -#ifdef CONFIG_NET +#ifdef CONFIG_NSH_NETINIT /**************************************************************************** * Pre-processor Definitions @@ -689,4 +689,4 @@ int nsh_netinit(void) #endif } -#endif /* CONFIG_NET */ +#endif /* CONFIG_NSH_NETINIT */ From 7a5ceb244ebc74e970e0ab77cf93d782f2b76bd3 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 9 Jun 2016 08:13:42 -0600 Subject: [PATCH 33/74] Fix error in comment --- nshlib/nsh_fileapps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nshlib/nsh_fileapps.c b/nshlib/nsh_fileapps.c index 26db6e950..f32f0d494 100644 --- a/nshlib/nsh_fileapps.c +++ b/nshlib/nsh_fileapps.c @@ -88,7 +88,7 @@ * Attempt to execute the application task whose name is 'cmd' * * Returned Value: - * <0 If exec_builtin() fails, then the negated errno value + * <0 If posix_spawn() fails, then the negated errno value * is returned. * -1 (ERROR) if the application task corresponding to 'cmd' could not * be started (possibly because it doesn not exist). From bfd5ca7cd2abad2d90b6219be985508071574fb8 Mon Sep 17 00:00:00 2001 From: "David S. Alessio" Date: Thu, 9 Jun 2016 08:18:49 -0600 Subject: [PATCH 34/74] NTP Client: All retries; Add initialization in NSH network startup logic. --- netutils/ntpclient/ntpclient.c | 17 +++++++++++++++-- nshlib/nsh_netinit.c | 21 +++++++++++---------- 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/netutils/ntpclient/ntpclient.c b/netutils/ntpclient/ntpclient.c index 3aa700ee8..570938545 100644 --- a/netutils/ntpclient/ntpclient.c +++ b/netutils/ntpclient/ntpclient.c @@ -1,7 +1,7 @@ /**************************************************************************** * netutils/ntpclient/ntpclient.c * - * Copyright (C) 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2014, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -59,6 +59,7 @@ /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ + /* NTP Time is seconds since 1900. Convert to Unix time which is seconds * since 1970 */ @@ -69,6 +70,7 @@ /**************************************************************************** * Private Types ****************************************************************************/ + /* This enumeration describes the state of the NTP daemon */ enum ntpc_daemon_e @@ -105,6 +107,7 @@ static struct ntpc_daemon_s g_ntpc_daemon; /**************************************************************************** * Private Functions ****************************************************************************/ + /**************************************************************************** * Name: ntpc_getuint32 * @@ -293,8 +296,9 @@ static int ntpc_daemon(int argc, char **argv) socklen_t socklen; ssize_t nbytes; int exitcode = EXIT_SUCCESS; - int ret; + int retry = 0; int sd; + int ret; /* Indicate that we have started */ @@ -428,6 +432,15 @@ static int ntpc_daemon(int argc, char **argv) int errval = errno; if (errval != EINTR) { + /* Allow up to three retries */ + + if (++retry < 3) + { + continue; + } + + /* Then declare the failure */ + ndbg("ERROR: recvfrom() failed: %d\n", errval); exitcode = EXIT_FAILURE; break; diff --git a/nshlib/nsh_netinit.c b/nshlib/nsh_netinit.c index 38e20aeb2..c30f813ad 100644 --- a/nshlib/nsh_netinit.c +++ b/nshlib/nsh_netinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * apps/nshlib/nsh_netinit.c * - * Copyright (C) 2010-2012, 2014-2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2010-2012, 2014-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * This is influenced by similar logic from uIP: @@ -72,6 +72,10 @@ # include #endif +#ifdef CONFIG_NETUTILS_NTPCLIENT +# include +#endif + #include "nsh.h" #ifdef CONFIG_NET @@ -128,7 +132,6 @@ # undef CONFIG_NSH_NETINIT_MONITOR #endif - /* We need a valid IP domain (any domain) to create a socket that we can use * to comunicate with the network device. */ @@ -147,10 +150,6 @@ #define LONG_TIME_SEC (60*60) /* One hour in seconds */ #define SHORT_TIME_SEC (2) /* 2 seconds */ -/**************************************************************************** - * Private Types - ****************************************************************************/ - /**************************************************************************** * Private Data ****************************************************************************/ @@ -203,10 +202,6 @@ static const uint16_t g_ipv6_netmask[8] = }; #endif /* CONFIG_NET_IPv6 && !CONFIG_NET_ICMPv6_AUTOCONF*/ -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ @@ -342,6 +337,12 @@ static void nsh_netinit_configure(void) dhcpc_close(handle); } #endif + +#ifdef CONFIG_NETUTILS_NTPCLIENT + /* Start the NTP client */ + + ntpc_start(); +#endif #endif /* NSH_HAVE_NETDEV */ nvdbg("Exit\n"); From 7ca5478da35776afdadb76cd950990646b15ed0b Mon Sep 17 00:00:00 2001 From: Sebastien Lorquet Date: Thu, 9 Jun 2016 08:59:16 -0600 Subject: [PATCH 35/74] Rearrange to eliminate Kmenu files --- Directory.mk | 2 +- canutils/Kmenu | 1 - canutils/Makefile | 2 ++ examples/Kmenu | 1 - examples/Makefile | 2 ++ fsutils/Kmenu | 1 - fsutils/Makefile | 2 ++ gpsutils/Kmenu | 1 - gpsutils/Makefile | 2 ++ graphics/Kmenu | 1 - graphics/Makefile | 2 ++ interpreters/Kmenu | 1 - interpreters/Makefile | 2 ++ netutils/Kmenu | 1 - netutils/Makefile | 2 ++ system/Kmenu | 1 - system/Makefile | 2 ++ 17 files changed, 17 insertions(+), 9 deletions(-) delete mode 100644 canutils/Kmenu delete mode 100644 examples/Kmenu delete mode 100644 fsutils/Kmenu delete mode 100644 gpsutils/Kmenu delete mode 100644 graphics/Kmenu delete mode 100644 interpreters/Kmenu delete mode 100644 netutils/Kmenu delete mode 100644 system/Kmenu diff --git a/Directory.mk b/Directory.mk index e02230dd0..eb528b696 100644 --- a/Directory.mk +++ b/Directory.mk @@ -60,7 +60,7 @@ nothing: install: preconfig: $(foreach SDIR, $(SUBDIRS), $(SDIR)_preconfig) - $(Q) $(MKKCONFIG) -m "$(shell cat Kmenu)" + $(Q) $(MKKCONFIG) -m $(MENUDESC) context: $(foreach SDIR, $(SUBDIRS), $(SDIR)_context) diff --git a/canutils/Kmenu b/canutils/Kmenu deleted file mode 100644 index 695c934b6..000000000 --- a/canutils/Kmenu +++ /dev/null @@ -1 +0,0 @@ -CAN Utilities diff --git a/canutils/Makefile b/canutils/Makefile index abe102db3..19e8bab6b 100644 --- a/canutils/Makefile +++ b/canutils/Makefile @@ -33,4 +33,6 @@ # ############################################################################ +MENUDESC = "CAN Utilities" + include $(APPDIR)/Directory.mk diff --git a/examples/Kmenu b/examples/Kmenu deleted file mode 100644 index ad6b7fb4b..000000000 --- a/examples/Kmenu +++ /dev/null @@ -1 +0,0 @@ -Examples diff --git a/examples/Makefile b/examples/Makefile index 70315d06c..501c30ac9 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -33,4 +33,6 @@ # ############################################################################ +MENUDESC = "Examples" + include $(APPDIR)/Directory.mk diff --git a/fsutils/Kmenu b/fsutils/Kmenu deleted file mode 100644 index 4e61ee913..000000000 --- a/fsutils/Kmenu +++ /dev/null @@ -1 +0,0 @@ -File System Utilities diff --git a/fsutils/Makefile b/fsutils/Makefile index 55351c3f3..f7e640083 100644 --- a/fsutils/Makefile +++ b/fsutils/Makefile @@ -33,4 +33,6 @@ # ############################################################################ +MENUDESC = "File System Utilities" + include $(APPDIR)/Directory.mk diff --git a/gpsutils/Kmenu b/gpsutils/Kmenu deleted file mode 100644 index 3fd21d77b..000000000 --- a/gpsutils/Kmenu +++ /dev/null @@ -1 +0,0 @@ -GPS Utilities diff --git a/gpsutils/Makefile b/gpsutils/Makefile index f34706ee0..3d85b0b0d 100644 --- a/gpsutils/Makefile +++ b/gpsutils/Makefile @@ -33,4 +33,6 @@ # ############################################################################ +MENUDESC = "GPS Utilities" + include $(APPDIR)/Directory.mk diff --git a/graphics/Kmenu b/graphics/Kmenu deleted file mode 100644 index 453def533..000000000 --- a/graphics/Kmenu +++ /dev/null @@ -1 +0,0 @@ -Graphics Support diff --git a/graphics/Makefile b/graphics/Makefile index 60b1c91ae..dfff4b917 100644 --- a/graphics/Makefile +++ b/graphics/Makefile @@ -33,4 +33,6 @@ # ############################################################################ +MENUDESC = "Graphics Support" + include $(APPDIR)/Directory.mk diff --git a/interpreters/Kmenu b/interpreters/Kmenu deleted file mode 100644 index ec50152c2..000000000 --- a/interpreters/Kmenu +++ /dev/null @@ -1 +0,0 @@ -Interpreters diff --git a/interpreters/Makefile b/interpreters/Makefile index 0e499e268..edd4ec0c6 100644 --- a/interpreters/Makefile +++ b/interpreters/Makefile @@ -33,4 +33,6 @@ # ############################################################################ +MENUDESC = "Interpreters" + include $(APPDIR)/Directory.mk diff --git a/netutils/Kmenu b/netutils/Kmenu deleted file mode 100644 index 3919aa206..000000000 --- a/netutils/Kmenu +++ /dev/null @@ -1 +0,0 @@ -Network Utilities diff --git a/netutils/Makefile b/netutils/Makefile index 3cab860f7..ce267013b 100644 --- a/netutils/Makefile +++ b/netutils/Makefile @@ -33,4 +33,6 @@ # ############################################################################ +MENUDESC = "Network Utilities" + include $(APPDIR)/Directory.mk diff --git a/system/Kmenu b/system/Kmenu deleted file mode 100644 index 038615da8..000000000 --- a/system/Kmenu +++ /dev/null @@ -1 +0,0 @@ -System Libraries and NSH Add-Ons diff --git a/system/Makefile b/system/Makefile index eae61b31c..2bbcf2c8a 100644 --- a/system/Makefile +++ b/system/Makefile @@ -33,4 +33,6 @@ # ############################################################################ +MENUDESC = "System Libraries and NSH Add-Ons" + include $(APPDIR)/Directory.mk From d2aa24ad88f32add1d944c4885ec11c660841569 Mon Sep 17 00:00:00 2001 From: Sebastien Lorquet Date: Thu, 9 Jun 2016 10:51:04 -0600 Subject: [PATCH 36/74] Make sure that APPNAME is defined in all Makefiles that generate applications --- examples/configdata/Makefile | 2 ++ examples/hidkbd/Makefile | 2 ++ examples/mm/Makefile | 2 ++ examples/mount/Makefile | 2 ++ examples/mtdpart/Makefile | 6 ++++-- examples/mtdpart/mtdpart_main.c | 6 +----- examples/mtdrwb/Makefile | 6 ++++-- examples/nsh/Makefile | 2 ++ examples/nxffs/Makefile | 6 ++++-- examples/pashello/Makefile | 2 ++ examples/pipe/Makefile | 2 ++ examples/rgmp/Makefile | 2 ++ examples/sendmail/Makefile | 2 ++ examples/serloop/Makefile | 2 ++ examples/smart/Makefile | 2 ++ examples/uavcan/Makefile | 2 ++ examples/wget/Makefile | 2 ++ nshlib/Kconfig | 2 +- 18 files changed, 40 insertions(+), 12 deletions(-) diff --git a/examples/configdata/Makefile b/examples/configdata/Makefile index d3a23e212..fa0bb9efc 100644 --- a/examples/configdata/Makefile +++ b/examples/configdata/Makefile @@ -37,6 +37,8 @@ # CONFIGDATA Unit Test +APPNAME = configdata + ASRCS = CSRCS = MAINSRC = configdata_main.c diff --git a/examples/hidkbd/Makefile b/examples/hidkbd/Makefile index 32fd923a6..8b0298ea9 100644 --- a/examples/hidkbd/Makefile +++ b/examples/hidkbd/Makefile @@ -37,6 +37,8 @@ # USB Host HID keyboard Example +APPNAME = hidkbd + ASRCS = CSRCS = MAINSRC = hidkbd_main.c diff --git a/examples/mm/Makefile b/examples/mm/Makefile index 3f86b95f7..1a832863b 100644 --- a/examples/mm/Makefile +++ b/examples/mm/Makefile @@ -37,6 +37,8 @@ # Memory Management Test +APPNAME = mm + ASRCS = CSRCS = MAINSRC = mm_main.c diff --git a/examples/mount/Makefile b/examples/mount/Makefile index 295389c60..900dae568 100644 --- a/examples/mount/Makefile +++ b/examples/mount/Makefile @@ -37,6 +37,8 @@ # mount() test +APPNAME = mount + ASRCS = CSRCS = ramdisk.c MAINSRC = mount_main.c diff --git a/examples/mtdpart/Makefile b/examples/mtdpart/Makefile index 3a5a2f2af..eff6cdc29 100755 --- a/examples/mtdpart/Makefile +++ b/examples/mtdpart/Makefile @@ -1,7 +1,7 @@ ############################################################################ # apps/examples/mtdpart/Makefile # -# Copyright (C) 2013 Gregory Nutt. All rights reserved. +# Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -35,7 +35,9 @@ -include $(TOPDIR)/Make.defs -# Hello, World! Example +# MTD Partition Example + +APPNAME = mtdpart ASRCS = CSRCS = diff --git a/examples/mtdpart/mtdpart_main.c b/examples/mtdpart/mtdpart_main.c index 66edadb5c..b600875e4 100644 --- a/examples/mtdpart/mtdpart_main.c +++ b/examples/mtdpart/mtdpart_main.c @@ -1,7 +1,7 @@ /**************************************************************************** * examples/mtdpart/mtdpart_main.c * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -127,10 +127,6 @@ static uint8_t g_simflash[MTDPART_BUFSIZE]; extern FAR struct mtd_dev_s *mtdpart_archinitialize(void); #endif -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/examples/mtdrwb/Makefile b/examples/mtdrwb/Makefile index c284910b8..ad5767ddd 100755 --- a/examples/mtdrwb/Makefile +++ b/examples/mtdrwb/Makefile @@ -1,7 +1,7 @@ ############################################################################ # apps/examplex/mtdrwb/Makefile # -# Copyright (C) 2014 Gregory Nutt. All rights reserved. +# Copyright (C) 2014, 2016 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -35,7 +35,9 @@ -include $(TOPDIR)/Make.defs -# Hello, World! Example +# MTD R/W buffer test Example + +APPNAME = mtdrwb ASRCS = CSRCS = diff --git a/examples/nsh/Makefile b/examples/nsh/Makefile index bfb6958a7..1baad89b9 100644 --- a/examples/nsh/Makefile +++ b/examples/nsh/Makefile @@ -37,6 +37,8 @@ # NuttShell (NSH) Example +APPNAME = nsh + ASRCS = CSRCS = MAINSRC = nsh_main.c diff --git a/examples/nxffs/Makefile b/examples/nxffs/Makefile index 045d3a55b..1227d2714 100644 --- a/examples/nxffs/Makefile +++ b/examples/nxffs/Makefile @@ -1,7 +1,7 @@ ############################################################################ # apps/examples/nxffs/Makefile # -# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. +# Copyright (C) 2011-2012, 2016 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -35,7 +35,9 @@ -include $(TOPDIR)/Make.defs -# Hello, World! Example +# NXFFS file system example + +APPNAME = nxffs ASRCS = CSRCS = diff --git a/examples/pashello/Makefile b/examples/pashello/Makefile index 403173867..95ad4754d 100644 --- a/examples/pashello/Makefile +++ b/examples/pashello/Makefile @@ -37,6 +37,8 @@ # Pascal Add-On Example +APPNAME = pashello + ifeq ($(WINTOOL),y) INCDIROPT = -w endif diff --git a/examples/pipe/Makefile b/examples/pipe/Makefile index 62d1ac584..08d5216aa 100644 --- a/examples/pipe/Makefile +++ b/examples/pipe/Makefile @@ -37,6 +37,8 @@ # Pipe Example +APPNAME = pipe + ASRCS = CSRCS = transfer_test.c interlock_test.c redirect_test.c MAINSRC = pipe_main.c diff --git a/examples/rgmp/Makefile b/examples/rgmp/Makefile index 2cc19a0cf..b435ad3f8 100644 --- a/examples/rgmp/Makefile +++ b/examples/rgmp/Makefile @@ -37,6 +37,8 @@ # The smallest thing you can build -- the NULL example. +APPNAME = rgmp + ASRCS = CSRCS = MAINSRC = rgmp_main.c diff --git a/examples/sendmail/Makefile b/examples/sendmail/Makefile index 3a0430744..87d66431a 100644 --- a/examples/sendmail/Makefile +++ b/examples/sendmail/Makefile @@ -37,6 +37,8 @@ # Sendmail SMTP Example +APPNAME = sendmail + ASRCS = CSRCS = MAINSRC = sendmail_main.c diff --git a/examples/serloop/Makefile b/examples/serloop/Makefile index 716e2622b..102a2474e 100644 --- a/examples/serloop/Makefile +++ b/examples/serloop/Makefile @@ -37,6 +37,8 @@ # Mindlessly simple console loopack test +APPNAME = serloop + ASRCS = CSRCS = MAINSRC = serloop_main.c diff --git a/examples/smart/Makefile b/examples/smart/Makefile index e612c8e5a..0f30aca86 100644 --- a/examples/smart/Makefile +++ b/examples/smart/Makefile @@ -37,6 +37,8 @@ # SMART file system stress test +APPNAME = smart + ASRCS = CSRCS = MAINSRC = smart_main.c diff --git a/examples/uavcan/Makefile b/examples/uavcan/Makefile index 8d5df1888..1d1712f2b 100644 --- a/examples/uavcan/Makefile +++ b/examples/uavcan/Makefile @@ -35,6 +35,8 @@ -include $(TOPDIR)/Make.defs +APPNAME = uavcan + MAINSRC = uavcan_main.cxx CXXFLAGS += -I$(TOPDIR)/include/apps diff --git a/examples/wget/Makefile b/examples/wget/Makefile index 9fa488e41..368550634 100644 --- a/examples/wget/Makefile +++ b/examples/wget/Makefile @@ -41,6 +41,8 @@ ASRCS = CSRCS = MAINSRC = wget_main.c +APPNAME = wget + CONFIG_XYZ_PROGNAME ?= wget$(EXEEXT) PROGNAME = $(CONFIG_XYZ_PROGNAME) diff --git a/nshlib/Kconfig b/nshlib/Kconfig index eabdcb6f6..cf6788248 100644 --- a/nshlib/Kconfig +++ b/nshlib/Kconfig @@ -947,7 +947,7 @@ config NSH_NETINIT default y depends on NET ---help--- - This option enables/disables all network initialization in NSH. + This option enables/disables all network initialization in NSH. if NSH_NETINIT From 406ac81fb38df387d9c9432303ad64cd5c003c55 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 9 Jun 2016 13:26:22 -0600 Subject: [PATCH 37/74] Update ChangeLog --- ChangeLog.txt | 15 +++++++++------ system/hex2bin/hex2bin_main.c | 8 -------- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 9815bd2a7..69a233608 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1620,9 +1620,12 @@ definiitions (2016-06-05). * Many files: Change to the way that Kconfig files are generated in order to better support reuse of the apps/ directory in NuttX products. Changes - include: add kmenu files, make the full tree use wildcards make.defs, Add - empty preconfig rules to 'leaf' makefiles, Use directory.mk for recursive - dir makefiles, Individual app kconfig fixes, Recursive Kconfig - autogeneration, Add kconfig files for pcode and tiff, and fix a gitignore - rule, From Sébastien Lorquet (2016-06-06). - + include: Make the full tree use wildcards make.defs, Add empty preconfig + rules to 'leaf' makefiles, Use directory.mk for recursive dir makefiles, + Individual app kconfig fixes, Recursive Kconfig autogeneration, Add + kconfig files for pcode and tiff, and fix a gitignore rule, From + Sébastien Lorquet (2016-06-06). + * apps/nshlib: Make NSH net-initialization be a configuration option. From + Marten Svanfeld (2016-06-09). + * netutils/ntpc and nshlib: NTP Client: All retries; Add initialization + in NSH network startup logic. From David S. Alessio (2016-06-09) . diff --git a/system/hex2bin/hex2bin_main.c b/system/hex2bin/hex2bin_main.c index 6610491e4..762491e27 100644 --- a/system/hex2bin/hex2bin_main.c +++ b/system/hex2bin/hex2bin_main.c @@ -49,14 +49,6 @@ #ifdef CONFIG_SYSTEM_HEX2BIN_BUILTIN -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Types - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ From 0a68db79f62daba43dcb864283047498c2b4d9b9 Mon Sep 17 00:00:00 2001 From: pnb Date: Fri, 10 Jun 2016 23:17:09 +0200 Subject: [PATCH 38/74] esp8266 bug fix --- netutils/esp8266/esp8266.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/netutils/esp8266/esp8266.c b/netutils/esp8266/esp8266.c index ee2b71e40..84c482ed6 100644 --- a/netutils/esp8266/esp8266.c +++ b/netutils/esp8266/esp8266.c @@ -494,7 +494,7 @@ static int lesp_read(int timeout_ms) pthread_mutex_unlock(&g_lesp_state.mutex); } - while (ret == 0); + while (ret <= 0); nvdbg("read %d=>%s\n", ret, g_lesp_state.bufans); @@ -1092,7 +1092,7 @@ int lesp_list_access_points(lesp_cb_t cb) ret = lesp_ask_ans_ok(lespTIMEOUT_MS,"AT\r\n"); - if (ret < 0) + if (ret >= 0) { ret = lesp_send_cmd("AT+CWLAP\r\n"); } From dab4105f80bf8948a7047f1b88e49e3002faa601 Mon Sep 17 00:00:00 2001 From: pnb Date: Sat, 11 Jun 2016 12:46:26 +0200 Subject: [PATCH 39/74] add lesp_set_baudrate --- netutils/esp8266/esp8266.c | 52 +++++++++++++++++++++++++++++++++++--- 1 file changed, 49 insertions(+), 3 deletions(-) diff --git a/netutils/esp8266/esp8266.c b/netutils/esp8266/esp8266.c index 84c482ed6..77fb56012 100644 --- a/netutils/esp8266/esp8266.c +++ b/netutils/esp8266/esp8266.c @@ -53,7 +53,9 @@ #include #include +#include "sys/ioctl.h" #include "sys/socket.h" +#include "termios.h" #include "apps/netutils/esp8266.h" @@ -158,6 +160,45 @@ lesp_state_t g_lesp_state = * Private Functions ****************************************************************************/ +/**************************************************************************** + * Name: lesp_set_baudrate + * + * Description: + * Set com port to baudrate. + * + * Input Parmeters: + * sockfd : int baudrate + * + * Returned Value: + * 0 on success, -1 incase of error. + * + ****************************************************************************/ + +static int lesp_set_baudrate(int baudrate) +{ + struct termios term; + + if ( ioctl(g_lesp_state.fd,TCGETS,(unsigned long)&term) < 0 ) + { + ndbg("TCGETS failed.\n"); + return -1; + } + + if ( ( cfsetispeed( &term, baudrate ) < 0 ) || + ( cfsetospeed( &term, baudrate ) < 0 ) ) + { + ndbg("Connot set baudrate %0x08X\n",baudrate); + return -1; + } + + if ( ioctl(g_lesp_state.fd,TCSETS,(unsigned long)&term) < 0 ) + { + ndbg("TCSETS failed.\n"); + return -1; + } + return 0; +} + /**************************************************************************** * Name: get_sock * @@ -878,13 +919,11 @@ int lesp_initialize(void) ret = -1; } -#if 0 // lesp_set_baudrate is not defined - if (ret >= 0 && lesp_set_baudrate(g_lesp_state.fd, CONFIG_NETUTILS_ESP8266_BAUDRATE) < 0) + if (ret >= 0 && lesp_set_baudrate(CONFIG_NETUTILS_ESP8266_BAUDRATE) < 0) { ndbg("Cannot set baud rate %d\n", CONFIG_NETUTILS_ESP8266_BAUDRATE); ret = -1; } -#endif if ((ret >= 0) && (g_lesp_state.worker.running == false)) { @@ -892,6 +931,13 @@ int lesp_initialize(void) } pthread_mutex_unlock(&g_lesp_state.mutex); + + if (ret < 0) + { + nvdbg("Esp8266 initialisation failed!\n"); + return -1; + } + g_lesp_state.is_initialized = true; nvdbg("Esp8266 initialized\n"); From 96853cfea1c4f426ead28e6f694591a04b905f25 Mon Sep 17 00:00:00 2001 From: pnb Date: Sat, 11 Jun 2016 12:51:56 +0200 Subject: [PATCH 40/74] commetic --- netutils/esp8266/esp8266.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/netutils/esp8266/esp8266.c b/netutils/esp8266/esp8266.c index 77fb56012..4b77deedf 100644 --- a/netutils/esp8266/esp8266.c +++ b/netutils/esp8266/esp8266.c @@ -175,29 +175,29 @@ lesp_state_t g_lesp_state = ****************************************************************************/ static int lesp_set_baudrate(int baudrate) -{ + { struct termios term; if ( ioctl(g_lesp_state.fd,TCGETS,(unsigned long)&term) < 0 ) - { + { ndbg("TCGETS failed.\n"); return -1; - } + } if ( ( cfsetispeed( &term, baudrate ) < 0 ) || ( cfsetospeed( &term, baudrate ) < 0 ) ) - { + { ndbg("Connot set baudrate %0x08X\n",baudrate); return -1; - } + } if ( ioctl(g_lesp_state.fd,TCSETS,(unsigned long)&term) < 0 ) - { + { ndbg("TCSETS failed.\n"); return -1; - } + } return 0; -} + } /**************************************************************************** * Name: get_sock From 8f0e214772d795c35afdabcfff7ea2bc97ca96da Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 11 Jun 2016 07:36:45 -0600 Subject: [PATCH 41/74] Trivial changes from review of last PR --- netutils/esp8266/esp8266.c | 50 ++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/netutils/esp8266/esp8266.c b/netutils/esp8266/esp8266.c index 4b77deedf..eeab2f964 100644 --- a/netutils/esp8266/esp8266.c +++ b/netutils/esp8266/esp8266.c @@ -42,20 +42,21 @@ #include +#include + #include #include #include #include #include #include +#include #include #include #include #include -#include "sys/ioctl.h" -#include "sys/socket.h" -#include "termios.h" #include "apps/netutils/esp8266.h" @@ -83,7 +84,7 @@ #define ESP8266_ACCESS_POINT_NBR_MAX 32 -#define lespWAITING_OK_POLLING_MS 250 +#define lespWAITING_OK_POLLING_MS 250 #define lespTIMEOUT_MS 1000 #define lespTIMEOUT_MS_SEND 1000 #define lespTIMEOUT_MS_CONNECTION 30000 @@ -178,24 +179,25 @@ static int lesp_set_baudrate(int baudrate) { struct termios term; - if ( ioctl(g_lesp_state.fd,TCGETS,(unsigned long)&term) < 0 ) + if (ioctl(g_lesp_state.fd,TCGETS,(unsigned long)&term) < 0) { ndbg("TCGETS failed.\n"); return -1; } - if ( ( cfsetispeed( &term, baudrate ) < 0 ) || - ( cfsetospeed( &term, baudrate ) < 0 ) ) + if ((cfsetispeed(&term, baudrate) < 0) || + (cfsetospeed(&term, baudrate) < 0)) { ndbg("Connot set baudrate %0x08X\n",baudrate); return -1; } - if ( ioctl(g_lesp_state.fd,TCSETS,(unsigned long)&term) < 0 ) + if (ioctl(g_lesp_state.fd,TCSETS,(unsigned long)&term) < 0) { ndbg("TCSETS failed.\n"); return -1; } + return 0; } @@ -257,7 +259,7 @@ static int lesp_low_level_read(uint8_t* buf, int size) struct pollfd fds[1]; - memset(fds, 0, sizeof( struct pollfd)); + memset(fds, 0, sizeof(struct pollfd)); fds[0].fd = g_lesp_state.fd; fds[0].events = POLLIN; @@ -269,7 +271,7 @@ static int lesp_low_level_read(uint8_t* buf, int size) int err = errno; ndbg("worker read Error %d (errno %d)\n", ret, err); UNUSED(err); - } + } else if ((fds[0].revents & POLLERR) && (fds[0].revents & POLLHUP)) { ndbg("worker poll read Error %d\n", ret); @@ -410,7 +412,7 @@ static inline int lesp_read_ipd(void) } pthread_mutex_unlock(&g_lesp_state.mutex); - } + } return 0; } @@ -515,7 +517,7 @@ static int lesp_read(int timeout_ms) ts.tv_sec += (timeout_ms/1000) + lespTIMEOUT_FLOODING_OFFSET_S; - do + do { if (sem_timedwait(&g_lesp_state.sem,&ts) < 0) { @@ -723,7 +725,7 @@ static int lesp_parse_cwlap_ans_line(char* ptr, lesp_ap_t *ap) case 2: ptr++; /* Remove first '"' */ - *(ptr_next -1 ) = '\0'; + *(ptr_next - 1) = '\0'; ap->ssid = ptr; break; @@ -787,7 +789,7 @@ static void *lesp_worker(void *args) if (ret < 0) { ndbg("worker read data Error %d\n", ret); - } + } else if (ret > 0) { //nvdbg("c:0x%02X (%c)\n", c); @@ -844,7 +846,7 @@ static inline int lesp_create_worker(int priority) ret = pthread_attr_init(&thread_attr); - if (ret < 0) + if (ret < 0) { ndbg("Cannot Set scheduler parameter thread (%d)\n", ret); } @@ -863,9 +865,9 @@ static inline int lesp_create_worker(int priority) g_lesp_state.worker.running = true; - ret = pthread_create(&g_lesp_state.worker.thread, + ret = pthread_create(&g_lesp_state.worker.thread, (ret < 0)?NULL:&thread_attr, lesp_worker, NULL); - if (ret < 0) + if (ret < 0) { ndbg("Cannot Create thread return (%d)\n", ret); g_lesp_state.worker.running = false; @@ -979,7 +981,7 @@ int lesp_soft_reset(void) lesp_flush(); } - if (ret >= 0) + if (ret >= 0) { ret = lesp_ask_ans_ok(lespTIMEOUT_MS,"AT+GMR\r\n"); } @@ -1087,7 +1089,7 @@ int lesp_set_net(lesp_mode_t mode, in_addr_t ip, in_addr_t mask, in_addr_t gatew * Name: lesp_set_dhcp * * Description: - * It will Enable or disable DHCP of mode. + * It will Enable or disable DHCP of mode. * * Input Parmeters: * mode : mode to configure. @@ -1105,7 +1107,7 @@ int lesp_set_dhcp(lesp_mode_t mode,bool enable) ret = lesp_ask_ans_ok(lespTIMEOUT_MS, "AT+CWDHCP_CUR=%d,%c\r\n", mode,(enable)?'1':'0'); - + if (ret < 0) { return -1; @@ -1138,7 +1140,7 @@ int lesp_list_access_points(lesp_cb_t cb) ret = lesp_ask_ans_ok(lespTIMEOUT_MS,"AT\r\n"); - if (ret >= 0) + if (ret >= 0) { ret = lesp_send_cmd("AT+CWLAP\r\n"); } @@ -1343,7 +1345,7 @@ ssize_t lesp_send(int sockfd, FAR const uint8_t *buf, size_t len, int flags) { ret = lesp_ask_ans_ok(lespTIMEOUT_MS,"AT+CIPSEND=%d,%d\r\n",sockfd,len); } - + if (ret >= 0) { nvdbg("Sending in socket %d, %d bytes\n", sockfd,len); @@ -1357,7 +1359,7 @@ ssize_t lesp_send(int sockfd, FAR const uint8_t *buf, size_t len, int flags) if (ret < 0) { - break; + break; } while ((*ptr != 0) && (*ptr != 'S')) @@ -1391,7 +1393,7 @@ ssize_t lesp_recv(int sockfd, FAR uint8_t *buf, size_t len, int flags) int ret = 0; lesp_socket_t *sock; sem_t sem; - + if (sem_init(&sem, 0, 0) < 0) { nvdbg("Cannot create semaphore\n"); From ee8a62f009971118be58d110abf11279bd5b6e06 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 11 Jun 2016 07:55:33 -0600 Subject: [PATCH 42/74] netutils/esp8266/: CONFIG_SERIAL_TERMIOS must be defined in order to set BAUD --- netutils/esp8266/esp8266.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/netutils/esp8266/esp8266.c b/netutils/esp8266/esp8266.c index eeab2f964..08ccb9f7d 100644 --- a/netutils/esp8266/esp8266.c +++ b/netutils/esp8266/esp8266.c @@ -175,6 +175,7 @@ lesp_state_t g_lesp_state = * ****************************************************************************/ +#ifdef CONFIG_SERIAL_TERMIOS static int lesp_set_baudrate(int baudrate) { struct termios term; @@ -200,6 +201,7 @@ static int lesp_set_baudrate(int baudrate) return 0; } +#endif /**************************************************************************** * Name: get_sock @@ -921,11 +923,13 @@ int lesp_initialize(void) ret = -1; } +#ifdef CONFIG_SERIAL_TERMIOS if (ret >= 0 && lesp_set_baudrate(CONFIG_NETUTILS_ESP8266_BAUDRATE) < 0) { ndbg("Cannot set baud rate %d\n", CONFIG_NETUTILS_ESP8266_BAUDRATE); ret = -1; } +#endif if ((ret >= 0) && (g_lesp_state.worker.running == false)) { From 56e75e9db8e0313fcf594da8d69a161dc2d03add Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 11 Jun 2016 11:50:38 -0600 Subject: [PATCH 43/74] Rename CONFIG_DEBUG_VERBOSE to CONFIG_DEBUG_INFO --- examples/README.txt | 2 +- examples/cc3000/telnetd_driver.c | 2 +- examples/helloxx/helloxx_main.cxx | 2 +- netutils/chat/chat.c | 4 ++-- netutils/tftpc/tftpc_packets.c | 2 +- netutils/thttpd/libhttpd.h | 6 +++--- netutils/webserver/httpd.c | 4 ++-- nshlib/Kconfig | 4 ++-- nshlib/nsh_fscmds.c | 2 +- nshlib/nsh_netinit.c | 4 ++-- platform/arduino-due/sam_cxxinitialize.c | 2 +- platform/cloudctrl/stm32_cxxinitialize.c | 2 +- platform/fire-stm32v2/stm32_cxxinitialize.c | 2 +- platform/mikroe-stm32f4/stm32_cxxinitialize.c | 2 +- platform/nucleo-144/stm32_cxxinitialize.c | 2 +- platform/nucleo-f303re/stm32_cxxinitialize.c | 2 +- platform/nucleo-f4x1re/stm32_cxxinitialize.c | 2 +- platform/nucleo-l476rg/stm32_cxxinitialize.c | 2 +- platform/olimex-stm32-h405/stm32_cxxinitialize.c | 2 +- platform/olimex-stm32-h407/stm32_cxxinitialize.c | 2 +- platform/olimex-stm32-p207/stm32_cxxinitialize.c | 2 +- platform/olimexino-stm32/stm32_cxxinitialize.c | 2 +- platform/pcduino-a10/a1x_cxxinitialize.c | 2 +- platform/sabre-6quad/imx_cxxinitialize.c | 2 +- platform/sam3u-ek/sam_cxxinitialized.c | 2 +- platform/sam4e-ek/sam_cxxinitialize.c | 2 +- platform/sam4l-xplained/sam_cxxinitialize.c | 2 +- platform/sam4s-xplained-pro/sam_cxxinitialize.c | 2 +- platform/sam4s-xplained/sam_cxxinitialize.c | 2 +- platform/sama5d2-xult/sam_cxxinitialize.c | 2 +- platform/sama5d3-xplained/sam_cxxinitialize.c | 2 +- platform/sama5d3x-ek/sam_cxxinitialize.c | 2 +- platform/sama5d4-ek/sam_cxxinitialize.c | 2 +- platform/samd20-xplained/sam_cxxinitialize.c | 2 +- platform/samd21-xplained/sam_cxxinitialize.c | 2 +- platform/same70-xplained/sam_cxxinitialize.c | 2 +- platform/saml21-xplained/sam_cxxinitialize.c | 2 +- platform/samv71-xult/sam_cxxinitialize.c | 2 +- platform/shenzhou/stm32_cxxinitialize.c | 2 +- platform/spark/stm32_cxxinitialize.c | 2 +- platform/stm3220g-eval/stm32_cxxinitialize.c | 2 +- platform/stm3240g-eval/stm32_cxxinitialize.c | 2 +- platform/stm32f3discovery/stm32_cxxinitialize.c | 2 +- platform/stm32f429i-disco/stm32_cxxinitialize.c | 2 +- platform/stm32f4discovery/stm32_cxxinitialize.c | 2 +- platform/stm32f746g-disco/stm32_cxxinitialize.c | 2 +- platform/stm32l476vg-disco/stm32_cxxinitialize.c | 2 +- platform/stm32ldiscovery/stm32_cxxinitialize.c | 2 +- platform/teensy-lc/kl_cxxinitialize.c | 2 +- platform/viewtool-stm32f107/stm32_cxxinitialize.c | 2 +- 50 files changed, 56 insertions(+), 56 deletions(-) diff --git a/examples/README.txt b/examples/README.txt index 14291a07f..e5b0e9e55 100644 --- a/examples/README.txt +++ b/examples/README.txt @@ -485,7 +485,7 @@ examples/ftpc Otherwise, you will have not feeback about what is going on: CONFIG_DEBUG=y - CONFIG_DEBUG_VERBOSE=y + CONFIG_DEBUG_INFO=y CONFIG_DEBUG_FTPC=y examples/ftpd diff --git a/examples/cc3000/telnetd_driver.c b/examples/cc3000/telnetd_driver.c index 2fee9fcab..863270983 100644 --- a/examples/cc3000/telnetd_driver.c +++ b/examples/cc3000/telnetd_driver.c @@ -180,7 +180,7 @@ static inline void telnetd_dumpbuffer(FAR const char *msg, FAR const char *buffer, unsigned int nbytes) { - /* CONFIG_DEBUG, CONFIG_DEBUG_VERBOSE, and CONFIG_DEBUG_NET have to be + /* CONFIG_DEBUG, CONFIG_DEBUG_INFO, and CONFIG_DEBUG_NET have to be * defined or the following does nothing. */ diff --git a/examples/helloxx/helloxx_main.cxx b/examples/helloxx/helloxx_main.cxx index 940dccef8..9e0da72fd 100644 --- a/examples/helloxx/helloxx_main.cxx +++ b/examples/helloxx/helloxx_main.cxx @@ -65,7 +65,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg # define cxxlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE +# ifdef CONFIG_DEBUG_INFO # define cxxvdbg vdbg # define cxxllvdbg llvdbg # else diff --git a/netutils/chat/chat.c b/netutils/chat/chat.c index beecf12b8..62038172b 100644 --- a/netutils/chat/chat.c +++ b/netutils/chat/chat.c @@ -662,7 +662,7 @@ static int chat_script_run(FAR struct chat* priv) { FAR struct chat_line* line = priv->script; int ret = 0; -#ifdef CONFIG_DEBUG_VERBOSE +#ifdef CONFIG_DEBUG_INFO int line_num = 0; #endif @@ -672,7 +672,7 @@ static int chat_script_run(FAR struct chat* priv) if (!ret) { line = line->next; -#ifdef CONFIG_DEBUG_VERBOSE +#ifdef CONFIG_DEBUG_INFO line_num++; #endif } diff --git a/netutils/tftpc/tftpc_packets.c b/netutils/tftpc/tftpc_packets.c index 0c4a2fa11..6832cd6e9 100644 --- a/netutils/tftpc/tftpc_packets.c +++ b/netutils/tftpc/tftpc_packets.c @@ -244,7 +244,7 @@ ssize_t tftp_recvfrom(int sd, void *buf, size_t len, struct sockaddr_in *from) { /* For debugging, it is helpful to start with a clean buffer */ -#if defined(CONFIG_DEBUG_VERBOSE) && defined(CONFIG_DEBUG_NET) +#if defined(CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_NET) memset(buf, 0, len); #endif diff --git a/netutils/thttpd/libhttpd.h b/netutils/thttpd/libhttpd.h index 248d9bbe2..d83c2c419 100644 --- a/netutils/thttpd/libhttpd.h +++ b/netutils/thttpd/libhttpd.h @@ -74,7 +74,7 @@ #undef CONFIG_THTTPD_BADREQUEST /* Define to enable "Bad Request" instrumentation */ #ifdef CONFIG_THTTPD_BADREQUEST -# if !defined(CONFIG_DEBUG_VERBOSE) || !defined(CONFIG_DEBUG_NET) +# if !defined(CONFIG_DEBUG_INFO) || !defined(CONFIG_DEBUG_NET) # undef CONFIG_THTTPD_BADREQUEST # else # define BADREQUEST(s) nvdbg("Bad Request: \"%s\"\n", s) @@ -91,7 +91,7 @@ #undef CONFIG_THTTPD_NOTIMPLEMENTED /* Define to enable "Not Implemented" instrumentation */ #ifdef CONFIG_THTTPD_NOTIMPLEMENTED -# if !defined(CONFIG_DEBUG_VERBOSE) || !defined(CONFIG_DEBUG_NET) +# if !defined(CONFIG_DEBUG_INFO) || !defined(CONFIG_DEBUG_NET) # undef CONFIG_THTTPD_NOTIMPLEMENTED # else # define NOTIMPLEMENTED(s) nvdbg("Not Implemented: \"%s\"\n", s) @@ -108,7 +108,7 @@ #undef CONFIG_THTTPD_INTERNALERROR /* Define to enable "Internal Error" instrumentation */ #ifdef CONFIG_THTTPD_INTERNALERROR -# if !defined(CONFIG_DEBUG_VERBOSE) || !defined(CONFIG_DEBUG_NET) +# if !defined(CONFIG_DEBUG_INFO) || !defined(CONFIG_DEBUG_NET) # undef CONFIG_THTTPD_INTERNALERROR # else # define INTERNALERROR(s) nvdbg("Internal Error: \"%s\"\n", s) diff --git a/netutils/webserver/httpd.c b/netutils/webserver/httpd.c index bd7f3a092..b46f0739d 100644 --- a/netutils/webserver/httpd.c +++ b/netutils/webserver/httpd.c @@ -193,7 +193,7 @@ static int httpd_close(struct httpd_fs_file *file) #ifdef CONFIG_NETUTILS_HTTPD_DUMPBUFFER static void httpd_dumpbuffer(FAR const char *msg, FAR const char *buffer, unsigned int nbytes) { - /* CONFIG_DEBUG, CONFIG_DEBUG_VERBOSE, and CONFIG_DEBUG_NET have to be + /* CONFIG_DEBUG, CONFIG_DEBUG_INFO, and CONFIG_DEBUG_NET have to be * defined or the following does nothing. */ @@ -206,7 +206,7 @@ static void httpd_dumpbuffer(FAR const char *msg, FAR const char *buffer, unsign #ifdef CONFIG_NETUTILS_HTTPD_DUMPPSTATE static void httpd_dumppstate(struct httpd_state *pstate, const char *msg) { -#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_VERBOSE) && defined(CONFIG_DEBUG_NET) +#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_NET) nvdbg("[%d] pstate(%p): [%s]\n", pstate->ht_sockfd, pstate, msg); nvdbg(" filename: [%s]\n", pstate->ht_filename); nvdbg(" htfile len: %d\n", pstate->ht_file.len); diff --git a/nshlib/Kconfig b/nshlib/Kconfig index cf6788248..f871200d6 100644 --- a/nshlib/Kconfig +++ b/nshlib/Kconfig @@ -1041,10 +1041,10 @@ config NSH_NETINIT_DEBUG depends on DEBUG ---help--- Normally debug output is controlled by DEBUG_NET. However, that - will generate a LOT of debug output, especially if DEBUG_VERBOSE is + will generate a LOT of debug output, especially if CONFIG_DEBUG_INFO is also selected. This option is intended to force VERVOSE debug output from the NSH network initialization logic even if DEBUG_NET - or DEBUG_VERBOSE are not selected. This allows for focused, unit- + or CONFIG_DEBUG_INFO are not selected. This allows for focused, unit- level debug of the NSH network initialization logic. menu "IP Address Configuration" diff --git a/nshlib/nsh_fscmds.c b/nshlib/nsh_fscmds.c index 530720401..df2fda8e1 100644 --- a/nshlib/nsh_fscmds.c +++ b/nshlib/nsh_fscmds.c @@ -1290,7 +1290,7 @@ int cmd_mkrd(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) goto errout_with_fmt; } -#ifdef CONFIG_DEBUG_VERBOSE +#ifdef CONFIG_DEBUG_INFO memset(buffer, 0, sectsize * nsectors); #endif dbg("RAMDISK at %p\n", buffer); diff --git a/nshlib/nsh_netinit.c b/nshlib/nsh_netinit.c index 863376931..caca5e3c8 100644 --- a/nshlib/nsh_netinit.c +++ b/nshlib/nsh_netinit.c @@ -45,8 +45,8 @@ /* Is network initialization debug forced on? */ #ifdef CONFIG_NSH_NETINIT_DEBUG -# undef CONFIG_DEBUG_VERBOSE -# define CONFIG_DEBUG_VERBOSE 1 +# undef CONFIG_DEBUG_INFO +# define CONFIG_DEBUG_INFO 1 # undef CONFIG_DEBUG_NET # define CONFIG_DEBUG_NET 1 #endif diff --git a/platform/arduino-due/sam_cxxinitialize.c b/platform/arduino-due/sam_cxxinitialize.c index 4a745351c..58662cee9 100644 --- a/platform/arduino-due/sam_cxxinitialize.c +++ b/platform/arduino-due/sam_cxxinitialize.c @@ -60,7 +60,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg # define cxxlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE +# ifdef CONFIG_DEBUG_INFO # define cxxvdbg vdbg # define cxxllvdbg llvdbg # else diff --git a/platform/cloudctrl/stm32_cxxinitialize.c b/platform/cloudctrl/stm32_cxxinitialize.c index e002b283c..63216a310 100644 --- a/platform/cloudctrl/stm32_cxxinitialize.c +++ b/platform/cloudctrl/stm32_cxxinitialize.c @@ -61,7 +61,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg # define cxxlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE +# ifdef CONFIG_DEBUG_INFO # define cxxvdbg vdbg # define cxxllvdbg llvdbg # else diff --git a/platform/fire-stm32v2/stm32_cxxinitialize.c b/platform/fire-stm32v2/stm32_cxxinitialize.c index b95d8578d..cd6fd0e5a 100644 --- a/platform/fire-stm32v2/stm32_cxxinitialize.c +++ b/platform/fire-stm32v2/stm32_cxxinitialize.c @@ -60,7 +60,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg # define cxxlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE +# ifdef CONFIG_DEBUG_INFO # define cxxvdbg vdbg # define cxxllvdbg llvdbg # else diff --git a/platform/mikroe-stm32f4/stm32_cxxinitialize.c b/platform/mikroe-stm32f4/stm32_cxxinitialize.c index e6aff83a9..aabfab73b 100644 --- a/platform/mikroe-stm32f4/stm32_cxxinitialize.c +++ b/platform/mikroe-stm32f4/stm32_cxxinitialize.c @@ -60,7 +60,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg # define cxxlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE +# ifdef CONFIG_DEBUG_INFO # define cxxvdbg vdbg # define cxxllvdbg llvdbg # else diff --git a/platform/nucleo-144/stm32_cxxinitialize.c b/platform/nucleo-144/stm32_cxxinitialize.c index 3d81e480a..48fe9d67a 100644 --- a/platform/nucleo-144/stm32_cxxinitialize.c +++ b/platform/nucleo-144/stm32_cxxinitialize.c @@ -61,7 +61,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg # define cxxlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE +# ifdef CONFIG_DEBUG_INFO # define cxxvdbg vdbg # define cxxllvdbg llvdbg # else diff --git a/platform/nucleo-f303re/stm32_cxxinitialize.c b/platform/nucleo-f303re/stm32_cxxinitialize.c index 4884f6ba6..856d0c5ab 100644 --- a/platform/nucleo-f303re/stm32_cxxinitialize.c +++ b/platform/nucleo-f303re/stm32_cxxinitialize.c @@ -60,7 +60,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg # define cxxlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE +# ifdef CONFIG_DEBUG_INFO # define cxxvdbg vdbg # define cxxllvdbg llvdbg # else diff --git a/platform/nucleo-f4x1re/stm32_cxxinitialize.c b/platform/nucleo-f4x1re/stm32_cxxinitialize.c index 3017156b9..bd1075efb 100644 --- a/platform/nucleo-f4x1re/stm32_cxxinitialize.c +++ b/platform/nucleo-f4x1re/stm32_cxxinitialize.c @@ -60,7 +60,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg # define cxxlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE +# ifdef CONFIG_DEBUG_INFO # define cxxvdbg vdbg # define cxxllvdbg llvdbg # else diff --git a/platform/nucleo-l476rg/stm32_cxxinitialize.c b/platform/nucleo-l476rg/stm32_cxxinitialize.c index 05a408736..bcb9f2712 100644 --- a/platform/nucleo-l476rg/stm32_cxxinitialize.c +++ b/platform/nucleo-l476rg/stm32_cxxinitialize.c @@ -60,7 +60,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg # define cxxlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE +# ifdef CONFIG_DEBUG_INFO # define cxxvdbg vdbg # define cxxllvdbg llvdbg # else diff --git a/platform/olimex-stm32-h405/stm32_cxxinitialize.c b/platform/olimex-stm32-h405/stm32_cxxinitialize.c index 507d8f687..5fa0dae58 100644 --- a/platform/olimex-stm32-h405/stm32_cxxinitialize.c +++ b/platform/olimex-stm32-h405/stm32_cxxinitialize.c @@ -60,7 +60,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg # define cxxlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE +# ifdef CONFIG_DEBUG_INFO # define cxxvdbg vdbg # define cxxllvdbg llvdbg # else diff --git a/platform/olimex-stm32-h407/stm32_cxxinitialize.c b/platform/olimex-stm32-h407/stm32_cxxinitialize.c index 550b826dc..6b6b961e3 100644 --- a/platform/olimex-stm32-h407/stm32_cxxinitialize.c +++ b/platform/olimex-stm32-h407/stm32_cxxinitialize.c @@ -60,7 +60,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg # define cxxlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE +# ifdef CONFIG_DEBUG_INFO # define cxxvdbg vdbg # define cxxllvdbg llvdbg # else diff --git a/platform/olimex-stm32-p207/stm32_cxxinitialize.c b/platform/olimex-stm32-p207/stm32_cxxinitialize.c index 1953b0aca..742141fbb 100644 --- a/platform/olimex-stm32-p207/stm32_cxxinitialize.c +++ b/platform/olimex-stm32-p207/stm32_cxxinitialize.c @@ -60,7 +60,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg # define cxxlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE +# ifdef CONFIG_DEBUG_INFO # define cxxvdbg vdbg # define cxxllvdbg llvdbg # else diff --git a/platform/olimexino-stm32/stm32_cxxinitialize.c b/platform/olimexino-stm32/stm32_cxxinitialize.c index ba29a0f79..3d06bc7d0 100644 --- a/platform/olimexino-stm32/stm32_cxxinitialize.c +++ b/platform/olimexino-stm32/stm32_cxxinitialize.c @@ -60,7 +60,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg # define cxxlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE +# ifdef CONFIG_DEBUG_INFO # define cxxvdbg vdbg # define cxxllvdbg llvdbg # else diff --git a/platform/pcduino-a10/a1x_cxxinitialize.c b/platform/pcduino-a10/a1x_cxxinitialize.c index c02405039..1cdd6efc2 100644 --- a/platform/pcduino-a10/a1x_cxxinitialize.c +++ b/platform/pcduino-a10/a1x_cxxinitialize.c @@ -60,7 +60,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg # define cxxlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE +# ifdef CONFIG_DEBUG_INFO # define cxxvdbg vdbg # define cxxllvdbg llvdbg # else diff --git a/platform/sabre-6quad/imx_cxxinitialize.c b/platform/sabre-6quad/imx_cxxinitialize.c index 3cc114105..8edc5ae8e 100644 --- a/platform/sabre-6quad/imx_cxxinitialize.c +++ b/platform/sabre-6quad/imx_cxxinitialize.c @@ -60,7 +60,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg # define cxxlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE +# ifdef CONFIG_DEBUG_INFO # define cxxvdbg vdbg # define cxxllvdbg llvdbg # else diff --git a/platform/sam3u-ek/sam_cxxinitialized.c b/platform/sam3u-ek/sam_cxxinitialized.c index b5eb6f086..3685f00fb 100644 --- a/platform/sam3u-ek/sam_cxxinitialized.c +++ b/platform/sam3u-ek/sam_cxxinitialized.c @@ -60,7 +60,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg # define cxxlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE +# ifdef CONFIG_DEBUG_INFO # define cxxvdbg vdbg # define cxxllvdbg llvdbg # else diff --git a/platform/sam4e-ek/sam_cxxinitialize.c b/platform/sam4e-ek/sam_cxxinitialize.c index 5c01a5bcc..8498bc63b 100644 --- a/platform/sam4e-ek/sam_cxxinitialize.c +++ b/platform/sam4e-ek/sam_cxxinitialize.c @@ -60,7 +60,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg # define cxxlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE +# ifdef CONFIG_DEBUG_INFO # define cxxvdbg vdbg # define cxxllvdbg llvdbg # else diff --git a/platform/sam4l-xplained/sam_cxxinitialize.c b/platform/sam4l-xplained/sam_cxxinitialize.c index 0770af122..04e777848 100644 --- a/platform/sam4l-xplained/sam_cxxinitialize.c +++ b/platform/sam4l-xplained/sam_cxxinitialize.c @@ -60,7 +60,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg # define cxxlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE +# ifdef CONFIG_DEBUG_INFO # define cxxvdbg vdbg # define cxxllvdbg llvdbg # else diff --git a/platform/sam4s-xplained-pro/sam_cxxinitialize.c b/platform/sam4s-xplained-pro/sam_cxxinitialize.c index 589428bc9..5b705fef7 100644 --- a/platform/sam4s-xplained-pro/sam_cxxinitialize.c +++ b/platform/sam4s-xplained-pro/sam_cxxinitialize.c @@ -60,7 +60,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg # define cxxlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE +# ifdef CONFIG_DEBUG_INFO # define cxxvdbg vdbg # define cxxllvdbg llvdbg # else diff --git a/platform/sam4s-xplained/sam_cxxinitialize.c b/platform/sam4s-xplained/sam_cxxinitialize.c index d36ea0a13..54bcd399b 100644 --- a/platform/sam4s-xplained/sam_cxxinitialize.c +++ b/platform/sam4s-xplained/sam_cxxinitialize.c @@ -60,7 +60,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg # define cxxlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE +# ifdef CONFIG_DEBUG_INFO # define cxxvdbg vdbg # define cxxllvdbg llvdbg # else diff --git a/platform/sama5d2-xult/sam_cxxinitialize.c b/platform/sama5d2-xult/sam_cxxinitialize.c index e0ff5f7fd..213b9eff3 100644 --- a/platform/sama5d2-xult/sam_cxxinitialize.c +++ b/platform/sama5d2-xult/sam_cxxinitialize.c @@ -60,7 +60,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg # define cxxlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE +# ifdef CONFIG_DEBUG_INFO # define cxxvdbg vdbg # define cxxllvdbg llvdbg # else diff --git a/platform/sama5d3-xplained/sam_cxxinitialize.c b/platform/sama5d3-xplained/sam_cxxinitialize.c index 8a74ac79a..1af07a7ba 100644 --- a/platform/sama5d3-xplained/sam_cxxinitialize.c +++ b/platform/sama5d3-xplained/sam_cxxinitialize.c @@ -60,7 +60,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg # define cxxlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE +# ifdef CONFIG_DEBUG_INFO # define cxxvdbg vdbg # define cxxllvdbg llvdbg # else diff --git a/platform/sama5d3x-ek/sam_cxxinitialize.c b/platform/sama5d3x-ek/sam_cxxinitialize.c index 4accbc45f..256690198 100644 --- a/platform/sama5d3x-ek/sam_cxxinitialize.c +++ b/platform/sama5d3x-ek/sam_cxxinitialize.c @@ -60,7 +60,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg # define cxxlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE +# ifdef CONFIG_DEBUG_INFO # define cxxvdbg vdbg # define cxxllvdbg llvdbg # else diff --git a/platform/sama5d4-ek/sam_cxxinitialize.c b/platform/sama5d4-ek/sam_cxxinitialize.c index a9c8cada3..8b492e857 100644 --- a/platform/sama5d4-ek/sam_cxxinitialize.c +++ b/platform/sama5d4-ek/sam_cxxinitialize.c @@ -60,7 +60,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg # define cxxlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE +# ifdef CONFIG_DEBUG_INFO # define cxxvdbg vdbg # define cxxllvdbg llvdbg # else diff --git a/platform/samd20-xplained/sam_cxxinitialize.c b/platform/samd20-xplained/sam_cxxinitialize.c index e17aa64ca..4ed7ce4df 100644 --- a/platform/samd20-xplained/sam_cxxinitialize.c +++ b/platform/samd20-xplained/sam_cxxinitialize.c @@ -60,7 +60,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg # define cxxlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE +# ifdef CONFIG_DEBUG_INFO # define cxxvdbg vdbg # define cxxllvdbg llvdbg # else diff --git a/platform/samd21-xplained/sam_cxxinitialize.c b/platform/samd21-xplained/sam_cxxinitialize.c index bf23cc7f2..3b05662d1 100644 --- a/platform/samd21-xplained/sam_cxxinitialize.c +++ b/platform/samd21-xplained/sam_cxxinitialize.c @@ -60,7 +60,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg # define cxxlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE +# ifdef CONFIG_DEBUG_INFO # define cxxvdbg vdbg # define cxxllvdbg llvdbg # else diff --git a/platform/same70-xplained/sam_cxxinitialize.c b/platform/same70-xplained/sam_cxxinitialize.c index 8d5327cc5..187069e8e 100644 --- a/platform/same70-xplained/sam_cxxinitialize.c +++ b/platform/same70-xplained/sam_cxxinitialize.c @@ -60,7 +60,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg # define cxxlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE +# ifdef CONFIG_DEBUG_INFO # define cxxvdbg vdbg # define cxxllvdbg llvdbg # else diff --git a/platform/saml21-xplained/sam_cxxinitialize.c b/platform/saml21-xplained/sam_cxxinitialize.c index 8ca2bda15..ffbeac444 100644 --- a/platform/saml21-xplained/sam_cxxinitialize.c +++ b/platform/saml21-xplained/sam_cxxinitialize.c @@ -60,7 +60,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg # define cxxlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE +# ifdef CONFIG_DEBUG_INFO # define cxxvdbg vdbg # define cxxllvdbg llvdbg # else diff --git a/platform/samv71-xult/sam_cxxinitialize.c b/platform/samv71-xult/sam_cxxinitialize.c index 51be36144..e9ed9356f 100644 --- a/platform/samv71-xult/sam_cxxinitialize.c +++ b/platform/samv71-xult/sam_cxxinitialize.c @@ -60,7 +60,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg # define cxxlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE +# ifdef CONFIG_DEBUG_INFO # define cxxvdbg vdbg # define cxxllvdbg llvdbg # else diff --git a/platform/shenzhou/stm32_cxxinitialize.c b/platform/shenzhou/stm32_cxxinitialize.c index 197f4065e..70ab6e958 100644 --- a/platform/shenzhou/stm32_cxxinitialize.c +++ b/platform/shenzhou/stm32_cxxinitialize.c @@ -60,7 +60,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg # define cxxlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE +# ifdef CONFIG_DEBUG_INFO # define cxxvdbg vdbg # define cxxllvdbg llvdbg # else diff --git a/platform/spark/stm32_cxxinitialize.c b/platform/spark/stm32_cxxinitialize.c index 30c9969b0..7be868fab 100644 --- a/platform/spark/stm32_cxxinitialize.c +++ b/platform/spark/stm32_cxxinitialize.c @@ -60,7 +60,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg # define cxxlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE +# ifdef CONFIG_DEBUG_INFO # define cxxvdbg vdbg # define cxxllvdbg llvdbg # else diff --git a/platform/stm3220g-eval/stm32_cxxinitialize.c b/platform/stm3220g-eval/stm32_cxxinitialize.c index 3b824d090..3123536d4 100644 --- a/platform/stm3220g-eval/stm32_cxxinitialize.c +++ b/platform/stm3220g-eval/stm32_cxxinitialize.c @@ -60,7 +60,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg # define cxxlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE +# ifdef CONFIG_DEBUG_INFO # define cxxvdbg vdbg # define cxxllvdbg llvdbg # else diff --git a/platform/stm3240g-eval/stm32_cxxinitialize.c b/platform/stm3240g-eval/stm32_cxxinitialize.c index 30ad28c14..c98e897ee 100644 --- a/platform/stm3240g-eval/stm32_cxxinitialize.c +++ b/platform/stm3240g-eval/stm32_cxxinitialize.c @@ -60,7 +60,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg # define cxxlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE +# ifdef CONFIG_DEBUG_INFO # define cxxvdbg vdbg # define cxxllvdbg llvdbg # else diff --git a/platform/stm32f3discovery/stm32_cxxinitialize.c b/platform/stm32f3discovery/stm32_cxxinitialize.c index 4515e2ec5..46720754a 100644 --- a/platform/stm32f3discovery/stm32_cxxinitialize.c +++ b/platform/stm32f3discovery/stm32_cxxinitialize.c @@ -60,7 +60,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg # define cxxlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE +# ifdef CONFIG_DEBUG_INFO # define cxxvdbg vdbg # define cxxllvdbg llvdbg # else diff --git a/platform/stm32f429i-disco/stm32_cxxinitialize.c b/platform/stm32f429i-disco/stm32_cxxinitialize.c index ec4c33556..f5e588073 100644 --- a/platform/stm32f429i-disco/stm32_cxxinitialize.c +++ b/platform/stm32f429i-disco/stm32_cxxinitialize.c @@ -60,7 +60,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg # define cxxlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE +# ifdef CONFIG_DEBUG_INFO # define cxxvdbg vdbg # define cxxllvdbg llvdbg # else diff --git a/platform/stm32f4discovery/stm32_cxxinitialize.c b/platform/stm32f4discovery/stm32_cxxinitialize.c index 7922a8142..b22e6abca 100644 --- a/platform/stm32f4discovery/stm32_cxxinitialize.c +++ b/platform/stm32f4discovery/stm32_cxxinitialize.c @@ -60,7 +60,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg # define cxxlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE +# ifdef CONFIG_DEBUG_INFO # define cxxvdbg vdbg # define cxxllvdbg llvdbg # else diff --git a/platform/stm32f746g-disco/stm32_cxxinitialize.c b/platform/stm32f746g-disco/stm32_cxxinitialize.c index cb98ffc9b..ab5a51014 100644 --- a/platform/stm32f746g-disco/stm32_cxxinitialize.c +++ b/platform/stm32f746g-disco/stm32_cxxinitialize.c @@ -60,7 +60,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg # define cxxlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE +# ifdef CONFIG_DEBUG_INFO # define cxxvdbg vdbg # define cxxllvdbg llvdbg # else diff --git a/platform/stm32l476vg-disco/stm32_cxxinitialize.c b/platform/stm32l476vg-disco/stm32_cxxinitialize.c index ba024de68..0a59c0967 100644 --- a/platform/stm32l476vg-disco/stm32_cxxinitialize.c +++ b/platform/stm32l476vg-disco/stm32_cxxinitialize.c @@ -60,7 +60,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg # define cxxlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE +# ifdef CONFIG_DEBUG_INFO # define cxxvdbg vdbg # define cxxllvdbg llvdbg # else diff --git a/platform/stm32ldiscovery/stm32_cxxinitialize.c b/platform/stm32ldiscovery/stm32_cxxinitialize.c index 95aca1c52..a0b644e09 100644 --- a/platform/stm32ldiscovery/stm32_cxxinitialize.c +++ b/platform/stm32ldiscovery/stm32_cxxinitialize.c @@ -60,7 +60,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg # define cxxlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE +# ifdef CONFIG_DEBUG_INFO # define cxxvdbg vdbg # define cxxllvdbg llvdbg # else diff --git a/platform/teensy-lc/kl_cxxinitialize.c b/platform/teensy-lc/kl_cxxinitialize.c index 36c3e6d3a..ac914ddbd 100644 --- a/platform/teensy-lc/kl_cxxinitialize.c +++ b/platform/teensy-lc/kl_cxxinitialize.c @@ -60,7 +60,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg # define cxxlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE +# ifdef CONFIG_DEBUG_INFO # define cxxvdbg vdbg # define cxxllvdbg llvdbg # else diff --git a/platform/viewtool-stm32f107/stm32_cxxinitialize.c b/platform/viewtool-stm32f107/stm32_cxxinitialize.c index 90e4af84a..cc619ddfe 100644 --- a/platform/viewtool-stm32f107/stm32_cxxinitialize.c +++ b/platform/viewtool-stm32f107/stm32_cxxinitialize.c @@ -60,7 +60,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg # define cxxlldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE +# ifdef CONFIG_DEBUG_INFO # define cxxvdbg vdbg # define cxxllvdbg llvdbg # else From 344c92e2a419e96d55accc3eaea756837ba37de4 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 11 Jun 2016 11:55:38 -0600 Subject: [PATCH 44/74] Replace all occurrences of vdbg with vinfo --- examples/cc3000/telnetd_daemon.c | 8 +- examples/cc3000/telnetd_driver.c | 14 +-- examples/chat/chat_main.c | 16 +-- examples/helloxx/helloxx_main.cxx | 12 +-- examples/nxhello/nxhello_bkgd.c | 8 +- examples/nximage/nximage_bkgd.c | 8 +- examples/nxlines/nxlines_bkgd.c | 8 +- examples/nxterm/nxterm_server.c | 2 +- examples/nxterm/nxterm_toolbar.c | 8 +- examples/nxterm/nxterm_wndo.c | 10 +- examples/nxtext/nxtext_bkgd.c | 8 +- examples/nxtext/nxtext_popup.c | 10 +- examples/nxtext/nxtext_putc.c | 2 +- examples/nxtext/nxtext_server.c | 2 +- examples/touchscreen/tc_main.c | 8 +- fsutils/inifile/inifile.c | 30 +++--- netutils/chat/chat.c | 34 +++--- netutils/dhcpc/dhcpc.c | 6 +- netutils/dhcpd/dhcpd.c | 40 +++---- netutils/discover/discover.c | 4 +- netutils/esp8266/esp8266.c | 52 ++++----- netutils/ftpc/ftpc_config.h | 2 +- netutils/ftpc/ftpc_getreply.c | 8 +- netutils/ftpc/ftpc_listdir.c | 4 +- netutils/ftpc/ftpc_login.c | 2 +- netutils/ftpc/ftpc_putfile.c | 2 +- netutils/ftpc/ftpc_transfer.c | 12 +-- netutils/ftpd/ftpd.c | 14 +-- netutils/netlib/netlib_ipmsfilter.c | 2 +- netutils/netlib/netlib_listenon.c | 2 +- netutils/netlib/netlib_server.c | 2 +- netutils/ntpclient/ntpclient.c | 8 +- netutils/ping/icmpv6_ping.c | 2 +- netutils/telnetd/telnetd_daemon.c | 8 +- netutils/tftpc/tftpc_get.c | 14 +-- netutils/tftpc/tftpc_internal.h | 2 +- netutils/tftpc/tftpc_put.c | 8 +- netutils/thttpd/fdwatch.c | 48 ++++----- netutils/thttpd/libhttpd.c | 28 ++--- netutils/thttpd/libhttpd.h | 6 +- netutils/thttpd/tdate_parse.c | 2 +- netutils/thttpd/thttpd.c | 22 ++-- netutils/thttpd/thttpd_alloc.c | 8 +- netutils/thttpd/thttpd_cgi.c | 44 ++++---- netutils/webclient/webclient.c | 6 +- netutils/webserver/httpd.c | 30 +++--- nshlib/nsh_netinit.c | 20 ++-- nshlib/nsh_romfsetc.c | 2 +- nshlib/nsh_telnetd.c | 2 +- platform/arduino-due/sam_cxxinitialize.c | 12 +-- platform/cloudctrl/stm32_cxxinitialize.c | 12 +-- platform/fire-stm32v2/stm32_cxxinitialize.c | 12 +-- platform/mikroe-stm32f4/stm32_cxxinitialize.c | 12 +-- platform/nucleo-144/stm32_cxxinitialize.c | 12 +-- platform/nucleo-f303re/stm32_cxxinitialize.c | 12 +-- platform/nucleo-f4x1re/stm32_cxxinitialize.c | 12 +-- platform/nucleo-l476rg/stm32_cxxinitialize.c | 12 +-- .../olimex-stm32-h405/stm32_cxxinitialize.c | 12 +-- .../olimex-stm32-h407/stm32_cxxinitialize.c | 12 +-- .../olimex-stm32-p207/stm32_cxxinitialize.c | 12 +-- .../olimexino-stm32/stm32_cxxinitialize.c | 12 +-- platform/pcduino-a10/a1x_cxxinitialize.c | 12 +-- platform/sabre-6quad/imx_cxxinitialize.c | 12 +-- platform/sam3u-ek/sam_cxxinitialized.c | 12 +-- platform/sam4e-ek/sam_cxxinitialize.c | 12 +-- platform/sam4l-xplained/sam_cxxinitialize.c | 12 +-- .../sam4s-xplained-pro/sam_cxxinitialize.c | 12 +-- platform/sam4s-xplained/sam_cxxinitialize.c | 12 +-- platform/sama5d2-xult/sam_cxxinitialize.c | 12 +-- platform/sama5d3-xplained/sam_cxxinitialize.c | 12 +-- platform/sama5d3x-ek/sam_cxxinitialize.c | 12 +-- platform/sama5d4-ek/sam_cxxinitialize.c | 12 +-- platform/samd20-xplained/sam_cxxinitialize.c | 12 +-- platform/samd21-xplained/sam_cxxinitialize.c | 12 +-- platform/same70-xplained/sam_cxxinitialize.c | 12 +-- platform/saml21-xplained/sam_cxxinitialize.c | 12 +-- platform/samv71-xult/sam_cxxinitialize.c | 12 +-- platform/shenzhou/stm32_cxxinitialize.c | 12 +-- platform/spark/stm32_cxxinitialize.c | 12 +-- platform/stm3220g-eval/stm32_cxxinitialize.c | 12 +-- platform/stm3240g-eval/stm32_cxxinitialize.c | 12 +-- .../stm32f3discovery/stm32_cxxinitialize.c | 12 +-- .../stm32f429i-disco/stm32_cxxinitialize.c | 12 +-- .../stm32f4discovery/stm32_cxxinitialize.c | 12 +-- .../stm32f746g-disco/stm32_cxxinitialize.c | 12 +-- .../stm32l476vg-disco/stm32_cxxinitialize.c | 12 +-- .../stm32ldiscovery/stm32_cxxinitialize.c | 12 +-- platform/teensy-lc/kl_cxxinitialize.c | 12 +-- .../viewtool-stm32f107/stm32_cxxinitialize.c | 12 +-- system/cle/cle.c | 24 ++--- system/nxplayer/nxplayer.c | 26 ++--- system/prun/prun.c | 4 +- system/ubloxmodem/ubloxmodem_main.c | 20 ++-- system/vi/vi.c | 100 +++++++++--------- 94 files changed, 627 insertions(+), 627 deletions(-) diff --git a/examples/cc3000/telnetd_daemon.c b/examples/cc3000/telnetd_daemon.c index 4045bb38c..5b9ed2ab9 100644 --- a/examples/cc3000/telnetd_daemon.c +++ b/examples/cc3000/telnetd_daemon.c @@ -175,7 +175,7 @@ static int telnetd_daemon(int argc, char *argv[]) for (;;) { - nllvdbg("Accepting connections on port %d\n", ntohs(daemon->port)); + nllinfo("Accepting connections on port %d\n", ntohs(daemon->port)); addrlen = sizeof(struct sockaddr_in); acceptsd = accept(listensd, (struct sockaddr*)&myaddr, &addrlen); @@ -199,7 +199,7 @@ static int telnetd_daemon(int argc, char *argv[]) /* Create a character device to "wrap" the accepted socket descriptor */ - nllvdbg("Creating the telnet driver\n"); + nllinfo("Creating the telnet driver\n"); devpath = telnetd_driver(acceptsd, daemon); if (devpath == NULL) { @@ -209,7 +209,7 @@ static int telnetd_daemon(int argc, char *argv[]) /* Open the driver */ - nllvdbg("Opening the telnet driver\n"); + nllinfo("Opening the telnet driver\n"); drvrfd = open(devpath, O_RDWR); if (drvrfd < 0) { @@ -238,7 +238,7 @@ static int telnetd_daemon(int argc, char *argv[]) * will inherit the new stdin, stdout, and stderr. */ - nllvdbg("Starting the telnet session\n"); + nllinfo("Starting the telnet session\n"); pid = task_create("Telnet session", daemon->priority, daemon->stacksize, daemon->entry, NULL); if (pid < 0) diff --git a/examples/cc3000/telnetd_driver.c b/examples/cc3000/telnetd_driver.c index 863270983..c890ae418 100644 --- a/examples/cc3000/telnetd_driver.c +++ b/examples/cc3000/telnetd_driver.c @@ -184,7 +184,7 @@ static inline void telnetd_dumpbuffer(FAR const char *msg, * defined or the following does nothing. */ - nvdbgdumpbuffer(msg, (FAR const uint8_t*)buffer, nbytes); + ninfodumpbuffer(msg, (FAR const uint8_t*)buffer, nbytes); } #endif @@ -227,12 +227,12 @@ static ssize_t telnetd_receive(FAR struct telnetd_dev_s *priv, FAR const char *s int nread; uint8_t ch; - nllvdbg("srclen: %d destlen: %d\n", srclen, destlen); + nllinfo("srclen: %d destlen: %d\n", srclen, destlen); for (nread = 0; srclen > 0 && nread < destlen; srclen--) { ch = *src++; - nllvdbg("ch=%02x state=%d\n", ch, priv->td_state); + nllinfo("ch=%02x state=%d\n", ch, priv->td_state); switch (priv->td_state) { @@ -412,7 +412,7 @@ static int telnetd_open(FAR struct file *filep) int tmp; int ret; - nllvdbg("td_crefs: %d\n", priv->td_crefs); + nllinfo("td_crefs: %d\n", priv->td_crefs); /* O_NONBLOCK is not supported */ @@ -468,7 +468,7 @@ static int telnetd_close(FAR struct file *filep) FAR char *devpath; int ret; - nllvdbg("td_crefs: %d\n", priv->td_crefs); + nllinfo("td_crefs: %d\n", priv->td_crefs); /* Get exclusive access to the device structures */ @@ -547,7 +547,7 @@ static ssize_t telnetd_read(FAR struct file *filep, FAR char *buffer, size_t len FAR struct telnetd_dev_s *priv = inode->i_private; ssize_t ret; - nllvdbg("len: %d\n", len); + nllinfo("len: %d\n", len); /* First, handle the case where there are still valid bytes left in the * I/O buffer from the last time that read was called. NOTE: Much of @@ -620,7 +620,7 @@ static ssize_t telnetd_write(FAR struct file *filep, FAR const char *buffer, siz char ch; bool eol; - nllvdbg("len: %d\n", len); + nllinfo("len: %d\n", len); /* Process each character from the user buffer */ diff --git a/examples/chat/chat_main.c b/examples/chat/chat_main.c index 4293dc555..a6799db73 100644 --- a/examples/chat/chat_main.c +++ b/examples/chat/chat_main.c @@ -128,7 +128,7 @@ static int chat_script_preset(FAR struct chat_app* priv, int script_number) { int ret = 0; - vdbg("preset script %d\n", script_number); + info("preset script %d\n", script_number); switch (script_number) { @@ -340,11 +340,11 @@ int chat_main(int argc, FAR char** argv) priv.script_dynalloc = false; strncpy(priv.tty, CONFIG_EXAMPLES_CHAT_TTY_DEVNODE, CHAT_TTYNAME_SIZE-1); - vdbg("parsing the arguments\n"); + info("parsing the arguments\n"); ret = chat_parse_args((FAR struct chat_app*) &priv); if (ret < 0) { - vdbg("Command line parsing failed: code %d, errno %d\n", ret, errno); + info("Command line parsing failed: code %d, errno %d\n", ret, errno); chat_show_usage(); exit_code = EXIT_FAILURE; goto with_script; @@ -357,20 +357,20 @@ int chat_main(int argc, FAR char** argv) goto no_script; } - vdbg("opening %s\n", priv.tty); + info("opening %s\n", priv.tty); priv.ctl.fd = open(priv.tty, O_RDWR); if (priv.ctl.fd < 0) { - vdbg("Failed to open %s: %d\n", priv.tty, errno); + info("Failed to open %s: %d\n", priv.tty, errno); exit_code = EXIT_FAILURE; goto with_script; } - vdbg("setting up character device\n"); + info("setting up character device\n"); ret = chat_chardev(&priv); if (ret < 0) { - vdbg("Failed to open %s: %d\n", priv.tty, errno); + info("Failed to open %s: %d\n", priv.tty, errno); exit_code = EXIT_FAILURE; goto with_tty_dev; } @@ -390,6 +390,6 @@ no_script: fflush(stderr); fflush(stdout); - vdbg("Exit code %d\n", exit_code); + info("Exit code %d\n", exit_code); return exit_code; } diff --git a/examples/helloxx/helloxx_main.cxx b/examples/helloxx/helloxx_main.cxx index 9e0da72fd..909e8b31d 100644 --- a/examples/helloxx/helloxx_main.cxx +++ b/examples/helloxx/helloxx_main.cxx @@ -66,17 +66,17 @@ # define cxxdbg dbg # define cxxlldbg lldbg # ifdef CONFIG_DEBUG_INFO -# define cxxvdbg vdbg -# define cxxllvdbg llvdbg +# define cxxinfo info +# define cxxllinfo llinfo # else -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) # endif #else # define cxxdbg(x...) # define cxxlldbg(x...) -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) #endif //*************************************************************************** diff --git a/examples/nxhello/nxhello_bkgd.c b/examples/nxhello/nxhello_bkgd.c index 4be77d61b..a4bff513a 100644 --- a/examples/nxhello/nxhello_bkgd.c +++ b/examples/nxhello/nxhello_bkgd.c @@ -139,7 +139,7 @@ const struct nx_callback_s g_nxhellocb = static void nxhello_redraw(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect, bool more, FAR void *arg) { - gvdbg("hwnd=%p rect={(%d,%d),(%d,%d)} more=%s\n", + ginfo("hwnd=%p rect={(%d,%d),(%d,%d)} more=%s\n", hwnd, rect->pt1.x, rect->pt1.y, rect->pt2.x, rect->pt2.y, more ? "true" : "false"); } @@ -155,7 +155,7 @@ static void nxhello_position(NXWINDOW hwnd, FAR const struct nxgl_size_s *size, { /* Report the position */ - gvdbg("hwnd=%p size=(%d,%d) pos=(%d,%d) bounds={(%d,%d),(%d,%d)}\n", + ginfo("hwnd=%p size=(%d,%d) pos=(%d,%d) bounds={(%d,%d),(%d,%d)}\n", hwnd, size->w, size->h, pos->x, pos->y, bounds->pt1.x, bounds->pt1.y, bounds->pt2.x, bounds->pt2.y); @@ -174,7 +174,7 @@ static void nxhello_position(NXWINDOW hwnd, FAR const struct nxgl_size_s *size, g_nxhello.havepos = true; sem_post(&g_nxhello.sem); - gvdbg("Have xres=%d yres=%d\n", g_nxhello.xres, g_nxhello.yres); + ginfo("Have xres=%d yres=%d\n", g_nxhello.xres, g_nxhello.yres); } } @@ -199,7 +199,7 @@ static void nxhello_mousein(NXWINDOW hwnd, FAR const struct nxgl_point_s *pos, static void nxhello_kbdin(NXWINDOW hwnd, uint8_t nch, FAR const uint8_t *ch, FAR void *arg) { - gvdbg("hwnd=%p nch=%d\n", hwnd, nch); + ginfo("hwnd=%p nch=%d\n", hwnd, nch); /* In this example, there is no keyboard so a keyboard event is not * expected. diff --git a/examples/nximage/nximage_bkgd.c b/examples/nximage/nximage_bkgd.c index 9ea5e3ace..f54e55e5e 100644 --- a/examples/nximage/nximage_bkgd.c +++ b/examples/nximage/nximage_bkgd.c @@ -180,7 +180,7 @@ const struct nx_callback_s g_nximagecb = static void nximage_redraw(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect, bool more, FAR void *arg) { - gvdbg("hwnd=%p rect={(%d,%d),(%d,%d)} more=%s\n", + ginfo("hwnd=%p rect={(%d,%d),(%d,%d)} more=%s\n", hwnd, rect->pt1.x, rect->pt1.y, rect->pt2.x, rect->pt2.y, more ? "true" : "false"); } @@ -200,7 +200,7 @@ static void nximage_position(NXWINDOW hwnd, FAR const struct nxgl_size_s *size, { /* Report the position */ - gvdbg("hwnd=%p size=(%d,%d) pos=(%d,%d) bounds={(%d,%d),(%d,%d)}\n", + ginfo("hwnd=%p size=(%d,%d) pos=(%d,%d) bounds={(%d,%d),(%d,%d)}\n", hwnd, size->w, size->h, pos->x, pos->y, bounds->pt1.x, bounds->pt1.y, bounds->pt2.x, bounds->pt2.y); @@ -219,7 +219,7 @@ static void nximage_position(NXWINDOW hwnd, FAR const struct nxgl_size_s *size, g_nximage.havepos = true; sem_post(&g_nximage.sem); - gvdbg("Have xres=%d yres=%d\n", g_nximage.xres, g_nximage.yres); + ginfo("Have xres=%d yres=%d\n", g_nximage.xres, g_nximage.yres); } } @@ -252,7 +252,7 @@ static void nximage_mousein(NXWINDOW hwnd, FAR const struct nxgl_point_s *pos, static void nximage_kbdin(NXWINDOW hwnd, uint8_t nch, FAR const uint8_t *ch, FAR void *arg) { - gvdbg("hwnd=%p nch=%d\n", hwnd, nch); + ginfo("hwnd=%p nch=%d\n", hwnd, nch); /* In this example, there is no keyboard so a keyboard event is not * expected. diff --git a/examples/nxlines/nxlines_bkgd.c b/examples/nxlines/nxlines_bkgd.c index 4cfe94b1a..fdd1f4fcb 100644 --- a/examples/nxlines/nxlines_bkgd.c +++ b/examples/nxlines/nxlines_bkgd.c @@ -127,7 +127,7 @@ const struct nx_callback_s g_nxlinescb = static void nxlines_redraw(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect, bool more, FAR void *arg) { - gvdbg("hwnd=%p rect={(%d,%d),(%d,%d)} more=%s\n", + ginfo("hwnd=%p rect={(%d,%d),(%d,%d)} more=%s\n", hwnd, rect->pt1.x, rect->pt1.y, rect->pt2.x, rect->pt2.y, more ? "true" : "false"); } @@ -143,7 +143,7 @@ static void nxlines_position(NXWINDOW hwnd, FAR const struct nxgl_size_s *size, { /* Report the position */ - gvdbg("hwnd=%p size=(%d,%d) pos=(%d,%d) bounds={(%d,%d),(%d,%d)}\n", + ginfo("hwnd=%p size=(%d,%d) pos=(%d,%d) bounds={(%d,%d),(%d,%d)}\n", hwnd, size->w, size->h, pos->x, pos->y, bounds->pt1.x, bounds->pt1.y, bounds->pt2.x, bounds->pt2.y); @@ -162,7 +162,7 @@ static void nxlines_position(NXWINDOW hwnd, FAR const struct nxgl_size_s *size, g_nxlines.havepos = true; sem_post(&g_nxlines.sem); - gvdbg("Have xres=%d yres=%d\n", g_nxlines.xres, g_nxlines.yres); + ginfo("Have xres=%d yres=%d\n", g_nxlines.xres, g_nxlines.yres); } } @@ -187,7 +187,7 @@ static void nxlines_mousein(NXWINDOW hwnd, FAR const struct nxgl_point_s *pos, static void nxlines_kbdin(NXWINDOW hwnd, uint8_t nch, FAR const uint8_t *ch, FAR void *arg) { - gvdbg("hwnd=%p nch=%d\n", hwnd, nch); + ginfo("hwnd=%p nch=%d\n", hwnd, nch); /* In this example, there is no keyboard so a keyboard event is not * expected. diff --git a/examples/nxterm/nxterm_server.c b/examples/nxterm/nxterm_server.c index fdb93a4b5..a3108ed65 100644 --- a/examples/nxterm/nxterm_server.c +++ b/examples/nxterm/nxterm_server.c @@ -157,7 +157,7 @@ int nxterm_server(int argc, char *argv[]) /* Then start the server */ ret = nx_run(dev); - gvdbg("nx_run returned: %d\n", errno); + ginfo("nx_run returned: %d\n", errno); return 3; } diff --git a/examples/nxterm/nxterm_toolbar.c b/examples/nxterm/nxterm_toolbar.c index 2182fa98c..cfa9a6706 100644 --- a/examples/nxterm/nxterm_toolbar.c +++ b/examples/nxterm/nxterm_toolbar.c @@ -117,7 +117,7 @@ static void nxtool_redraw(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect, nxgl_mxpixel_t color[CONFIG_NX_NPLANES]; int ret; - gvdbg("hwnd=%p rect={(%d,%d),(%d,%d)} more=%s\n", + ginfo("hwnd=%p rect={(%d,%d),(%d,%d)} more=%s\n", hwnd, rect->pt1.x, rect->pt1.y, rect->pt2.x, rect->pt2.y, more ? "true" : "false"); @@ -138,7 +138,7 @@ static void nxtool_position(NXWINDOW hwnd, FAR const struct nxgl_size_s *size, FAR const struct nxgl_rect_s *bounds, FAR void *arg) { - gvdbg("hwnd=%p size=(%d,%d) pos=(%d,%d) bounds={(%d,%d),(%d,%d)}\n", + ginfo("hwnd=%p size=(%d,%d) pos=(%d,%d) bounds={(%d,%d),(%d,%d)}\n", hwnd, size->w, size->h, pos->x, pos->y, bounds->pt1.x, bounds->pt1.y, bounds->pt2.x, bounds->pt2.y); } @@ -151,7 +151,7 @@ static void nxtool_position(NXWINDOW hwnd, FAR const struct nxgl_size_s *size, static void nxtool_mousein(NXWINDOW hwnd, FAR const struct nxgl_point_s *pos, uint8_t buttons, FAR void *arg) { - gvdbg("hwnd=%p pos=(%d,%d) button=%02x\n", hwnd, pos->x, pos->y, buttons); + ginfo("hwnd=%p pos=(%d,%d) button=%02x\n", hwnd, pos->x, pos->y, buttons); } #endif @@ -163,7 +163,7 @@ static void nxtool_mousein(NXWINDOW hwnd, FAR const struct nxgl_point_s *pos, static void nxtool_kbdin(NXWINDOW hwnd, uint8_t nch, FAR const uint8_t *ch, FAR void *arg) { - gvdbg("hwnd=%p nch=%d\n", hwnd, nch); + ginfo("hwnd=%p nch=%d\n", hwnd, nch); } #endif diff --git a/examples/nxterm/nxterm_wndo.c b/examples/nxterm/nxterm_wndo.c index 8f5b09cf7..4f5c7513a 100644 --- a/examples/nxterm/nxterm_wndo.c +++ b/examples/nxterm/nxterm_wndo.c @@ -117,7 +117,7 @@ static void nxwndo_redraw(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect, { nxgl_mxpixel_t wcolor[CONFIG_NX_NPLANES]; - gvdbg("hwnd=%p rect={(%d,%d),(%d,%d)} more=%s\n", + ginfo("hwnd=%p rect={(%d,%d),(%d,%d)} more=%s\n", hwnd, rect->pt1.x, rect->pt1.y, rect->pt2.x, rect->pt2.y, more ? "true" : "false"); @@ -149,7 +149,7 @@ static void nxwndo_position(NXWINDOW hwnd, FAR const struct nxgl_size_s *size, { /* Report the position */ - gvdbg("hwnd=%p size=(%d,%d) pos=(%d,%d) bounds={(%d,%d),(%d,%d)}\n", + ginfo("hwnd=%p size=(%d,%d) pos=(%d,%d) bounds={(%d,%d),(%d,%d)}\n", hwnd, size->w, size->h, pos->x, pos->y, bounds->pt1.x, bounds->pt1.y, bounds->pt2.x, bounds->pt2.y); @@ -173,7 +173,7 @@ static void nxwndo_position(NXWINDOW hwnd, FAR const struct nxgl_size_s *size, g_nxterm_vars.haveres = true; sem_post(&g_nxterm_vars.eventsem); - gvdbg("Have xres=%d yres=%d\n", g_nxterm_vars.xres, g_nxterm_vars.yres); + ginfo("Have xres=%d yres=%d\n", g_nxterm_vars.xres, g_nxterm_vars.yres); } } @@ -185,7 +185,7 @@ static void nxwndo_position(NXWINDOW hwnd, FAR const struct nxgl_size_s *size, static void nxwndo_mousein(NXWINDOW hwnd, FAR const struct nxgl_point_s *pos, uint8_t buttons, FAR void *arg) { - gvdbg("hwnd=%p pos=(%d,%d) button=%02x\n", + ginfo("hwnd=%p pos=(%d,%d) button=%02x\n", hwnd, pos->x, pos->y, buttons); } #endif @@ -198,7 +198,7 @@ static void nxwndo_mousein(NXWINDOW hwnd, FAR const struct nxgl_point_s *pos, static void nxwndo_kbdin(NXWINDOW hwnd, uint8_t nch, FAR const uint8_t *ch, FAR void *arg) { - gvdbg("hwnd=%p nch=%d\n", hwnd, nch); + ginfo("hwnd=%p nch=%d\n", hwnd, nch); (void)write(1, ch, nch); } #endif diff --git a/examples/nxtext/nxtext_bkgd.c b/examples/nxtext/nxtext_bkgd.c index df0f70d6e..78baded2f 100644 --- a/examples/nxtext/nxtext_bkgd.c +++ b/examples/nxtext/nxtext_bkgd.c @@ -147,7 +147,7 @@ static void nxbg_redrawrect(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect) static void nxbg_redraw(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect, bool more, FAR void *arg) { - gvdbg("hwnd=%p rect={(%d,%d),(%d,%d)} more=%s\n", + ginfo("hwnd=%p rect={(%d,%d),(%d,%d)} more=%s\n", hwnd, rect->pt1.x, rect->pt1.y, rect->pt2.x, rect->pt2.y, more ? "true" : "false"); @@ -167,7 +167,7 @@ static void nxbg_position(NXWINDOW hwnd, FAR const struct nxgl_size_s *size, /* Report the position */ - gvdbg("hwnd=%p size=(%d,%d) pos=(%d,%d) bounds={(%d,%d),(%d,%d)}\n", + ginfo("hwnd=%p size=(%d,%d) pos=(%d,%d) bounds={(%d,%d),(%d,%d)}\n", hwnd, size->w, size->h, pos->x, pos->y, bounds->pt1.x, bounds->pt1.y, bounds->pt2.x, bounds->pt2.y); @@ -191,7 +191,7 @@ static void nxbg_position(NXWINDOW hwnd, FAR const struct nxgl_size_s *size, b_haveresolution = true; sem_post(&g_semevent); - gvdbg("Have xres=%d yres=%d\n", g_xres, g_yres); + ginfo("Have xres=%d yres=%d\n", g_xres, g_yres); } } @@ -216,7 +216,7 @@ static void nxbg_mousein(NXWINDOW hwnd, FAR const struct nxgl_point_s *pos, static void nxbg_kbdin(NXWINDOW hwnd, uint8_t nch, FAR const uint8_t *ch, FAR void *arg) { - gvdbg("hwnd=%p nch=%d\n", hwnd, nch); + ginfo("hwnd=%p nch=%d\n", hwnd, nch); nxbg_write(hwnd, ch, nch); } #endif diff --git a/examples/nxtext/nxtext_popup.c b/examples/nxtext/nxtext_popup.c index 78e331089..3f2d85ef4 100644 --- a/examples/nxtext/nxtext_popup.c +++ b/examples/nxtext/nxtext_popup.c @@ -211,7 +211,7 @@ static void nxpu_redraw(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect, bool more, FAR void *arg) { FAR struct nxtext_state_s *st = (FAR struct nxtext_state_s *)arg; - gvdbg("hwnd=%p rect={(%d,%d),(%d,%d)} more=%s\n", + ginfo("hwnd=%p rect={(%d,%d),(%d,%d)} more=%s\n", hwnd, rect->pt1.x, rect->pt1.y, rect->pt2.x, rect->pt2.y, more ? "true" : "false"); @@ -231,7 +231,7 @@ static void nxpu_position(NXWINDOW hwnd, FAR const struct nxgl_size_s *size, /* Report the position */ - gvdbg("hwnd=%p size=(%d,%d) pos=(%d,%d) bounds={(%d,%d),(%d,%d)}\n", + ginfo("hwnd=%p size=(%d,%d) pos=(%d,%d) bounds={(%d,%d),(%d,%d)}\n", hwnd, size->w, size->h, pos->x, pos->y, bounds->pt1.x, bounds->pt1.y, bounds->pt2.x, bounds->pt2.y); @@ -280,7 +280,7 @@ static void nxpu_kbdin(NXWINDOW hwnd, uint8_t nch, FAR const uint8_t *ch, FAR void *arg) { FAR struct nxtext_state_s *st = (FAR struct nxtext_state_s *)arg; - gvdbg("hwnd=%p nch=%d\n", hwnd, nch); + ginfo("hwnd=%p nch=%d\n", hwnd, nch); nxpu_puts(hwnd, st, nch, ch); } #endif @@ -345,7 +345,7 @@ NXWINDOW nxpu_open(void) nxpu_initstate(); hwnd = nx_openwindow(g_hnx, &g_pucb, (FAR void *)&g_pustate); - gvdbg("hwnd=%p\n", hwnd); + ginfo("hwnd=%p\n", hwnd); if (!hwnd) { @@ -375,7 +375,7 @@ NXWINDOW nxpu_open(void) /* Set the size of the pop-up window */ - gvdbg("Set pop-up size to (%d,%d)\n", size.w, size.h); + ginfo("Set pop-up size to (%d,%d)\n", size.w, size.h); ret = nxpu_setsize(hwnd, &size); if (ret < 0) { diff --git a/examples/nxtext/nxtext_putc.c b/examples/nxtext/nxtext_putc.c index 80a8fcc18..26f7e9cdc 100644 --- a/examples/nxtext/nxtext_putc.c +++ b/examples/nxtext/nxtext_putc.c @@ -233,7 +233,7 @@ nxtext_renderglyph(FAR struct nxtext_state_s *st, /* Make sure that there is room for another glyph */ - gvdbg("ch=%c [%02x]\n", isprint(ch) ? ch : '.', ch); + ginfo("ch=%c [%02x]\n", isprint(ch) ? ch : '.', ch); /* Allocate the glyph (always succeeds) */ diff --git a/examples/nxtext/nxtext_server.c b/examples/nxtext/nxtext_server.c index 0514b61b5..042abd6f0 100644 --- a/examples/nxtext/nxtext_server.c +++ b/examples/nxtext/nxtext_server.c @@ -160,7 +160,7 @@ int nxtext_server(int argc, char *argv[]) /* Then start the server */ ret = nx_run(dev); - gvdbg("nx_run returned: %d\n", errno); + ginfo("nx_run returned: %d\n", errno); return 3; } diff --git a/examples/touchscreen/tc_main.c b/examples/touchscreen/tc_main.c index 74d08e790..fa0713c1a 100644 --- a/examples/touchscreen/tc_main.c +++ b/examples/touchscreen/tc_main.c @@ -173,9 +173,9 @@ int tc_main(int argc, char *argv[]) #ifdef CONFIG_EXAMPLES_TOUCHSCREEN_MOUSE /* Read one sample */ - ivdbg("Reading...\n"); + iinfo("Reading...\n"); nbytes = read(fd, &sample, sizeof(struct mouse_report_s)); - ivdbg("Bytes read: %d\n", nbytes); + iinfo("Bytes read: %d\n", nbytes); /* Handle unexpected return values */ @@ -213,9 +213,9 @@ int tc_main(int argc, char *argv[]) #else /* Read one sample */ - ivdbg("Reading...\n"); + iinfo("Reading...\n"); nbytes = read(fd, &sample, sizeof(struct touch_sample_s)); - ivdbg("Bytes read: %d\n", nbytes); + iinfo("Bytes read: %d\n", nbytes); /* Handle unexpected return values */ diff --git a/fsutils/inifile/inifile.c b/fsutils/inifile/inifile.c index d62eee9db..1dce982ff 100644 --- a/fsutils/inifile/inifile.c +++ b/fsutils/inifile/inifile.c @@ -69,10 +69,10 @@ # endif # if CONFIG_FSUTILS_INIFILE_DEBUGLEVEL > 1 -# define inivdbg(format, ...) \ +# define iniinfo(format, ...) \ printf(EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__) # else -# define inivdbg(x...) +# define iniinfo(x...) # endif #else # if CONFIG_FSUTILS_INIFILE_DEBUGLEVEL > 0 @@ -82,9 +82,9 @@ # endif # if CONFIG_FSUTILS_INIFILE_DEBUGLEVEL > 1 -# define inivdbg printf +# define iniinfo printf # else -# define inivdbg (void) +# define iniinfo (void) # endif #endif @@ -416,7 +416,7 @@ static FAR char * * for/ */ - inivdbg("variable=\"%s\"\n", variable); + iniinfo("variable=\"%s\"\n", variable); for (;;) { @@ -429,11 +429,11 @@ static FAR char * if (!found) { - inivdbg("Returning NULL\n"); + iniinfo("Returning NULL\n"); return NULL; } - inivdbg("varinfo.variable=\"%s\"\n", varinfo.variable); + iniinfo("varinfo.variable=\"%s\"\n", varinfo.variable); /* Does the the variable name match the one we are looking for? */ @@ -441,7 +441,7 @@ static FAR char * { /* Yes... then we have it! */ - inivdbg("Returning \"%s\"\n", varinfo.value); + iniinfo("Returning \"%s\"\n", varinfo.value); return varinfo.value; } } @@ -462,7 +462,7 @@ static FAR char *inifile_find_variable(FAR struct inifile_state_s *priv, { FAR char *ret = NULL; - inivdbg("section=\"%s\" variable=\"%s\"\n", section, variable); + iniinfo("section=\"%s\" variable=\"%s\"\n", section, variable); /* Seek to the first variable in the specified section of the INI file */ @@ -473,18 +473,18 @@ static FAR char *inifile_find_variable(FAR struct inifile_state_s *priv, */ FAR char *value = inifile_find_section_variable(priv, variable); - inivdbg("variable_value=0x%p\n", value); + iniinfo("variable_value=0x%p\n", value); if (value && *value) { - inivdbg("variable_value=\"%s\"\n", value); + iniinfo("variable_value=\"%s\"\n", value); ret = value; } } /* Return the string that we found. */ - inivdbg("Returning 0x%p\n", ret); + iniinfo("Returning 0x%p\n", ret); return ret; } @@ -626,7 +626,7 @@ long inifile_read_integer(INIHANDLE handle, /* Assume failure to find the requested value */ - inivdbg("section=\"%s\" variable=\"%s\" defvalue=%d\n", + iniinfo("section=\"%s\" variable=\"%s\" defvalue=%d\n", section, variable, defvalue); /* Get the value as a string first */ @@ -641,13 +641,13 @@ long inifile_read_integer(INIHANDLE handle, * ignore all conversion errors. */ - inivdbg("%s=\"%s\"\n", variable, value); + iniinfo("%s=\"%s\"\n", variable, value); ret = strtol(value, NULL, 0); } /* Return the value that we found. */ - inivdbg("Returning %d\n", ret); + iniinfo("Returning %d\n", ret); return ret; } diff --git a/netutils/chat/chat.c b/netutils/chat/chat.c index 62038172b..c10873d78 100644 --- a/netutils/chat/chat.c +++ b/netutils/chat/chat.c @@ -155,14 +155,14 @@ static int chat_tokenise(FAR struct chat* priv, tok_pos = 0; - vdbg("%s (%d)\n", tok->string, tok->no_termin); + info("%s (%d)\n", tok->string, tok->no_termin); return 0; } /* Tokenizer start */ DEBUGASSERT(script != NULL); - vdbg("%s\n", script); + info("%s\n", script); while (!ret && *cursor != '\0') { @@ -279,7 +279,7 @@ static int chat_tokenise(FAR struct chat* priv, ret = tok_on_delimiter(); } - vdbg("result %d\n", ret); + info("result %d\n", ret); return ret; } @@ -297,7 +297,7 @@ static int chat_internalise(FAR struct chat* priv, while (tok && !ret) { DEBUGASSERT(tok->string); - vdbg("(%c) %s\n", rhs ? 'R' : 'L', tok->string); + info("(%c) %s\n", rhs ? 'R' : 'L', tok->string); if (!rhs) { @@ -406,7 +406,7 @@ static int chat_internalise(FAR struct chat* priv, ret = -ENODATA; } - vdbg("result %d, rhs %d\n", ret, rhs); + info("result %d, rhs %d\n", ret, rhs); return ret; } @@ -426,7 +426,7 @@ static void chat_tokens_free(FAR struct chat_token* first_tok) first_tok = next_tok; } - vdbg("tokens freed\n"); + info("tokens freed\n"); } /* Main parsing function. */ @@ -463,14 +463,14 @@ static int chat_readb(FAR struct chat* priv, FAR char* c, int timeout_ms) ret = poll(&fds, 1, timeout_ms); if (ret <= 0) { - vdbg("poll timed out\n"); + info("poll timed out\n"); return -ETIMEDOUT; } ret = read(priv->ctl.fd, c, 1); if (ret != 1) { - vdbg("read failed\n"); + info("read failed\n"); return -EPERM; } @@ -479,7 +479,7 @@ static int chat_readb(FAR struct chat* priv, FAR char* c, int timeout_ms) fputc(*c, stderr); } - vdbg("read \'%c\' (0x%02X)\n", *c, *c); + info("read \'%c\' (0x%02X)\n", *c, *c); return 0; } @@ -487,9 +487,9 @@ static void chat_flush(FAR struct chat* priv) { char c; - vdbg("starting\n"); + info("starting\n"); while (chat_readb(priv, (FAR char*) &c, 0) == 0); - vdbg("done\n"); + info("done\n"); } static int chat_expect(FAR struct chat* priv, FAR const char* s) @@ -541,7 +541,7 @@ static int chat_expect(FAR struct chat* priv, FAR const char* s) } } - vdbg("result %d\n", ret); + info("result %d\n", ret); return ret; } @@ -553,7 +553,7 @@ static int chat_send(FAR struct chat* priv, FAR const char* s) /* 'write' returns the number of successfully written characters */ ret = write(priv->ctl.fd, s, len); - vdbg("wrote %d out of %d bytes of \'%s\'\n", ret, len, s); + info("wrote %d out of %d bytes of \'%s\'\n", ret, len, s); if (ret > 0) { /* Just SUCCESS */ @@ -570,7 +570,7 @@ static int chat_line_run(FAR struct chat* priv, int ret = 0; int numarg; - vdbg("type %d, rhs %s\n", line->type, line->rhs); + info("type %d, rhs %s\n", line->type, line->rhs); switch (line->type) { @@ -617,11 +617,11 @@ static int chat_line_run(FAR struct chat* priv, numarg = atoi(line->rhs); if (numarg < 0) { - vdbg("invalid timeout string %s\n", line->rhs); + info("invalid timeout string %s\n", line->rhs); } else { - vdbg("timeout is %d s\n", numarg); + info("timeout is %d s\n", numarg); priv->ctl.timeout = numarg; } @@ -678,7 +678,7 @@ static int chat_script_run(FAR struct chat* priv) } } - vdbg("Script result %d, exited on line %d\n", ret, line_num); + info("Script result %d, exited on line %d\n", ret, line_num); return ret; } diff --git a/netutils/dhcpc/dhcpc.c b/netutils/dhcpc/dhcpc.c index 4cbead2a9..5ce8c0209 100644 --- a/netutils/dhcpc/dhcpc.c +++ b/netutils/dhcpc/dhcpc.c @@ -373,7 +373,7 @@ void *dhcpc_open(const void *macaddr, int maclen) pdhcpc->sockfd = socket(PF_INET, SOCK_DGRAM, 0); if (pdhcpc->sockfd < 0) { - nvdbg("socket handle %d\n",ret); + ninfo("socket handle %d\n",ret); free(pdhcpc); return NULL; } @@ -387,7 +387,7 @@ void *dhcpc_open(const void *macaddr, int maclen) ret = bind(pdhcpc->sockfd, (struct sockaddr*)&addr, sizeof(struct sockaddr_in)); if (ret < 0) { - nvdbg("bind status %d\n",ret); + ninfo("bind status %d\n",ret); close(pdhcpc->sockfd); free(pdhcpc); return NULL; @@ -401,7 +401,7 @@ void *dhcpc_open(const void *macaddr, int maclen) ret = setsockopt(pdhcpc->sockfd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(struct timeval)); if (ret < 0) { - nvdbg("setsockopt status %d\n",ret); + ninfo("setsockopt status %d\n",ret); close(pdhcpc->sockfd); free(pdhcpc); return NULL; diff --git a/netutils/dhcpd/dhcpd.c b/netutils/dhcpd/dhcpd.c index 372528898..ab9dc631d 100644 --- a/netutils/dhcpd/dhcpd.c +++ b/netutils/dhcpd/dhcpd.c @@ -47,13 +47,13 @@ # define FAR # define ndbg(...) printf(__VA_ARGS__) -# define nvdbg(...) printf(__VA_ARGS__) +# define ninfo(...) printf(__VA_ARGS__) # define ERROR (-1) # define OK (0) #else # include /* NuttX configuration */ -# include /* For ndbg, vdbg */ +# include /* For ndbg, info */ # include /* For CONFIG_CPP_HAVE_WARNING */ # include /* Advertised DHCPD APIs */ #endif @@ -363,7 +363,7 @@ struct lease_s *dhcpd_setlease(const uint8_t *mac, in_addr_t ipaddr, time_t expi int ndx = ipaddr - CONFIG_NETUTILS_DHCPD_STARTIP; struct lease_s *ret = NULL; - nvdbg("ipaddr: %08x ipaddr: %08x ndx: %d MAX: %d\n", + ninfo("ipaddr: %08x ipaddr: %08x ndx: %d MAX: %d\n", ipaddr, CONFIG_NETUTILS_DHCPD_STARTIP, ndx, CONFIG_NETUTILS_DHCPD_MAXLEASES); @@ -840,7 +840,7 @@ static inline int dhcpd_openresponder(void) int sockfd; int ret; - nvdbg("Responder: %08lx\n", ntohl(g_state.ds_serverip)); + ninfo("Responder: %08lx\n", ntohl(g_state.ds_serverip)); /* Create a socket to listen for requests from DHCP clients */ @@ -980,7 +980,7 @@ static int dhcpd_sendpacket(int bbroadcast) /* Send the minimum sized packet that includes the END option */ len = (g_state.ds_optend - (uint8_t*)&g_state.ds_outpacket) + 1; - nvdbg("sendto %08lx:%04x len=%d\n", + ninfo("sendto %08lx:%04x len=%d\n", (long)ntohl(addr.sin_addr.s_addr), ntohs(addr.sin_port), len); ret = sendto(sockfd, &g_state.ds_outpacket, len, 0, @@ -1004,7 +1004,7 @@ static inline int dhcpd_sendoffer(in_addr_t ipaddr, uint32_t leasetime) #endif /* IP address is in host order */ - nvdbg("Sending offer: %08lx\n", (long)ipaddr); + ninfo("Sending offer: %08lx\n", (long)ipaddr); /* Initialize the outgoing packet */ @@ -1133,7 +1133,7 @@ static inline int dhcpd_discover(void) /* Get the IP address associated with the lease (host order) */ ipaddr = dhcp_leaseipaddr(lease); - nvdbg("Already have lease for IP %08lx\n", (long)ipaddr); + ninfo("Already have lease for IP %08lx\n", (long)ipaddr); } /* Check if the client has requested a specific IP address */ @@ -1143,14 +1143,14 @@ static inline int dhcpd_discover(void) /* Use the requested IP address (host order) */ ipaddr = g_state.ds_optreqip; - nvdbg("User requested IP %08lx\n", (long)ipaddr); + ninfo("User requested IP %08lx\n", (long)ipaddr); } else { /* No... allocate a new IP address (host order)*/ ipaddr = dhcpd_allocipaddr(); - nvdbg("Allocated IP %08lx\n", (long)ipaddr); + ninfo("Allocated IP %08lx\n", (long)ipaddr); } /* Did we get any IP address? */ @@ -1203,7 +1203,7 @@ static inline int dhcpd_request(void) */ ipaddr = dhcp_leaseipaddr(lease); - nvdbg("Lease ipaddr: %08x Server IP: %08x Requested IP: %08x\n", + ninfo("Lease ipaddr: %08x Server IP: %08x Requested IP: %08x\n", ipaddr, g_state.ds_optserverip, g_state.ds_optreqip); if (g_state.ds_optserverip) @@ -1270,7 +1270,7 @@ static inline int dhcpd_request(void) else if (g_state.ds_optreqip && !g_state.ds_optserverip) { - nvdbg("Server IP: %08x Requested IP: %08x\n", + ninfo("Server IP: %08x Requested IP: %08x\n", g_state.ds_optserverip, g_state.ds_optreqip); /* Is this IP address already assigned? */ @@ -1305,17 +1305,17 @@ static inline int dhcpd_request(void) if (response == DHCPACK) { - nvdbg("ACK IP %08lx\n", (long)ipaddr); + ninfo("ACK IP %08lx\n", (long)ipaddr); dhcpd_sendack(ipaddr); } else if (response == DHCPNAK) { - nvdbg("NAK IP %08lx\n", (long)ipaddr); + ninfo("NAK IP %08lx\n", (long)ipaddr); dhcpd_sendnak(); } else { - nvdbg("Remaining silent IP %08lx\n", (long)ipaddr); + ninfo("Remaining silent IP %08lx\n", (long)ipaddr); } return OK; @@ -1396,7 +1396,7 @@ static inline int dhcpd_openlistener(void) } g_state.ds_serverip = ((struct sockaddr_in*)&req.ifr_addr)->sin_addr.s_addr; - nvdbg("serverip: %08lx\n", ntohl(g_state.ds_serverip)); + ninfo("serverip: %08lx\n", ntohl(g_state.ds_serverip)); /* Bind the socket to a local port. We have to bind to INADDRY_ANY to * receive broadcast messages. @@ -1431,7 +1431,7 @@ int dhcpd_run(void) int sockfd; int nbytes; - nvdbg("Started\n"); + ninfo("Started\n"); /* Initialize everything to zero */ @@ -1491,22 +1491,22 @@ int dhcpd_run(void) switch (g_state.ds_optmsgtype) { case DHCPDISCOVER: - nvdbg("DHCPDISCOVER\n"); + ninfo("DHCPDISCOVER\n"); dhcpd_discover(); break; case DHCPREQUEST: - nvdbg("DHCPREQUEST\n"); + ninfo("DHCPREQUEST\n"); dhcpd_request(); break; case DHCPDECLINE: - nvdbg("DHCPDECLINE\n"); + ninfo("DHCPDECLINE\n"); dhcpd_decline(); break; case DHCPRELEASE: - nvdbg("DHCPRELEASE\n"); + ninfo("DHCPRELEASE\n"); dhcpd_release(); break; diff --git a/netutils/discover/discover.c b/netutils/discover/discover.c index 41e7ecd1e..4ccd43ae3 100644 --- a/netutils/discover/discover.c +++ b/netutils/discover/discover.c @@ -185,7 +185,7 @@ static int discover_daemon(int argc, char *argv[]) /* memset(&g_state, 0, sizeof(struct discover_state_s)); */ discover_initresponse(); - nvdbg("Started\n"); + ninfo("Started\n"); for (;;) { @@ -369,7 +369,7 @@ static inline int discover_openlistener() return ERROR; } g_state.serverip = ((struct sockaddr_in*)&req.ifr_addr)->sin_addr.s_addr; - nvdbg("serverip: %08lx\n", ntohl(g_state.serverip)); + ninfo("serverip: %08lx\n", ntohl(g_state.serverip)); /* Bind the socket to a local port. We have to bind to INADDRY_ANY to * receive broadcast messages. diff --git a/netutils/esp8266/esp8266.c b/netutils/esp8266/esp8266.c index 08ccb9f7d..0e996edc6 100644 --- a/netutils/esp8266/esp8266.c +++ b/netutils/esp8266/esp8266.c @@ -221,13 +221,13 @@ static lesp_socket_t *get_sock(int sockfd) { if (!g_lesp_state.is_initialized) { - nvdbg("Esp8266 not initialized; can't list access points\n"); + ninfo("Esp8266 not initialized; can't list access points\n"); return NULL; } if (((unsigned int)sockfd) >= SOCKET_NBR) { - nvdbg("Esp8266 invalid sockfd\n", sockfd); + ninfo("Esp8266 invalid sockfd\n", sockfd); return NULL; } @@ -348,7 +348,7 @@ static inline int lesp_read_ipd(void) return -1; } - nvdbg("Read %d bytes for socket %d \n", len, sockfd); + ninfo("Read %d bytes for socket %d \n", len, sockfd); while(len) { @@ -404,7 +404,7 @@ static inline int lesp_read_ipd(void) { /* No.. the we have lost data */ - nvdbg("overflow socket 0x%02X\n", b); + ninfo("overflow socket 0x%02X\n", b); } } @@ -442,11 +442,11 @@ int lesp_vsend_cmd(FAR const IPTR char *format, va_list ap) if (ret >= BUF_CMD_LEN) { g_lesp_state.bufcmd[BUF_CMD_LEN-1]='\0'; - nvdbg("Buffer too small for '%s'...\n", g_lesp_state.bufcmd); + ninfo("Buffer too small for '%s'...\n", g_lesp_state.bufcmd); ret = -1; } - nvdbg("Write:%s\n", g_lesp_state.bufcmd); + ninfo("Write:%s\n", g_lesp_state.bufcmd); ret = write(g_lesp_state.fd,g_lesp_state.bufcmd,ret); if (ret < 0) @@ -508,7 +508,7 @@ static int lesp_read(int timeout_ms) if (! g_lesp_state.is_initialized) { - nvdbg("Esp8266 not initialized; can't list access points\n"); + ninfo("Esp8266 not initialized; can't list access points\n"); return -1; } @@ -541,7 +541,7 @@ static int lesp_read(int timeout_ms) } while (ret <= 0); - nvdbg("read %d=>%s\n", ret, g_lesp_state.bufans); + ninfo("read %d=>%s\n", ret, g_lesp_state.bufans); return ret; } @@ -607,7 +607,7 @@ int lesp_read_ans_ok(int timeout_ms) return -1; } - nvdbg("Got:%s\n", g_lesp_state.bufans); + ninfo("Got:%s\n", g_lesp_state.bufans); /* Ro quit in case of message flooding */ } @@ -778,7 +778,7 @@ static void *lesp_worker(void *args) UNUSED(args); pthread_mutex_lock(&g_lesp_state.mutex); - nvdbg("worker Started \n"); + ninfo("worker Started \n"); p->bufsize = 0; pthread_mutex_unlock(&g_lesp_state.mutex); @@ -794,7 +794,7 @@ static void *lesp_worker(void *args) } else if (ret > 0) { - //nvdbg("c:0x%02X (%c)\n", c); + //ninfo("c:0x%02X (%c)\n", c); pthread_mutex_lock(&g_lesp_state.mutex); if (c == '\n') @@ -808,7 +808,7 @@ static void *lesp_worker(void *args) { p->buf[p->bufsize] = '\0'; memcpy(g_lesp_state.buf,p->buf,p->bufsize+1); - nvdbg("Read data:%s\n", g_lesp_state.buf); + ninfo("Read data:%s\n", g_lesp_state.buf); sem_post(&g_lesp_state.sem); p->bufsize = 0; } @@ -819,7 +819,7 @@ static void *lesp_worker(void *args) } else { - nvdbg("Read char overflow:%c\n", c); + ninfo("Read char overflow:%c\n", c); } pthread_mutex_unlock(&g_lesp_state.mutex); @@ -896,18 +896,18 @@ int lesp_initialize(void) if (g_lesp_state.is_initialized) { - nvdbg("Esp8266 already initialized\n"); + ninfo("Esp8266 already initialized\n"); pthread_mutex_unlock(&g_lesp_state.mutex); return 0; } - nvdbg("Initializing Esp8266...\n"); + ninfo("Initializing Esp8266...\n"); memset(g_lesp_state.sockets, 0, SOCKET_NBR * sizeof(lesp_socket_t)); if (sem_init(&g_lesp_state.sem, 0, 0) < 0) { - nvdbg("Cannot create semaphore\n"); + ninfo("Cannot create semaphore\n"); pthread_mutex_unlock(&g_lesp_state.mutex); return -1; } @@ -940,12 +940,12 @@ int lesp_initialize(void) if (ret < 0) { - nvdbg("Esp8266 initialisation failed!\n"); + ninfo("Esp8266 initialisation failed!\n"); return -1; } g_lesp_state.is_initialized = true; - nvdbg("Esp8266 initialized\n"); + ninfo("Esp8266 initialized\n"); return 0; } @@ -1016,7 +1016,7 @@ int lesp_ap_connect(const char* ssid_name, const char* ap_key, int timeout_s) { int ret = 0; - nvdbg("Starting manual connect...\n"); + ninfo("Starting manual connect...\n"); if (! g_lesp_state.is_initialized) { @@ -1035,7 +1035,7 @@ int lesp_ap_connect(const char* ssid_name, const char* ap_key, int timeout_s) return -1; } - nvdbg("Wifi connected\n"); + ninfo("Wifi connected\n"); return 0; } @@ -1157,7 +1157,7 @@ int lesp_list_access_points(lesp_cb_t cb) continue; } - nvdbg("Read:%s\n", g_lesp_state.bufans); + ninfo("Read:%s\n", g_lesp_state.bufans); if (strcmp(g_lesp_state.bufans,"OK") == 0) { @@ -1179,7 +1179,7 @@ int lesp_list_access_points(lesp_cb_t cb) return -1; } - nvdbg("Access Point list finished with %d ap founds\n", number); + ninfo("Access Point list finished with %d ap founds\n", number); return number; } @@ -1219,7 +1219,7 @@ int lesp_socket(int domain, int type, int protocol) ret = -1; if (!g_lesp_state.is_initialized) { - nvdbg("Esp8266 not initialized; can't list access points\n"); + ninfo("Esp8266 not initialized; can't list access points\n"); } else { @@ -1352,7 +1352,7 @@ ssize_t lesp_send(int sockfd, FAR const uint8_t *buf, size_t len, int flags) if (ret >= 0) { - nvdbg("Sending in socket %d, %d bytes\n", sockfd,len); + ninfo("Sending in socket %d, %d bytes\n", sockfd,len); ret = write(g_lesp_state.fd,buf,len); } @@ -1380,7 +1380,7 @@ ssize_t lesp_send(int sockfd, FAR const uint8_t *buf, size_t len, int flags) if (ret >= 0) { - nvdbg("Sent\n"); + ninfo("Sent\n"); } if (ret < 0) @@ -1400,7 +1400,7 @@ ssize_t lesp_recv(int sockfd, FAR uint8_t *buf, size_t len, int flags) if (sem_init(&sem, 0, 0) < 0) { - nvdbg("Cannot create semaphore\n"); + ninfo("Cannot create semaphore\n"); return -1; } diff --git a/netutils/ftpc/ftpc_config.h b/netutils/ftpc/ftpc_config.h index 8e8fbd2d9..59590a7b5 100644 --- a/netutils/ftpc/ftpc_config.h +++ b/netutils/ftpc/ftpc_config.h @@ -51,7 +51,7 @@ * this file is to muck with some of the settings to support some debug * features. * - * The FPT client uses common networking debug macros (ndbg and nvdbg). + * The FPT client uses common networking debug macros (ndbg and ninfo). * This can be overwhelming if there is a lot of networking debug output * as well. But by defining CONFIG_DEBUG_FTPC, this file will force * networking debug ON only for the files within this directory. diff --git a/netutils/ftpc/ftpc_getreply.c b/netutils/ftpc/ftpc_getreply.c index f07f83f60..fc0f0bce5 100644 --- a/netutils/ftpc/ftpc_getreply.c +++ b/netutils/ftpc/ftpc_getreply.c @@ -229,7 +229,7 @@ int fptc_getreply(struct ftpc_session_s *session) /* No.. cancel the timer and return an error */ wd_cancel(session->wdog); - nvdbg("Lost connection\n"); + ninfo("Lost connection\n"); return ERROR; } @@ -240,11 +240,11 @@ int fptc_getreply(struct ftpc_session_s *session) /* No.. cancel the timer and return an error */ wd_cancel(session->wdog); - nvdbg("ftpc_gets failed\n"); + ninfo("ftpc_gets failed\n"); return ERROR; } - nvdbg("Reply: %s\n", session->reply); + ninfo("Reply: %s\n", session->reply); if (session->reply[3] == '-') { @@ -258,7 +258,7 @@ int fptc_getreply(struct ftpc_session_s *session) break; } - nvdbg("Reply: %s\n", session->reply); + ninfo("Reply: %s\n", session->reply); } while (strncmp(tmp, session->reply, 4) != 0); } diff --git a/netutils/ftpc/ftpc_listdir.c b/netutils/ftpc/ftpc_listdir.c index 5d6c6d156..6177bdd16 100644 --- a/netutils/ftpc/ftpc_listdir.c +++ b/netutils/ftpc/ftpc_listdir.c @@ -145,7 +145,7 @@ static void ftpc_nlstparse(FAR FILE *instream, callback_t callback, { break; } - nvdbg("File: %s\n", buffer); + ninfo("File: %s\n", buffer); /* Perform the callback operation */ @@ -349,7 +349,7 @@ FAR struct ftpc_dirlist_s *ftpc_listdir(SESSION handle, ndbg("Nothing found in directory\n"); goto errout; } - nvdbg("nnames: %d\n", nnames); + ninfo("nnames: %d\n", nnames); /* Allocate and initialize a directory container */ diff --git a/netutils/ftpc/ftpc_login.c b/netutils/ftpc/ftpc_login.c index 3d41d8a25..b2e01d268 100644 --- a/netutils/ftpc/ftpc_login.c +++ b/netutils/ftpc/ftpc_login.c @@ -114,7 +114,7 @@ int ftpc_login(SESSION handle, FAR struct ftpc_login_s *login) FTPC_CLR_PASSIVE(session); if (login->pasv) { - nvdbg("Setting passive mode\n"); + ninfo("Setting passive mode\n"); FTPC_SET_PASSIVE(session); } diff --git a/netutils/ftpc/ftpc_putfile.c b/netutils/ftpc/ftpc_putfile.c index 751597259..29a8f17f4 100644 --- a/netutils/ftpc/ftpc_putfile.c +++ b/netutils/ftpc/ftpc_putfile.c @@ -276,7 +276,7 @@ static int ftpc_sendfile(struct ftpc_session_s *session, const char *path, else { rname = strndup(str, len-1); - nvdbg("Unique filename is: %s\n", rname); + ninfo("Unique filename is: %s\n", rname); } free(rname); } diff --git a/netutils/ftpc/ftpc_transfer.c b/netutils/ftpc/ftpc_transfer.c index b84cf509b..2b2d46edd 100644 --- a/netutils/ftpc/ftpc_transfer.c +++ b/netutils/ftpc/ftpc_transfer.c @@ -407,7 +407,7 @@ int ftpc_xfrabort(FAR struct ftpc_session_s *session, FAR FILE *stream) { /* Read data from command channel */ - nvdbg("Flush cmd channel data\n"); + ninfo("Flush cmd channel data\n"); while (stream && fread(session->buffer, 1, CONFIG_FTP_BUFSIZE, stream) > 0); return OK; } @@ -418,7 +418,7 @@ int ftpc_xfrabort(FAR struct ftpc_session_s *session, FAR FILE *stream) * ABORT */ - nvdbg("Telnet ABORt sequence\n"); + ninfo("Telnet ABORt sequence\n"); ftpc_sockprintf(&session->cmd, "%c%c", TELNET_IAC, TELNET_IP); /* Interrupt process */ ftpc_sockprintf(&session->cmd, "%c%c", TELNET_IAC, TELNET_DM); /* Telnet synch signal */ ftpc_sockprintf(&session->cmd, "ABOR\r\n"); /* Abort */ @@ -438,7 +438,7 @@ int ftpc_xfrabort(FAR struct ftpc_session_s *session, FAR FILE *stream) if (session->code != 226 && session->code != 426) { - nvdbg("Expected 226 or 426 reply\n"); + ninfo("Expected 226 or 426 reply\n"); } else { @@ -452,7 +452,7 @@ int ftpc_xfrabort(FAR struct ftpc_session_s *session, FAR FILE *stream) if (session->code != 226 && session->code != 225) { - nvdbg("Expected 225 or 226 reply\n"); + ninfo("Expected 225 or 226 reply\n"); } } @@ -493,7 +493,7 @@ FAR char *ftpc_absrpath(FAR struct ftpc_session_s *session, { FAR char *absrpath = ftpc_abspath(session, relpath, session->homerdir, session->currdir); - nvdbg("%s -> %s\n", relpath, absrpath); + ninfo("%s -> %s\n", relpath, absrpath); return absrpath; } @@ -510,7 +510,7 @@ FAR char *ftpc_abslpath(FAR struct ftpc_session_s *session, { FAR char *abslpath = ftpc_abspath(session, relpath, session->homeldir, session->curldir); - nvdbg("%s -> %s\n", relpath, abslpath); + ninfo("%s -> %s\n", relpath, abslpath); return abslpath; } diff --git a/netutils/ftpd/ftpd.c b/netutils/ftpd/ftpd.c index 51cf1c315..d14f6a435 100644 --- a/netutils/ftpd/ftpd.c +++ b/netutils/ftpd/ftpd.c @@ -796,13 +796,13 @@ static int ftpd_rxpoll(int sd, int timeout) if (ret == 0) { - //nvdbg("poll() timed out\n"); + //ninfo("poll() timed out\n"); return -ETIMEDOUT; } else if (ret < 0) { int errval = errno; - nvdbg("poll() failed: %d\n", errval); + ninfo("poll() failed: %d\n", errval); return -errval; } else @@ -838,13 +838,13 @@ static int ftpd_txpoll(int sd, int timeout) if (ret == 0) { - nvdbg("poll() timed out\n"); + ninfo("poll() timed out\n"); return -ETIMEDOUT; } else if (ret < 0) { int errval = errno; - nvdbg("poll() failed: %d\n", errval); + ninfo("poll() failed: %d\n", errval); return -errval; } else @@ -911,7 +911,7 @@ static ssize_t ftpd_recv(int sd, FAR void *data, size_t size, int timeout) status = ftpd_rxpoll(sd, timeout); if (status < 0) { - nvdbg("ftpd_rxpoll: %d\n", status); + ninfo("ftpd_rxpoll: %d\n", status); return (ssize_t)status; } } @@ -948,7 +948,7 @@ static ssize_t ftpd_send(int sd, FAR const void *data, size_t size, int timeout) int status = ftpd_txpoll(sd, timeout); if (status < 0) { - nvdbg("ftpd_rxpoll: %d\n", status); + ninfo("ftpd_rxpoll: %d\n", status); return (ssize_t)status; } } @@ -4022,7 +4022,7 @@ static FAR void *ftpd_worker(FAR void *arg) uint8_t ch; int ret; - nvdbg("Worker started\n"); + ninfo("Worker started\n"); DEBUGASSERT(session); /* Configure the session sockets */ diff --git a/netutils/netlib/netlib_ipmsfilter.c b/netutils/netlib/netlib_ipmsfilter.c index 47e2688ab..1bace33e6 100644 --- a/netutils/netlib/netlib_ipmsfilter.c +++ b/netutils/netlib/netlib_ipmsfilter.c @@ -85,7 +85,7 @@ int ipmsfilter(FAR const char *ifname, FAR const struct in_addr *multiaddr, { int ret = ERROR; - nvdbg("ifname: %s muliaddr: %08x fmode: %ld\n", ifname, *multiaddr, fmode); + ninfo("ifname: %s muliaddr: %08x fmode: %ld\n", ifname, *multiaddr, fmode); if (ifname && multiaddr) { /* Get a socket (only so that we get access to the INET subsystem) */ diff --git a/netutils/netlib/netlib_listenon.c b/netutils/netlib/netlib_listenon.c index ec774c72a..c46fa672e 100644 --- a/netutils/netlib/netlib_listenon.c +++ b/netutils/netlib/netlib_listenon.c @@ -124,7 +124,7 @@ int netlib_listenon(uint16_t portno) /* Begin accepting connections */ - nvdbg("Accepting connections on port %d\n", ntohs(portno)); + ninfo("Accepting connections on port %d\n", ntohs(portno)); return listensd; errout_with_socket: diff --git a/netutils/netlib/netlib_server.c b/netutils/netlib/netlib_server.c index 559db2fb1..42ed151dc 100644 --- a/netutils/netlib/netlib_server.c +++ b/netutils/netlib/netlib_server.c @@ -113,7 +113,7 @@ void netlib_server(uint16_t portno, pthread_startroutine_t handler, int stacksiz break; } - nvdbg("Connection accepted -- spawning sd=%d\n", acceptsd); + ninfo("Connection accepted -- spawning sd=%d\n", acceptsd); /* Configure to "linger" until all data is sent when the socket is * closed. diff --git a/netutils/ntpclient/ntpclient.c b/netutils/ntpclient/ntpclient.c index 570938545..5562cd615 100644 --- a/netutils/ntpclient/ntpclient.c +++ b/netutils/ntpclient/ntpclient.c @@ -274,7 +274,7 @@ static void ntpc_settime(FAR uint8_t *timestamp) tp.tv_nsec = nsec; clock_settime(CLOCK_REALTIME, &tp); - svdbg("Set time to %lu seconds: %d\n", (unsigned long)tp.tv_sec, ret); + sinfo("Set time to %lu seconds: %d\n", (unsigned long)tp.tv_sec, ret); } /**************************************************************************** @@ -373,7 +373,7 @@ static int ntpc_daemon(int argc, char **argv) memset(&xmit, 0, sizeof(xmit)); xmit.lvm = MKLVM(0, 3, NTP_VERSION); - svdbg("Sending a NTP packet\n"); + sinfo("Sending a NTP packet\n"); ret = sendto(sd, &xmit, sizeof(struct ntp_datagram_s), 0, (FAR struct sockaddr *)&server, @@ -415,7 +415,7 @@ static int ntpc_daemon(int argc, char **argv) if (nbytes >= (ssize_t)NTP_DATAGRAM_MINSIZE) { - svdbg("Setting time\n"); + sinfo("Setting time\n"); ntpc_settime(recv.recvtimestamp); } @@ -453,7 +453,7 @@ static int ntpc_daemon(int argc, char **argv) if (g_ntpc_daemon.state == NTP_RUNNING) { - svdbg("Waiting for %d seconds\n", + sinfo("Waiting for %d seconds\n", CONFIG_NETUTILS_NTPCLIENT_POLLDELAYSEC); (void)sleep(CONFIG_NETUTILS_NTPCLIENT_POLLDELAYSEC); diff --git a/netutils/ping/icmpv6_ping.c b/netutils/ping/icmpv6_ping.c index c7bfefccd..4c0136ad7 100644 --- a/netutils/ping/icmpv6_ping.c +++ b/netutils/ping/icmpv6_ping.c @@ -95,7 +95,7 @@ static void icmpv6_echo_request(FAR struct net_driver_s *dev, uint16_t reqlen; int i; - nllvdbg("Send ECHO request: seqno=%d\n", pstate->png_seqno); + nllinfo("Send ECHO request: seqno=%d\n", pstate->png_seqno); /* Set up the IPv6 header (most is probably already in place) */ diff --git a/netutils/telnetd/telnetd_daemon.c b/netutils/telnetd/telnetd_daemon.c index 70e02e020..405f980cf 100644 --- a/netutils/telnetd/telnetd_daemon.c +++ b/netutils/telnetd/telnetd_daemon.c @@ -241,7 +241,7 @@ static int telnetd_daemon(int argc, char *argv[]) for (;;) { - nllvdbg("Accepting connections on port %d\n", ntohs(daemon->port)); + nllinfo("Accepting connections on port %d\n", ntohs(daemon->port)); addrlen = sizeof(struct sockaddr_in); acceptsd = accept(listensd, (struct sockaddr*)&myaddr, &addrlen); @@ -287,7 +287,7 @@ static int telnetd_daemon(int argc, char *argv[]) /* Create a character device to "wrap" the accepted socket descriptor */ - nllvdbg("Creating the telnet driver\n"); + nllinfo("Creating the telnet driver\n"); session.ts_sd = acceptsd; session.ts_devpath[0] = '\0'; @@ -303,7 +303,7 @@ static int telnetd_daemon(int argc, char *argv[]) /* Open the driver */ - nllvdbg("Opening the telnet driver at %s\n", session.ts_devpath); + nllinfo("Opening the telnet driver at %s\n", session.ts_devpath); drvrfd = open(session.ts_devpath, O_RDWR); if (drvrfd < 0) { @@ -328,7 +328,7 @@ static int telnetd_daemon(int argc, char *argv[]) * will inherit the new stdin, stdout, and stderr. */ - nllvdbg("Starting the telnet session\n"); + nllinfo("Starting the telnet session\n"); pid = task_create("Telnet session", daemon->priority, daemon->stacksize, daemon->entry, NULL); if (pid < 0) diff --git a/netutils/tftpc/tftpc_get.c b/netutils/tftpc/tftpc_get.c index ddc518a2b..6b90024f2 100644 --- a/netutils/tftpc/tftpc_get.c +++ b/netutils/tftpc/tftpc_get.c @@ -99,7 +99,7 @@ static inline ssize_t tftp_write(int fd, const uint8_t *buf, size_t len) /* Handle partial writes */ - nvdbg("Wrote %d bytes to file\n", nbyteswritten); + ninfo("Wrote %d bytes to file\n", nbyteswritten); left -= nbyteswritten; buf += nbyteswritten; } @@ -242,14 +242,14 @@ int tftpget(FAR const char *remote, FAR const char *local, in_addr_t addr, if (server.sin_addr.s_addr != from.sin_addr.s_addr) { - nvdbg("Invalid address in DATA\n"); + ninfo("Invalid address in DATA\n"); retry--; continue; } if (server.sin_port && server.sin_port != from.sin_port) { - nvdbg("Invalid port in DATA\n"); + ninfo("Invalid port in DATA\n"); len = tftp_mkerrpacket(packet, TFTP_ERR_UNKID, TFTP_ERRST_UNKID); ret = tftp_sendto(sd, packet, len, &from); retry--; @@ -262,7 +262,7 @@ int tftpget(FAR const char *remote, FAR const char *local, in_addr_t addr, { /* Packet is not big enough to be parsed */ - nvdbg("Tiny data packet ignored\n"); + ninfo("Tiny data packet ignored\n"); continue; } @@ -271,7 +271,7 @@ int tftpget(FAR const char *remote, FAR const char *local, in_addr_t addr, { /* Opcode is not TFTP_DATA or the block number is unexpected */ - nvdbg("Parse failure\n"); + ninfo("Parse failure\n"); if (opcode > TFTP_MAXRFC1350) { len = tftp_mkerrpacket(packet, TFTP_ERR_ILLEGALOP, TFTP_ERRST_ILLEGALOP); @@ -297,7 +297,7 @@ int tftpget(FAR const char *remote, FAR const char *local, in_addr_t addr, if (retry == TFTP_RETRIES) { - nvdbg("Retry limit exceeded\n"); + ninfo("Retry limit exceeded\n"); goto errout_with_sd; } @@ -318,7 +318,7 @@ int tftpget(FAR const char *remote, FAR const char *local, in_addr_t addr, { goto errout_with_sd; } - nvdbg("ACK blockno %d\n", blockno); + ninfo("ACK blockno %d\n", blockno); } while (ndatabytes >= TFTP_DATASIZE); diff --git a/netutils/tftpc/tftpc_internal.h b/netutils/tftpc/tftpc_internal.h index 31a3faade..18aeabcc6 100644 --- a/netutils/tftpc/tftpc_internal.h +++ b/netutils/tftpc/tftpc_internal.h @@ -170,7 +170,7 @@ extern ssize_t tftp_recvfrom(int sd, void *buf, size_t len, struct sockaddr_in * extern ssize_t tftp_sendto(int sd, const void *buf, size_t len, struct sockaddr_in *to); #ifdef CONFIG_NETUTILS_TFTP_DUMPBUFFERS -# define tftp_dumpbuffer(msg, buffer, nbytes) nvdbgdumpbuffer(msg, buffer, nbytes) +# define tftp_dumpbuffer(msg, buffer, nbytes) ninfodumpbuffer(msg, buffer, nbytes) #else # define tftp_dumpbuffer(msg, buffer, nbytes) #endif diff --git a/netutils/tftpc/tftpc_put.c b/netutils/tftpc/tftpc_put.c index 1c22a5e80..492febc16 100644 --- a/netutils/tftpc/tftpc_put.c +++ b/netutils/tftpc/tftpc_put.c @@ -247,13 +247,13 @@ static int tftp_rcvack(int sd, uint8_t *packet, struct sockaddr_in *server, if (server->sin_addr.s_addr != from.sin_addr.s_addr) { - nvdbg("Invalid address in DATA\n"); + ninfo("Invalid address in DATA\n"); continue; } if (*port != server->sin_port) { - nvdbg("Invalid port in DATA\n"); + ninfo("Invalid port in DATA\n"); packetlen = tftp_mkerrpacket(packet, TFTP_ERR_UNKID, TFTP_ERRST_UNKID); (void)tftp_sendto(sd, packet, packetlen, server); continue; @@ -270,7 +270,7 @@ static int tftp_rcvack(int sd, uint8_t *packet, struct sockaddr_in *server, if (opcode != TFTP_ACK) { - nvdbg("Bad opcode\n"); + ninfo("Bad opcode\n"); #if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_NET) if (opcode == TFTP_ERR) { @@ -291,7 +291,7 @@ static int tftp_rcvack(int sd, uint8_t *packet, struct sockaddr_in *server, /* Success! */ - nvdbg("Received ACK for block %d\n", rblockno); + ninfo("Received ACK for block %d\n", rblockno); *blockno = rblockno; return OK; } diff --git a/netutils/thttpd/fdwatch.c b/netutils/thttpd/fdwatch.c index ba955f420..960979bc5 100644 --- a/netutils/thttpd/fdwatch.c +++ b/netutils/thttpd/fdwatch.c @@ -65,25 +65,25 @@ # ifdef CONFIG_CPP_HAVE_VARARGS # define fwdbg(format, ...) ndbg(format, ##__VA_ARGS__) # define fwlldbg(format, ...) nlldbg(format, ##__VA_ARGS__) -# define fwvdbg(format, ...) nvdbg(format, ##__VA_ARGS__) -# define fwllvdbg(format, ...) nllvdbg(format, ##__VA_ARGS__) +# define fwinfo(format, ...) ninfo(format, ##__VA_ARGS__) +# define fwllinfo(format, ...) nllinfo(format, ##__VA_ARGS__) # else # define fwdbg ndbg # define fwlldbg nlldbg -# define fwvdbg nvdbg -# define fwllvdbg nllvdbg +# define fwinfo ninfo +# define fwllinfo nllinfo # endif #else # ifdef CONFIG_CPP_HAVE_VARARGS # define fwdbg(x...) # define fwlldbg(x...) -# define fwvdbg(x...) -# define fwllvdbg(x...) +# define fwinfo(x...) +# define fwllinfo(x...) # else # define fwdbg (void) # define fwlldbg (void) -# define fwvdbg (void) -# define fwllvdbg (void) +# define fwinfo (void) +# define fwllinfo (void) # endif #endif @@ -108,18 +108,18 @@ static void fdwatch_dump(const char *msg, FAR struct fdwatch_s *fw) { int i; - fwvdbg("%s\n", msg); - fwvdbg("nwatched: %d nfds: %d\n", fw->nwatched, fw->nfds); + fwinfo("%s\n", msg); + fwinfo("nwatched: %d nfds: %d\n", fw->nwatched, fw->nfds); for (i = 0; i < fw->nwatched; i++) { - fwvdbg("%2d. pollfds: {fd: %d events: %02x revents: %02x} client: %p\n", + fwinfo("%2d. pollfds: {fd: %d events: %02x revents: %02x} client: %p\n", i+1, fw->pollfds[i].fd, fw->pollfds[i].events, fw->pollfds[i].revents, fw->client[i]); } - fwvdbg("nactive: %d next: %d\n", fw->nactive, fw->next); + fwinfo("nactive: %d next: %d\n", fw->nactive, fw->next); for (i = 0; i < fw->nactive; i++) { - fwvdbg("%2d. %d active\n", i, fw->ready[i]); + fwinfo("%2d. %d active\n", i, fw->ready[i]); } } #else @@ -136,7 +136,7 @@ static int fdwatch_pollndx(FAR struct fdwatch_s *fw, int fd) { if (fw->pollfds[pollndx].fd == fd) { - fwvdbg("pollndx: %d\n", pollndx); + fwinfo("pollndx: %d\n", pollndx); return pollndx; } } @@ -224,7 +224,7 @@ void fdwatch_uninitialize(struct fdwatch_s *fw) void fdwatch_add_fd(struct fdwatch_s *fw, int fd, void *client_data) { - fwvdbg("fd: %d client_data: %p\n", fd, client_data); + fwinfo("fd: %d client_data: %p\n", fd, client_data); fdwatch_dump("Before adding:", fw); if (fw->nwatched >= fw->nfds) @@ -251,7 +251,7 @@ void fdwatch_del_fd(struct fdwatch_s *fw, int fd) { int pollndx; - fwvdbg("fd: %d\n", fd); + fwinfo("fd: %d\n", fd); fdwatch_dump("Before deleting:", fw); /* Get the index associated with the fd */ @@ -292,11 +292,11 @@ int fdwatch(struct fdwatch_s *fw, long timeout_msecs) */ fdwatch_dump("Before waiting:", fw); - fwvdbg("Waiting... (timeout %d)\n", timeout_msecs); + fwinfo("Waiting... (timeout %d)\n", timeout_msecs); fw->nactive = 0; fw->next = 0; ret = poll(fw->pollfds, fw->nwatched, (int)timeout_msecs); - fwvdbg("Awakened: %d\n", ret); + fwinfo("Awakened: %d\n", ret); /* Look through all of the descriptors and make a list of all of them than * have activity. @@ -312,7 +312,7 @@ int fdwatch(struct fdwatch_s *fw, long timeout_msecs) { /* Yes... save it in a shorter list */ - fwvdbg("pollndx: %d fd: %d revents: %04x\n", + fwinfo("pollndx: %d fd: %d revents: %04x\n", i, fw->pollfds[i].fd, fw->pollfds[i].revents); fw->ready[fw->nactive++] = fw->pollfds[i].fd; @@ -328,7 +328,7 @@ int fdwatch(struct fdwatch_s *fw, long timeout_msecs) /* Return the number of descriptors with activity */ - fwvdbg("nactive: %d\n", fw->nactive); + fwinfo("nactive: %d\n", fw->nactive); fdwatch_dump("After wakeup:", fw); return ret; } @@ -339,7 +339,7 @@ int fdwatch_check_fd(struct fdwatch_s *fw, int fd) { int pollndx; - fwvdbg("fd: %d\n", fd); + fwinfo("fd: %d\n", fd); fdwatch_dump("Checking:", fw); /* Get the index associated with the fd */ @@ -350,7 +350,7 @@ int fdwatch_check_fd(struct fdwatch_s *fw, int fd) return fw->pollfds[pollndx].revents & (POLLIN | POLLHUP | POLLNVAL); } - fwvdbg("POLLERR fd: %d\n", fd); + fwinfo("POLLERR fd: %d\n", fd); return 0; } @@ -359,11 +359,11 @@ void *fdwatch_get_next_client_data(struct fdwatch_s *fw) fdwatch_dump("Before getting client data:", fw); if (fw->next >= fw->nwatched) { - fwvdbg("All client data returned: %d\n", fw->next); + fwinfo("All client data returned: %d\n", fw->next); return (void*)-1; } - fwvdbg("client_data[%d]: %p\n", fw->next, fw->client[fw->next]); + fwinfo("client_data[%d]: %p\n", fw->next, fw->client[fw->next]); return fw->client[fw->next++]; } diff --git a/netutils/thttpd/libhttpd.c b/netutils/thttpd/libhttpd.c index 8d9b32031..04311f95c 100644 --- a/netutils/thttpd/libhttpd.c +++ b/netutils/thttpd/libhttpd.c @@ -231,7 +231,7 @@ static int initialize_listen_socket(httpd_sockaddr *saP) /* Create socket. */ - nvdbg("Create listen socket\n"); + ninfo("Create listen socket\n"); listen_fd = socket(saP->sin_family, SOCK_STREAM, 0); if (listen_fd < 0) { @@ -418,7 +418,7 @@ static void send_response(httpd_conn *hc, int status, const char *title, const c char defanged[72]; char buf[128]; - nvdbg("title: \"%s\" form: \"%s\"\n", title, form); + ninfo("title: \"%s\" form: \"%s\"\n", title, form); send_mime(hc, status, title, "", extraheads, "text/html; charset=%s", (off_t)-1, (time_t)0); add_response(hc, html_html); @@ -1116,7 +1116,7 @@ static char *expand_filename(char *path, char **restP, bool tildemapped) char *cp2; int i; - nvdbg("path: \"%s\"\n", path); + ninfo("path: \"%s\"\n", path); #if 0 // REVISIT /* We need to do the pathinfo check. we do a single stat() of the whole * filename - if it exists, then we return it as is with nothing in restP. @@ -1302,7 +1302,7 @@ static char *expand_filename(char *path, char **restP, bool tildemapped) (void)strcpy(checked, httpd_root); } - nvdbg("checked: \"%s\"\n", checked); + ninfo("checked: \"%s\"\n", checked); return checked; } @@ -2101,7 +2101,7 @@ FAR httpd_server *httpd_initialize(FAR httpd_sockaddr *sa) #else hs->hostname = httpd_strdup(httpd_ntoa(sa)); #endif - nvdbg("hostname: %s\n", hs->hostname); + ninfo("hostname: %s\n", hs->hostname); if (!hs->hostname) { @@ -2213,7 +2213,7 @@ void httpd_send_err(httpd_conn *hc, int status, const char *title, const char *e "%s/%s/err%d.html", hc->hostdir, CONFIG_THTTPD_ERROR_DIRECTORY, status); if (send_err_file(hc, status, title, extraheads, filename)) { - nvdbg("Sent VHOST error file\n"); + ninfo("Sent VHOST error file\n"); return; } } @@ -2224,7 +2224,7 @@ void httpd_send_err(httpd_conn *hc, int status, const char *title, const char *e (void)snprintf(filename, sizeof(filename), "%s/err%d.html", CONFIG_THTTPD_ERROR_DIRECTORY, status); if (send_err_file(hc, status, title, extraheads, filename)) { - nvdbg("Sent server-wide error page\n"); + ninfo("Sent server-wide error page\n"); return; } @@ -2293,7 +2293,7 @@ int httpd_get_conn(httpd_server *hs, int listen_fd, httpd_conn *hc) /* Accept the new connection. */ - nvdbg("accept() new connection on listen_fd %d\n", listen_fd); + ninfo("accept() new connection on listen_fd %d\n", listen_fd); sz = sizeof(sa); hc->conn_fd = accept(listen_fd, (struct sockaddr*)&sa, &sz); if (hc->conn_fd < 0) @@ -2368,7 +2368,7 @@ int httpd_get_conn(httpd_server *hs, int listen_fd, httpd_conn *hc) hc->should_linger = false; hc->file_fd = -1; - nvdbg("New connection accepted on %d\n", hc->conn_fd); + ninfo("New connection accepted on %d\n", hc->conn_fd); return GC_OK; } @@ -2597,7 +2597,7 @@ int httpd_parse_request(httpd_conn *hc) hc->checked_idx = 0; /* reset */ method_str = bufgets(hc); - nvdbg("method_str: \"%s\"\n", method_str); + ninfo("method_str: \"%s\"\n", method_str); url = strpbrk(method_str, " \t\012\015"); if (!url) @@ -2609,10 +2609,10 @@ int httpd_parse_request(httpd_conn *hc) *url++ = '\0'; url += strspn(url, " \t\012\015"); - nvdbg("url: \"%s\"\n", url); + ninfo("url: \"%s\"\n", url); protocol = strpbrk(url, " \t\012\015"); - nvdbg("protocol: \"%s\"\n", protocol ? protocol : ""); + ninfo("protocol: \"%s\"\n", protocol ? protocol : ""); if (!protocol) { @@ -3025,7 +3025,7 @@ int httpd_parse_request(httpd_conn *hc) (void)strcpy(hc->expnfilename, cp); httpd_realloc_str(&hc->pathinfo, &hc->maxpathinfo, strlen(pi)); (void)strcpy(hc->pathinfo, pi); - nvdbg("expnfilename: \"%s\" pathinfo: \"%s\"\n", hc->expnfilename, hc->pathinfo); + ninfo("expnfilename: \"%s\" pathinfo: \"%s\"\n", hc->expnfilename, hc->pathinfo); /* Remove pathinfo stuff from the original filename too. */ @@ -3123,7 +3123,7 @@ int httpd_start_request(httpd_conn *hc, struct timeval *nowP) char *pi; int i; - nvdbg("File: \"%s\"\n", hc->expnfilename); + ninfo("File: \"%s\"\n", hc->expnfilename); expnlen = strlen(hc->expnfilename); if (hc->method != METHOD_GET && hc->method != METHOD_HEAD && diff --git a/netutils/thttpd/libhttpd.h b/netutils/thttpd/libhttpd.h index d83c2c419..275473ba9 100644 --- a/netutils/thttpd/libhttpd.h +++ b/netutils/thttpd/libhttpd.h @@ -77,7 +77,7 @@ # if !defined(CONFIG_DEBUG_INFO) || !defined(CONFIG_DEBUG_NET) # undef CONFIG_THTTPD_BADREQUEST # else -# define BADREQUEST(s) nvdbg("Bad Request: \"%s\"\n", s) +# define BADREQUEST(s) ninfo("Bad Request: \"%s\"\n", s) # endif #endif @@ -94,7 +94,7 @@ # if !defined(CONFIG_DEBUG_INFO) || !defined(CONFIG_DEBUG_NET) # undef CONFIG_THTTPD_NOTIMPLEMENTED # else -# define NOTIMPLEMENTED(s) nvdbg("Not Implemented: \"%s\"\n", s) +# define NOTIMPLEMENTED(s) ninfo("Not Implemented: \"%s\"\n", s) # endif #endif @@ -111,7 +111,7 @@ # if !defined(CONFIG_DEBUG_INFO) || !defined(CONFIG_DEBUG_NET) # undef CONFIG_THTTPD_INTERNALERROR # else -# define INTERNALERROR(s) nvdbg("Internal Error: \"%s\"\n", s) +# define INTERNALERROR(s) ninfo("Internal Error: \"%s\"\n", s) # endif #endif diff --git a/netutils/thttpd/tdate_parse.c b/netutils/thttpd/tdate_parse.c index e91ab5ebb..6287cbd6f 100644 --- a/netutils/thttpd/tdate_parse.c +++ b/netutils/thttpd/tdate_parse.c @@ -200,7 +200,7 @@ time_t tdate_parse(char *str) long tm_wday; #endif - nvdbg("str: \"%s\"\n", str); + ninfo("str: \"%s\"\n", str); /* Initialize. */ diff --git a/netutils/thttpd/thttpd.c b/netutils/thttpd/thttpd.c index ea7abc94c..f2b657d51 100644 --- a/netutils/thttpd/thttpd.c +++ b/netutils/thttpd/thttpd.c @@ -178,7 +178,7 @@ static int handle_newconnect(FAR struct timeval *tv, int listen_fd) * fast as possible so we don't overrun the listen queue. */ - nvdbg("New connection(s) on listen_fd %d\n", listen_fd); + ninfo("New connection(s) on listen_fd %d\n", listen_fd); for (;;) { /* Get the next free connection from the free list */ @@ -234,7 +234,7 @@ static int handle_newconnect(FAR struct timeval *tv, int listen_fd) break; } - nvdbg("New connection fd %d\n", conn->hc->conn_fd); + ninfo("New connection fd %d\n", conn->hc->conn_fd); /* Remove the connection entry from the free list */ @@ -426,7 +426,7 @@ static void handle_send(struct connect_s *conn, struct timeval *tv) while (conn->offset < conn->end_offset) { - nvdbg("offset: %d end_offset: %d bytes_sent: %d\n", + ninfo("offset: %d end_offset: %d bytes_sent: %d\n", conn->offset, conn->end_offset, conn->hc->bytes_sent); /* Fill the rest of the response buffer with file data */ @@ -437,7 +437,7 @@ static void handle_send(struct connect_s *conn, struct timeval *tv) ndbg("File read error: %d\n", errno); goto errout_clear_connection; } - nvdbg("Read %d bytes, buflen %d\n", nread, hc->buflen); + ninfo("Read %d bytes, buflen %d\n", nread, hc->buflen); /* Send the buffer */ @@ -465,13 +465,13 @@ static void handle_send(struct connect_s *conn, struct timeval *tv) conn->offset += nwritten; conn->hc->bytes_sent += nwritten; - nvdbg("Wrote %d bytes\n", nwritten); + ninfo("Wrote %d bytes\n", nwritten); } } /* The file transfer is complete -- finish the connection */ - nvdbg("Finish connection\n"); + ninfo("Finish connection\n"); finish_connection(conn, tv); return; @@ -616,7 +616,7 @@ static void linger_clear_connection(ClientData client_data, struct timeval *nowP { struct connect_s *conn; - nvdbg("Clear connection\n"); + ninfo("Clear connection\n"); conn = (struct connect_s *) client_data.p; conn->linger_timer = NULL; really_clear_connection(conn); @@ -663,7 +663,7 @@ int thttpd_main(int argc, char **argv) int ret; #endif - nvdbg("THTTPD started\n"); + ninfo("THTTPD started\n"); /* Setup host address */ @@ -702,7 +702,7 @@ int thttpd_main(int argc, char **argv) /* Initialize the HTTP layer */ - nvdbg("Calling httpd_initialize()\n"); + ninfo("Calling httpd_initialize()\n"); hs = httpd_initialize(&sa); if (!hs) { @@ -756,7 +756,7 @@ int thttpd_main(int argc, char **argv) /* Main loop */ - nvdbg("Entering the main loop\n"); + ninfo("Entering the main loop\n"); (void)gettimeofday(&tv, NULL); for (;;) { @@ -810,7 +810,7 @@ int thttpd_main(int argc, char **argv) hc = conn->hc; if (fdwatch_check_fd(fw, hc->conn_fd)) { - nvdbg("Handle conn_state %d\n", conn->conn_state); + ninfo("Handle conn_state %d\n", conn->conn_state); switch (conn->conn_state) { case CNST_READING: diff --git a/netutils/thttpd/thttpd_alloc.c b/netutils/thttpd/thttpd_alloc.c index 7bf072a58..63145f5be 100644 --- a/netutils/thttpd/thttpd_alloc.c +++ b/netutils/thttpd/thttpd_alloc.c @@ -110,7 +110,7 @@ FAR void *httpd_malloc(size_t nbytes) } else { - nvdbg("Allocated %d bytes at %p\n", nbytes, ptr); + ninfo("Allocated %d bytes at %p\n", nbytes, ptr); g_nallocations++; g_allocated += nbytes; } @@ -130,7 +130,7 @@ FAR void *httpd_realloc(FAR void *oldptr, size_t oldsize, size_t newsize) } else { - nvdbg("Re-allocated form %d to %d bytes (from %p to %p)\n", + ninfo("Re-allocated form %d to %d bytes (from %p to %p)\n", oldsize, newsize, oldptr, ptr); g_allocated += (newsize - oldsize); } @@ -144,7 +144,7 @@ void httpd_free(FAR void *ptr) { free(ptr); g_nfreed++; - nvdbg("Freed memory at %p\n", ptr); + ninfo("Freed memory at %p\n", ptr); httpd_memstats(); } #endif @@ -159,7 +159,7 @@ FAR char *httpd_strdup(const char *str) } else { - nvdbg("strdup'ed %s\n", str); + ninfo("strdup'ed %s\n", str); g_nallocations++; g_allocated += (strlen(str)+1); } diff --git a/netutils/thttpd/thttpd_cgi.c b/netutils/thttpd/thttpd_cgi.c index d88fb6bc2..45ef74387 100644 --- a/netutils/thttpd/thttpd_cgi.c +++ b/netutils/thttpd/thttpd_cgi.c @@ -366,14 +366,14 @@ static inline int cgi_interpose_input(struct cgi_conn_s *cc) ssize_t nbytes_read; ssize_t nbytes_written; - nllvdbg("nbytes: %d contentlength: %d\n", cc->inbuf.nbytes, cc->inbuf.contentlength); + nllinfo("nbytes: %d contentlength: %d\n", cc->inbuf.nbytes, cc->inbuf.contentlength); if (cc->inbuf.nbytes < cc->inbuf.contentlength) { do { nbytes_read = read(cc->connfd, cc->inbuf.buffer, MIN(CONFIG_THTTPD_CGIINBUFFERSIZE, cc->inbuf.contentlength - cc->inbuf.nbytes)); - nllvdbg("nbytes_read: %d\n", nbytes_read); + nllinfo("nbytes_read: %d\n", nbytes_read); if (nbytes_read < 0) { if (errno != EINTR) @@ -388,7 +388,7 @@ static inline int cgi_interpose_input(struct cgi_conn_s *cc) if (nbytes_read > 0) { nbytes_written = httpd_write(cc->wrfd, cc->inbuf.buffer, nbytes_read); - nllvdbg("nbytes_written: %d\n", nbytes_written); + nllinfo("nbytes_written: %d\n", nbytes_written); if (nbytes_written != nbytes_read) { nlldbg("httpd_write failed\n"); @@ -447,7 +447,7 @@ static inline int cgi_interpose_output(struct cgi_conn_s *cc) /* Loop while there are things we can do without waiting for more input */ - nllvdbg("state: %d\n", cc->outbuf.state); + nllinfo("state: %d\n", cc->outbuf.state); switch (cc->outbuf.state) { case CGI_OUTBUFFER_READHEADER: @@ -461,7 +461,7 @@ static inline int cgi_interpose_output(struct cgi_conn_s *cc) */ nbytes_read = read(cc->rdfd, cc->inbuf.buffer, CONFIG_THTTPD_CGIINBUFFERSIZE); - nllvdbg("Read %d bytes from fd %d\n", nbytes_read, cc->rdfd); + nllinfo("Read %d bytes from fd %d\n", nbytes_read, cc->rdfd); if (nbytes_read < 0) { @@ -485,7 +485,7 @@ static inline int cgi_interpose_output(struct cgi_conn_s *cc) if (nbytes_read <= 0) { - nllvdbg("End-of-file\n"); + nllinfo("End-of-file\n"); br = &(cc->outbuf.buffer[cc->outbuf.len]); cc->outbuf.state = CGI_OUTBUFFER_HEADERREAD; } @@ -497,14 +497,14 @@ static inline int cgi_interpose_output(struct cgi_conn_s *cc) (void)memcpy(&(cc->outbuf.buffer[cc->outbuf.len]), cc->inbuf.buffer, nbytes_read); cc->outbuf.len += nbytes_read; cc->outbuf.buffer[cc->outbuf.len] = '\0'; - nllvdbg("Header bytes accumulated: %d\n", cc->outbuf.len); + nllinfo("Header bytes accumulated: %d\n", cc->outbuf.len); /* Check for end of header */ if ((br = strstr(cc->outbuf.buffer, "\r\n\r\n")) != NULL || (br = strstr(cc->outbuf.buffer, "\012\012")) != NULL) { - nllvdbg("End-of-header\n"); + nllinfo("End-of-header\n"); cc->outbuf.state = CGI_OUTBUFFER_HEADERREAD; } else @@ -559,7 +559,7 @@ static inline int cgi_interpose_output(struct cgi_conn_s *cc) /* Write the status line. */ - nllvdbg("Status: %d\n", status); + nllinfo("Status: %d\n", status); switch (status) { case 200: @@ -643,7 +643,7 @@ static inline int cgi_interpose_output(struct cgi_conn_s *cc) */ nbytes_read = read(cc->rdfd, cc->inbuf.buffer, CONFIG_THTTPD_CGIINBUFFERSIZE); - nllvdbg("Read %d bytes from fd %d\n", nbytes_read, cc->rdfd); + nllinfo("Read %d bytes from fd %d\n", nbytes_read, cc->rdfd); if (nbytes_read < 0) { @@ -667,7 +667,7 @@ static inline int cgi_interpose_output(struct cgi_conn_s *cc) if (nbytes_read == 0) { - nllvdbg("End-of-file\n"); + nllinfo("End-of-file\n"); cc->outbuf.state = CGI_OUTBUFFER_DONE; return 1; } @@ -713,7 +713,7 @@ static int cgi_child(int argc, char **argv) * all file descriptors */ - nllvdbg("Started: %s\n", argv[1]); + nllinfo("Started: %s\n", argv[1]); /* Allocate memory and initialize memory for interposing */ @@ -746,7 +746,7 @@ static int cgi_child(int argc, char **argv) * now prevents re-use of fd=0 and 1 by pipe(). */ - nllvdbg("Closing descriptors\n"); + nllinfo("Closing descriptors\n"); for (fd = 3; fd < (CONFIG_NFILE_DESCRIPTORS + CONFIG_NSOCKET_DESCRIPTORS); fd++) { /* Keep hc->conn_fd open for obvious reasons */ @@ -764,7 +764,7 @@ static int cgi_child(int argc, char **argv) * socket to the CGI program. */ - nllvdbg("Create STDIN pipe\n"); + nllinfo("Create STDIN pipe\n"); ret = pipe(pipefd); if (ret < 0) { @@ -795,7 +795,7 @@ static int cgi_child(int argc, char **argv) if (ret == 0) { - nllvdbg("Create STDOUT pipe\n"); + nllinfo("Create STDOUT pipe\n"); ret = pipe(pipefd); if (ret < 0) { @@ -857,7 +857,7 @@ static int cgi_child(int argc, char **argv) /* Run the CGI program. */ - nllvdbg("Starting CGI: %s\n", hc->expnfilename); + nllinfo("Starting CGI: %s\n", hc->expnfilename); #ifdef CONFIG_THTTPD_NXFLAT child = exec(hc->expnfilename, (FAR char * const *)argp, g_thttpdsymtab, g_thttpdnsymbols); @@ -891,7 +891,7 @@ static int cgi_child(int argc, char **argv) /* Send any data that is already buffer to the CGI task */ nbytes = hc->read_idx - hc->checked_idx; - nllvdbg("nbytes: %d contentlength: %d\n", nbytes, hc->contentlength); + nllinfo("nbytes: %d contentlength: %d\n", nbytes, hc->contentlength); if (nbytes > 0) { if (httpd_write(cc->wrfd, &(hc->read_buf[hc->checked_idx]), nbytes) != nbytes) @@ -909,7 +909,7 @@ static int cgi_child(int argc, char **argv) indone = false; outdone = false; - nllvdbg("Interposing\n"); + nllinfo("Interposing\n"); cgi_semgive(); /* Not safe to reference hc after this point */ do { @@ -921,7 +921,7 @@ static int cgi_child(int argc, char **argv) { /* Transfer data from the client to the CGI program (POST) */ - nllvdbg("Interpose input\n"); + nllinfo("Interpose input\n"); indone = cgi_interpose_input(cc); if (indone) { @@ -935,7 +935,7 @@ static int cgi_child(int argc, char **argv) { /* Handle receipt of headers and CGI program response (GET) */ - nllvdbg("Interpose output\n"); + nllinfo("Interpose output\n"); outdone = cgi_interpose_output(cc); } @@ -949,7 +949,7 @@ static int cgi_child(int argc, char **argv) else if (kill(child, 0) != 0) { - nllvdbg("CGI no longer running: %d\n", errno); + nllinfo("CGI no longer running: %d\n", errno); outdone = true; } } @@ -977,7 +977,7 @@ errout_with_cgiconn: httpd_free(cc); errout: - nllvdbg("Return %d\n", err); + nllinfo("Return %d\n", err); if (err != 0) { INTERNALERROR("errout"); diff --git a/netutils/webclient/webclient.c b/netutils/webclient/webclient.c index d8e6dc367..df91a112d 100644 --- a/netutils/webclient/webclient.c +++ b/netutils/webclient/webclient.c @@ -350,7 +350,7 @@ static inline int wget_parseheaders(struct wget_s *ws) (void)netlib_parsehttpurl(ws->line + strlen(g_httplocation), &ws->port, ws->hostname, CONFIG_WEBCLIENT_MAXHOSTNAME, ws->filename, CONFIG_WEBCLIENT_MAXFILENAME); - nvdbg("New hostname='%s' filename='%s'\n", ws->hostname, ws->filename); + ninfo("New hostname='%s' filename='%s'\n", ws->hostname, ws->filename); } } @@ -470,7 +470,7 @@ static int wget_base(FAR const char *url, FAR char *buffer, int buflen, return ERROR; } - nvdbg("hostname='%s' filename='%s'\n", ws.hostname, ws.filename); + ninfo("hostname='%s' filename='%s'\n", ws.hostname, ws.filename); /* The following sequence may repeat indefinitely if we are redirected */ @@ -606,7 +606,7 @@ static int wget_base(FAR const char *url, FAR char *buffer, int buflen, } else if (ws.datend == 0) { - nvdbg("Connection lost\n"); + ninfo("Connection lost\n"); close(sockfd); break; } diff --git a/netutils/webserver/httpd.c b/netutils/webserver/httpd.c index b46f0739d..774a7f66c 100644 --- a/netutils/webserver/httpd.c +++ b/netutils/webserver/httpd.c @@ -197,7 +197,7 @@ static void httpd_dumpbuffer(FAR const char *msg, FAR const char *buffer, unsign * defined or the following does nothing. */ - nvdbgdumpbuffer(msg, (FAR const uint8_t*)buffer, nbytes); + ninfodumpbuffer(msg, (FAR const uint8_t*)buffer, nbytes); } #else # define httpd_dumpbuffer(msg,buffer,nbytes) @@ -207,15 +207,15 @@ static void httpd_dumpbuffer(FAR const char *msg, FAR const char *buffer, unsign static void httpd_dumppstate(struct httpd_state *pstate, const char *msg) { #if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_NET) - nvdbg("[%d] pstate(%p): [%s]\n", pstate->ht_sockfd, pstate, msg); - nvdbg(" filename: [%s]\n", pstate->ht_filename); - nvdbg(" htfile len: %d\n", pstate->ht_file.len); - nvdbg(" sockfd: %d\n", pstate->ht_sockfd); + ninfo("[%d] pstate(%p): [%s]\n", pstate->ht_sockfd, pstate, msg); + ninfo(" filename: [%s]\n", pstate->ht_filename); + ninfo(" htfile len: %d\n", pstate->ht_file.len); + ninfo(" sockfd: %d\n", pstate->ht_sockfd); #ifndef CONFIG_NETUTILS_HTTPD_SCRIPT_DISABLE - nvdbg(" scriptptr: %p\n", pstate->ht_scriptptr); - nvdbg(" scriptlen: %d\n", pstate->ht_scriptlen); + ninfo(" scriptptr: %p\n", pstate->ht_scriptptr); + ninfo(" scriptlen: %d\n", pstate->ht_scriptlen); #endif - nvdbg(" sndlen: %d\n", pstate->ht_sndlen); + ninfo(" sndlen: %d\n", pstate->ht_sndlen); #endif } #else @@ -439,7 +439,7 @@ static int httpd_senderror(struct httpd_state *pstate, int status) int ret; char msg[10 + 1]; - nvdbg("[%d] sending error '%d'\n", pstate->ht_sockfd, status); + ninfo("[%d] sending error '%d'\n", pstate->ht_sockfd, status); if (status < 400 || status >= 600) { @@ -495,7 +495,7 @@ static int httpd_sendfile(struct httpd_state *pstate) pstate->ht_sndlen = 0; - nvdbg("[%d] sending file '%s'\n", pstate->ht_sockfd, pstate->ht_filename); + ninfo("[%d] sending file '%s'\n", pstate->ht_sockfd, pstate->ht_filename); #ifdef CONFIG_NETUTILS_HTTPD_CGIPATH { @@ -684,7 +684,7 @@ static inline int httpd_parse(struct httpd_state *pstate) return 400; } - nvdbg("[%d] Request header %s: %s\n", pstate->ht_sockfd, start, v); + ninfo("[%d] Request header %s: %s\n", pstate->ht_sockfd, start, v); if (0 == strcasecmp(start, "Content-Length") && 0 != atoi(v)) { @@ -719,7 +719,7 @@ static inline int httpd_parse(struct httpd_state *pstate) } #endif - nvdbg("[%d] Filename: %s\n", pstate->ht_sockfd, pstate->ht_filename); + ninfo("[%d] Filename: %s\n", pstate->ht_sockfd, pstate->ht_filename); return 200; } @@ -739,7 +739,7 @@ static void *httpd_handler(void *arg) struct httpd_state *pstate = (struct httpd_state *)malloc(sizeof(struct httpd_state)); int sockfd = (int)arg; - nvdbg("[%d] Started\n", sockfd); + ninfo("[%d] Started\n", sockfd); /* Verify that the state structure was successfully allocated */ @@ -781,7 +781,7 @@ static void *httpd_handler(void *arg) /* Exit the task */ - nvdbg("[%d] Exitting\n", sockfd); + ninfo("[%d] Exitting\n", sockfd); close(sockfd); return NULL; } @@ -819,7 +819,7 @@ static void single_server(uint16_t portno, pthread_startroutine_t handler, int s break; } - nvdbg("Connection accepted -- serving sd=%d\n", acceptsd); + ninfo("Connection accepted -- serving sd=%d\n", acceptsd); /* Configure to "linger" until all data is sent when the socket is closed */ diff --git a/nshlib/nsh_netinit.c b/nshlib/nsh_netinit.c index caca5e3c8..0f4d8504e 100644 --- a/nshlib/nsh_netinit.c +++ b/nshlib/nsh_netinit.c @@ -228,7 +228,7 @@ static void nsh_netinit_configure(void) uint8_t mac[IFHWADDRLEN]; #endif - nvdbg("Entry\n"); + ninfo("Entry\n"); /* Many embedded network interfaces must have a software assigned MAC */ @@ -345,7 +345,7 @@ static void nsh_netinit_configure(void) #endif #endif /* NSH_HAVE_NETDEV */ - nvdbg("Exit\n"); + ninfo("Exit\n"); } /**************************************************************************** @@ -373,7 +373,7 @@ static void nsh_netinit_signal(int signo, FAR siginfo_t *siginfo, sem_post(&g_notify_sem); } - nllvdbg("Exit\n"); + nllinfo("Exit\n"); } #endif @@ -397,7 +397,7 @@ static int nsh_netinit_monitor(void) int ret; int sd; - nvdbg("Entry\n"); + ninfo("Entry\n"); /* Initialize the notification semaphore */ @@ -499,7 +499,7 @@ static int nsh_netinit_monitor(void) goto errout_with_notification; } - nvdbg("%s: devup=%d PHY address=%02x MSR=%04x\n", + ninfo("%s: devup=%d PHY address=%02x MSR=%04x\n", ifr.ifr_name, devup, ifr.ifr_mii_phy_id, ifr.ifr_mii_val_out); /* Check for link up or down */ @@ -514,7 +514,7 @@ static int nsh_netinit_monitor(void) * Bring the link up. */ - nvdbg("Bringing the link up\n"); + ninfo("Bringing the link up\n"); ifr.ifr_flags = IFF_UP; ret = ioctl(sd, SIOCSIFFLAGS, (unsigned long)&ifr); @@ -552,7 +552,7 @@ static int nsh_netinit_monitor(void) * the link down. */ - nvdbg("Taking the link down\n"); + ninfo("Taking the link down\n"); ifr.ifr_flags = IFF_DOWN; ret = ioctl(sd, SIOCSIFFLAGS, (unsigned long)&ifr); @@ -616,7 +616,7 @@ errout: #ifdef CONFIG_NSH_NETINIT_THREAD static pthread_addr_t nsh_netinit_thread(pthread_addr_t arg) { - nvdbg("Entry\n"); + ninfo("Entry\n"); /* Configure the network */ @@ -628,7 +628,7 @@ static pthread_addr_t nsh_netinit_thread(pthread_addr_t arg) nsh_netinit_monitor(); #endif - nvdbg("Exit\n"); + ninfo("Exit\n"); return NULL; } #endif @@ -662,7 +662,7 @@ int nsh_netinit(void) (void)pthread_attr_setschedparam(&attr, &sparam); (void)pthread_attr_setstacksize(&attr, CONFIG_NSH_NETINIT_THREAD_STACKSIZE); - nvdbg("Starting netinit thread\n"); + ninfo("Starting netinit thread\n"); ret = pthread_create(&tid, &attr, nsh_netinit_thread, NULL); if (ret != OK) { diff --git a/nshlib/nsh_romfsetc.c b/nshlib/nsh_romfsetc.c index 15c5ee8b8..3e3ff3544 100644 --- a/nshlib/nsh_romfsetc.c +++ b/nshlib/nsh_romfsetc.c @@ -109,7 +109,7 @@ int nsh_romfsetc(void) /* Mount the file system */ - vdbg("Mounting ROMFS filesystem at target=%s with source=%s\n", + info("Mounting ROMFS filesystem at target=%s with source=%s\n", CONFIG_NSH_ROMFSMOUNTPT, MOUNT_DEVNAME); ret = mount(MOUNT_DEVNAME, CONFIG_NSH_ROMFSMOUNTPT, "romfs", MS_RDONLY, NULL); diff --git a/nshlib/nsh_telnetd.c b/nshlib/nsh_telnetd.c index 5c9560f80..b80bc72be 100644 --- a/nshlib/nsh_telnetd.c +++ b/nshlib/nsh_telnetd.c @@ -201,7 +201,7 @@ int nsh_telnetstart(void) /* Start the telnet daemon */ - vdbg("Starting the Telnet daemon\n"); + info("Starting the Telnet daemon\n"); ret = telnetd_start(&config); if (ret < 0) { diff --git a/platform/arduino-due/sam_cxxinitialize.c b/platform/arduino-due/sam_cxxinitialize.c index 58662cee9..53289960d 100644 --- a/platform/arduino-due/sam_cxxinitialize.c +++ b/platform/arduino-due/sam_cxxinitialize.c @@ -61,17 +61,17 @@ # define cxxdbg dbg # define cxxlldbg lldbg # ifdef CONFIG_DEBUG_INFO -# define cxxvdbg vdbg -# define cxxllvdbg llvdbg +# define cxxinfo info +# define cxxllinfo llinfo # else -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) # endif #else # define cxxdbg(x...) # define cxxlldbg(x...) -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) #endif /**************************************************************************** diff --git a/platform/cloudctrl/stm32_cxxinitialize.c b/platform/cloudctrl/stm32_cxxinitialize.c index 63216a310..7ffcb6f02 100644 --- a/platform/cloudctrl/stm32_cxxinitialize.c +++ b/platform/cloudctrl/stm32_cxxinitialize.c @@ -62,17 +62,17 @@ # define cxxdbg dbg # define cxxlldbg lldbg # ifdef CONFIG_DEBUG_INFO -# define cxxvdbg vdbg -# define cxxllvdbg llvdbg +# define cxxinfo info +# define cxxllinfo llinfo # else -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) # endif #else # define cxxdbg(x...) # define cxxlldbg(x...) -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) #endif /**************************************************************************** diff --git a/platform/fire-stm32v2/stm32_cxxinitialize.c b/platform/fire-stm32v2/stm32_cxxinitialize.c index cd6fd0e5a..87811ddd7 100644 --- a/platform/fire-stm32v2/stm32_cxxinitialize.c +++ b/platform/fire-stm32v2/stm32_cxxinitialize.c @@ -61,17 +61,17 @@ # define cxxdbg dbg # define cxxlldbg lldbg # ifdef CONFIG_DEBUG_INFO -# define cxxvdbg vdbg -# define cxxllvdbg llvdbg +# define cxxinfo info +# define cxxllinfo llinfo # else -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) # endif #else # define cxxdbg(x...) # define cxxlldbg(x...) -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) #endif /**************************************************************************** diff --git a/platform/mikroe-stm32f4/stm32_cxxinitialize.c b/platform/mikroe-stm32f4/stm32_cxxinitialize.c index aabfab73b..05c430ba6 100644 --- a/platform/mikroe-stm32f4/stm32_cxxinitialize.c +++ b/platform/mikroe-stm32f4/stm32_cxxinitialize.c @@ -61,17 +61,17 @@ # define cxxdbg dbg # define cxxlldbg lldbg # ifdef CONFIG_DEBUG_INFO -# define cxxvdbg vdbg -# define cxxllvdbg llvdbg +# define cxxinfo info +# define cxxllinfo llinfo # else -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) # endif #else # define cxxdbg(x...) # define cxxlldbg(x...) -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) #endif /**************************************************************************** diff --git a/platform/nucleo-144/stm32_cxxinitialize.c b/platform/nucleo-144/stm32_cxxinitialize.c index 48fe9d67a..6d592a1a3 100644 --- a/platform/nucleo-144/stm32_cxxinitialize.c +++ b/platform/nucleo-144/stm32_cxxinitialize.c @@ -62,17 +62,17 @@ # define cxxdbg dbg # define cxxlldbg lldbg # ifdef CONFIG_DEBUG_INFO -# define cxxvdbg vdbg -# define cxxllvdbg llvdbg +# define cxxinfo info +# define cxxllinfo llinfo # else -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) # endif #else # define cxxdbg(x...) # define cxxlldbg(x...) -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) #endif /**************************************************************************** diff --git a/platform/nucleo-f303re/stm32_cxxinitialize.c b/platform/nucleo-f303re/stm32_cxxinitialize.c index 856d0c5ab..e915348ac 100644 --- a/platform/nucleo-f303re/stm32_cxxinitialize.c +++ b/platform/nucleo-f303re/stm32_cxxinitialize.c @@ -61,17 +61,17 @@ # define cxxdbg dbg # define cxxlldbg lldbg # ifdef CONFIG_DEBUG_INFO -# define cxxvdbg vdbg -# define cxxllvdbg llvdbg +# define cxxinfo info +# define cxxllinfo llinfo # else -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) # endif #else # define cxxdbg(x...) # define cxxlldbg(x...) -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) #endif /**************************************************************************** diff --git a/platform/nucleo-f4x1re/stm32_cxxinitialize.c b/platform/nucleo-f4x1re/stm32_cxxinitialize.c index bd1075efb..c7f4b9488 100644 --- a/platform/nucleo-f4x1re/stm32_cxxinitialize.c +++ b/platform/nucleo-f4x1re/stm32_cxxinitialize.c @@ -61,17 +61,17 @@ # define cxxdbg dbg # define cxxlldbg lldbg # ifdef CONFIG_DEBUG_INFO -# define cxxvdbg vdbg -# define cxxllvdbg llvdbg +# define cxxinfo info +# define cxxllinfo llinfo # else -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) # endif #else # define cxxdbg(x...) # define cxxlldbg(x...) -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) #endif /**************************************************************************** diff --git a/platform/nucleo-l476rg/stm32_cxxinitialize.c b/platform/nucleo-l476rg/stm32_cxxinitialize.c index bcb9f2712..f94721ab5 100644 --- a/platform/nucleo-l476rg/stm32_cxxinitialize.c +++ b/platform/nucleo-l476rg/stm32_cxxinitialize.c @@ -61,17 +61,17 @@ # define cxxdbg dbg # define cxxlldbg lldbg # ifdef CONFIG_DEBUG_INFO -# define cxxvdbg vdbg -# define cxxllvdbg llvdbg +# define cxxinfo info +# define cxxllinfo llinfo # else -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) # endif #else # define cxxdbg(x...) # define cxxlldbg(x...) -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) #endif /**************************************************************************** diff --git a/platform/olimex-stm32-h405/stm32_cxxinitialize.c b/platform/olimex-stm32-h405/stm32_cxxinitialize.c index 5fa0dae58..786118dd1 100644 --- a/platform/olimex-stm32-h405/stm32_cxxinitialize.c +++ b/platform/olimex-stm32-h405/stm32_cxxinitialize.c @@ -61,17 +61,17 @@ # define cxxdbg dbg # define cxxlldbg lldbg # ifdef CONFIG_DEBUG_INFO -# define cxxvdbg vdbg -# define cxxllvdbg llvdbg +# define cxxinfo info +# define cxxllinfo llinfo # else -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) # endif #else # define cxxdbg(x...) # define cxxlldbg(x...) -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) #endif /**************************************************************************** diff --git a/platform/olimex-stm32-h407/stm32_cxxinitialize.c b/platform/olimex-stm32-h407/stm32_cxxinitialize.c index 6b6b961e3..8511cf2b4 100644 --- a/platform/olimex-stm32-h407/stm32_cxxinitialize.c +++ b/platform/olimex-stm32-h407/stm32_cxxinitialize.c @@ -61,17 +61,17 @@ # define cxxdbg dbg # define cxxlldbg lldbg # ifdef CONFIG_DEBUG_INFO -# define cxxvdbg vdbg -# define cxxllvdbg llvdbg +# define cxxinfo info +# define cxxllinfo llinfo # else -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) # endif #else # define cxxdbg(x...) # define cxxlldbg(x...) -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) #endif /**************************************************************************** diff --git a/platform/olimex-stm32-p207/stm32_cxxinitialize.c b/platform/olimex-stm32-p207/stm32_cxxinitialize.c index 742141fbb..4aa67c363 100644 --- a/platform/olimex-stm32-p207/stm32_cxxinitialize.c +++ b/platform/olimex-stm32-p207/stm32_cxxinitialize.c @@ -61,17 +61,17 @@ # define cxxdbg dbg # define cxxlldbg lldbg # ifdef CONFIG_DEBUG_INFO -# define cxxvdbg vdbg -# define cxxllvdbg llvdbg +# define cxxinfo info +# define cxxllinfo llinfo # else -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) # endif #else # define cxxdbg(x...) # define cxxlldbg(x...) -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) #endif /**************************************************************************** diff --git a/platform/olimexino-stm32/stm32_cxxinitialize.c b/platform/olimexino-stm32/stm32_cxxinitialize.c index 3d06bc7d0..543956d98 100644 --- a/platform/olimexino-stm32/stm32_cxxinitialize.c +++ b/platform/olimexino-stm32/stm32_cxxinitialize.c @@ -61,17 +61,17 @@ # define cxxdbg dbg # define cxxlldbg lldbg # ifdef CONFIG_DEBUG_INFO -# define cxxvdbg vdbg -# define cxxllvdbg llvdbg +# define cxxinfo info +# define cxxllinfo llinfo # else -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) # endif #else # define cxxdbg(x...) # define cxxlldbg(x...) -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) #endif /**************************************************************************** diff --git a/platform/pcduino-a10/a1x_cxxinitialize.c b/platform/pcduino-a10/a1x_cxxinitialize.c index 1cdd6efc2..caca40f3d 100644 --- a/platform/pcduino-a10/a1x_cxxinitialize.c +++ b/platform/pcduino-a10/a1x_cxxinitialize.c @@ -61,17 +61,17 @@ # define cxxdbg dbg # define cxxlldbg lldbg # ifdef CONFIG_DEBUG_INFO -# define cxxvdbg vdbg -# define cxxllvdbg llvdbg +# define cxxinfo info +# define cxxllinfo llinfo # else -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) # endif #else # define cxxdbg(x...) # define cxxlldbg(x...) -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) #endif /**************************************************************************** diff --git a/platform/sabre-6quad/imx_cxxinitialize.c b/platform/sabre-6quad/imx_cxxinitialize.c index 8edc5ae8e..ac1b00402 100644 --- a/platform/sabre-6quad/imx_cxxinitialize.c +++ b/platform/sabre-6quad/imx_cxxinitialize.c @@ -61,17 +61,17 @@ # define cxxdbg dbg # define cxxlldbg lldbg # ifdef CONFIG_DEBUG_INFO -# define cxxvdbg vdbg -# define cxxllvdbg llvdbg +# define cxxinfo info +# define cxxllinfo llinfo # else -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) # endif #else # define cxxdbg(x...) # define cxxlldbg(x...) -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) #endif /**************************************************************************** diff --git a/platform/sam3u-ek/sam_cxxinitialized.c b/platform/sam3u-ek/sam_cxxinitialized.c index 3685f00fb..766b938b2 100644 --- a/platform/sam3u-ek/sam_cxxinitialized.c +++ b/platform/sam3u-ek/sam_cxxinitialized.c @@ -61,17 +61,17 @@ # define cxxdbg dbg # define cxxlldbg lldbg # ifdef CONFIG_DEBUG_INFO -# define cxxvdbg vdbg -# define cxxllvdbg llvdbg +# define cxxinfo info +# define cxxllinfo llinfo # else -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) # endif #else # define cxxdbg(x...) # define cxxlldbg(x...) -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) #endif /**************************************************************************** diff --git a/platform/sam4e-ek/sam_cxxinitialize.c b/platform/sam4e-ek/sam_cxxinitialize.c index 8498bc63b..7e4d16a6a 100644 --- a/platform/sam4e-ek/sam_cxxinitialize.c +++ b/platform/sam4e-ek/sam_cxxinitialize.c @@ -61,17 +61,17 @@ # define cxxdbg dbg # define cxxlldbg lldbg # ifdef CONFIG_DEBUG_INFO -# define cxxvdbg vdbg -# define cxxllvdbg llvdbg +# define cxxinfo info +# define cxxllinfo llinfo # else -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) # endif #else # define cxxdbg(x...) # define cxxlldbg(x...) -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) #endif /**************************************************************************** diff --git a/platform/sam4l-xplained/sam_cxxinitialize.c b/platform/sam4l-xplained/sam_cxxinitialize.c index 04e777848..881a1dd4f 100644 --- a/platform/sam4l-xplained/sam_cxxinitialize.c +++ b/platform/sam4l-xplained/sam_cxxinitialize.c @@ -61,17 +61,17 @@ # define cxxdbg dbg # define cxxlldbg lldbg # ifdef CONFIG_DEBUG_INFO -# define cxxvdbg vdbg -# define cxxllvdbg llvdbg +# define cxxinfo info +# define cxxllinfo llinfo # else -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) # endif #else # define cxxdbg(x...) # define cxxlldbg(x...) -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) #endif /**************************************************************************** diff --git a/platform/sam4s-xplained-pro/sam_cxxinitialize.c b/platform/sam4s-xplained-pro/sam_cxxinitialize.c index 5b705fef7..f6e090322 100644 --- a/platform/sam4s-xplained-pro/sam_cxxinitialize.c +++ b/platform/sam4s-xplained-pro/sam_cxxinitialize.c @@ -61,17 +61,17 @@ # define cxxdbg dbg # define cxxlldbg lldbg # ifdef CONFIG_DEBUG_INFO -# define cxxvdbg vdbg -# define cxxllvdbg llvdbg +# define cxxinfo info +# define cxxllinfo llinfo # else -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) # endif #else # define cxxdbg(x...) # define cxxlldbg(x...) -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) #endif /**************************************************************************** diff --git a/platform/sam4s-xplained/sam_cxxinitialize.c b/platform/sam4s-xplained/sam_cxxinitialize.c index 54bcd399b..7e8c65993 100644 --- a/platform/sam4s-xplained/sam_cxxinitialize.c +++ b/platform/sam4s-xplained/sam_cxxinitialize.c @@ -61,17 +61,17 @@ # define cxxdbg dbg # define cxxlldbg lldbg # ifdef CONFIG_DEBUG_INFO -# define cxxvdbg vdbg -# define cxxllvdbg llvdbg +# define cxxinfo info +# define cxxllinfo llinfo # else -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) # endif #else # define cxxdbg(x...) # define cxxlldbg(x...) -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) #endif /**************************************************************************** diff --git a/platform/sama5d2-xult/sam_cxxinitialize.c b/platform/sama5d2-xult/sam_cxxinitialize.c index 213b9eff3..283cc6d9d 100644 --- a/platform/sama5d2-xult/sam_cxxinitialize.c +++ b/platform/sama5d2-xult/sam_cxxinitialize.c @@ -61,17 +61,17 @@ # define cxxdbg dbg # define cxxlldbg lldbg # ifdef CONFIG_DEBUG_INFO -# define cxxvdbg vdbg -# define cxxllvdbg llvdbg +# define cxxinfo info +# define cxxllinfo llinfo # else -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) # endif #else # define cxxdbg(x...) # define cxxlldbg(x...) -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) #endif /**************************************************************************** diff --git a/platform/sama5d3-xplained/sam_cxxinitialize.c b/platform/sama5d3-xplained/sam_cxxinitialize.c index 1af07a7ba..013e3ded3 100644 --- a/platform/sama5d3-xplained/sam_cxxinitialize.c +++ b/platform/sama5d3-xplained/sam_cxxinitialize.c @@ -61,17 +61,17 @@ # define cxxdbg dbg # define cxxlldbg lldbg # ifdef CONFIG_DEBUG_INFO -# define cxxvdbg vdbg -# define cxxllvdbg llvdbg +# define cxxinfo info +# define cxxllinfo llinfo # else -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) # endif #else # define cxxdbg(x...) # define cxxlldbg(x...) -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) #endif /**************************************************************************** diff --git a/platform/sama5d3x-ek/sam_cxxinitialize.c b/platform/sama5d3x-ek/sam_cxxinitialize.c index 256690198..e65426b13 100644 --- a/platform/sama5d3x-ek/sam_cxxinitialize.c +++ b/platform/sama5d3x-ek/sam_cxxinitialize.c @@ -61,17 +61,17 @@ # define cxxdbg dbg # define cxxlldbg lldbg # ifdef CONFIG_DEBUG_INFO -# define cxxvdbg vdbg -# define cxxllvdbg llvdbg +# define cxxinfo info +# define cxxllinfo llinfo # else -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) # endif #else # define cxxdbg(x...) # define cxxlldbg(x...) -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) #endif /**************************************************************************** diff --git a/platform/sama5d4-ek/sam_cxxinitialize.c b/platform/sama5d4-ek/sam_cxxinitialize.c index 8b492e857..3630c420a 100644 --- a/platform/sama5d4-ek/sam_cxxinitialize.c +++ b/platform/sama5d4-ek/sam_cxxinitialize.c @@ -61,17 +61,17 @@ # define cxxdbg dbg # define cxxlldbg lldbg # ifdef CONFIG_DEBUG_INFO -# define cxxvdbg vdbg -# define cxxllvdbg llvdbg +# define cxxinfo info +# define cxxllinfo llinfo # else -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) # endif #else # define cxxdbg(x...) # define cxxlldbg(x...) -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) #endif /**************************************************************************** diff --git a/platform/samd20-xplained/sam_cxxinitialize.c b/platform/samd20-xplained/sam_cxxinitialize.c index 4ed7ce4df..8ce87c07a 100644 --- a/platform/samd20-xplained/sam_cxxinitialize.c +++ b/platform/samd20-xplained/sam_cxxinitialize.c @@ -61,17 +61,17 @@ # define cxxdbg dbg # define cxxlldbg lldbg # ifdef CONFIG_DEBUG_INFO -# define cxxvdbg vdbg -# define cxxllvdbg llvdbg +# define cxxinfo info +# define cxxllinfo llinfo # else -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) # endif #else # define cxxdbg(x...) # define cxxlldbg(x...) -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) #endif /**************************************************************************** diff --git a/platform/samd21-xplained/sam_cxxinitialize.c b/platform/samd21-xplained/sam_cxxinitialize.c index 3b05662d1..39108333b 100644 --- a/platform/samd21-xplained/sam_cxxinitialize.c +++ b/platform/samd21-xplained/sam_cxxinitialize.c @@ -61,17 +61,17 @@ # define cxxdbg dbg # define cxxlldbg lldbg # ifdef CONFIG_DEBUG_INFO -# define cxxvdbg vdbg -# define cxxllvdbg llvdbg +# define cxxinfo info +# define cxxllinfo llinfo # else -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) # endif #else # define cxxdbg(x...) # define cxxlldbg(x...) -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) #endif /**************************************************************************** diff --git a/platform/same70-xplained/sam_cxxinitialize.c b/platform/same70-xplained/sam_cxxinitialize.c index 187069e8e..745a74a63 100644 --- a/platform/same70-xplained/sam_cxxinitialize.c +++ b/platform/same70-xplained/sam_cxxinitialize.c @@ -61,17 +61,17 @@ # define cxxdbg dbg # define cxxlldbg lldbg # ifdef CONFIG_DEBUG_INFO -# define cxxvdbg vdbg -# define cxxllvdbg llvdbg +# define cxxinfo info +# define cxxllinfo llinfo # else -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) # endif #else # define cxxdbg(x...) # define cxxlldbg(x...) -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) #endif /**************************************************************************** diff --git a/platform/saml21-xplained/sam_cxxinitialize.c b/platform/saml21-xplained/sam_cxxinitialize.c index ffbeac444..7d5fead2c 100644 --- a/platform/saml21-xplained/sam_cxxinitialize.c +++ b/platform/saml21-xplained/sam_cxxinitialize.c @@ -61,17 +61,17 @@ # define cxxdbg dbg # define cxxlldbg lldbg # ifdef CONFIG_DEBUG_INFO -# define cxxvdbg vdbg -# define cxxllvdbg llvdbg +# define cxxinfo info +# define cxxllinfo llinfo # else -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) # endif #else # define cxxdbg(x...) # define cxxlldbg(x...) -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) #endif /**************************************************************************** diff --git a/platform/samv71-xult/sam_cxxinitialize.c b/platform/samv71-xult/sam_cxxinitialize.c index e9ed9356f..efdff7f76 100644 --- a/platform/samv71-xult/sam_cxxinitialize.c +++ b/platform/samv71-xult/sam_cxxinitialize.c @@ -61,17 +61,17 @@ # define cxxdbg dbg # define cxxlldbg lldbg # ifdef CONFIG_DEBUG_INFO -# define cxxvdbg vdbg -# define cxxllvdbg llvdbg +# define cxxinfo info +# define cxxllinfo llinfo # else -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) # endif #else # define cxxdbg(x...) # define cxxlldbg(x...) -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) #endif /**************************************************************************** diff --git a/platform/shenzhou/stm32_cxxinitialize.c b/platform/shenzhou/stm32_cxxinitialize.c index 70ab6e958..f3dfdb106 100644 --- a/platform/shenzhou/stm32_cxxinitialize.c +++ b/platform/shenzhou/stm32_cxxinitialize.c @@ -61,17 +61,17 @@ # define cxxdbg dbg # define cxxlldbg lldbg # ifdef CONFIG_DEBUG_INFO -# define cxxvdbg vdbg -# define cxxllvdbg llvdbg +# define cxxinfo info +# define cxxllinfo llinfo # else -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) # endif #else # define cxxdbg(x...) # define cxxlldbg(x...) -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) #endif /**************************************************************************** diff --git a/platform/spark/stm32_cxxinitialize.c b/platform/spark/stm32_cxxinitialize.c index 7be868fab..dbf3bf67f 100644 --- a/platform/spark/stm32_cxxinitialize.c +++ b/platform/spark/stm32_cxxinitialize.c @@ -61,17 +61,17 @@ # define cxxdbg dbg # define cxxlldbg lldbg # ifdef CONFIG_DEBUG_INFO -# define cxxvdbg vdbg -# define cxxllvdbg llvdbg +# define cxxinfo info +# define cxxllinfo llinfo # else -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) # endif #else # define cxxdbg(x...) # define cxxlldbg(x...) -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) #endif /**************************************************************************** diff --git a/platform/stm3220g-eval/stm32_cxxinitialize.c b/platform/stm3220g-eval/stm32_cxxinitialize.c index 3123536d4..ab6044e94 100644 --- a/platform/stm3220g-eval/stm32_cxxinitialize.c +++ b/platform/stm3220g-eval/stm32_cxxinitialize.c @@ -61,17 +61,17 @@ # define cxxdbg dbg # define cxxlldbg lldbg # ifdef CONFIG_DEBUG_INFO -# define cxxvdbg vdbg -# define cxxllvdbg llvdbg +# define cxxinfo info +# define cxxllinfo llinfo # else -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) # endif #else # define cxxdbg(x...) # define cxxlldbg(x...) -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) #endif /**************************************************************************** diff --git a/platform/stm3240g-eval/stm32_cxxinitialize.c b/platform/stm3240g-eval/stm32_cxxinitialize.c index c98e897ee..0356fc6ea 100644 --- a/platform/stm3240g-eval/stm32_cxxinitialize.c +++ b/platform/stm3240g-eval/stm32_cxxinitialize.c @@ -61,17 +61,17 @@ # define cxxdbg dbg # define cxxlldbg lldbg # ifdef CONFIG_DEBUG_INFO -# define cxxvdbg vdbg -# define cxxllvdbg llvdbg +# define cxxinfo info +# define cxxllinfo llinfo # else -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) # endif #else # define cxxdbg(x...) # define cxxlldbg(x...) -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) #endif /**************************************************************************** diff --git a/platform/stm32f3discovery/stm32_cxxinitialize.c b/platform/stm32f3discovery/stm32_cxxinitialize.c index 46720754a..050930846 100644 --- a/platform/stm32f3discovery/stm32_cxxinitialize.c +++ b/platform/stm32f3discovery/stm32_cxxinitialize.c @@ -61,17 +61,17 @@ # define cxxdbg dbg # define cxxlldbg lldbg # ifdef CONFIG_DEBUG_INFO -# define cxxvdbg vdbg -# define cxxllvdbg llvdbg +# define cxxinfo info +# define cxxllinfo llinfo # else -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) # endif #else # define cxxdbg(x...) # define cxxlldbg(x...) -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) #endif /**************************************************************************** diff --git a/platform/stm32f429i-disco/stm32_cxxinitialize.c b/platform/stm32f429i-disco/stm32_cxxinitialize.c index f5e588073..c71f79cba 100644 --- a/platform/stm32f429i-disco/stm32_cxxinitialize.c +++ b/platform/stm32f429i-disco/stm32_cxxinitialize.c @@ -61,17 +61,17 @@ # define cxxdbg dbg # define cxxlldbg lldbg # ifdef CONFIG_DEBUG_INFO -# define cxxvdbg vdbg -# define cxxllvdbg llvdbg +# define cxxinfo info +# define cxxllinfo llinfo # else -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) # endif #else # define cxxdbg(x...) # define cxxlldbg(x...) -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) #endif /**************************************************************************** diff --git a/platform/stm32f4discovery/stm32_cxxinitialize.c b/platform/stm32f4discovery/stm32_cxxinitialize.c index b22e6abca..1596b3f51 100644 --- a/platform/stm32f4discovery/stm32_cxxinitialize.c +++ b/platform/stm32f4discovery/stm32_cxxinitialize.c @@ -61,17 +61,17 @@ # define cxxdbg dbg # define cxxlldbg lldbg # ifdef CONFIG_DEBUG_INFO -# define cxxvdbg vdbg -# define cxxllvdbg llvdbg +# define cxxinfo info +# define cxxllinfo llinfo # else -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) # endif #else # define cxxdbg(x...) # define cxxlldbg(x...) -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) #endif /**************************************************************************** diff --git a/platform/stm32f746g-disco/stm32_cxxinitialize.c b/platform/stm32f746g-disco/stm32_cxxinitialize.c index ab5a51014..ce83890dc 100644 --- a/platform/stm32f746g-disco/stm32_cxxinitialize.c +++ b/platform/stm32f746g-disco/stm32_cxxinitialize.c @@ -61,17 +61,17 @@ # define cxxdbg dbg # define cxxlldbg lldbg # ifdef CONFIG_DEBUG_INFO -# define cxxvdbg vdbg -# define cxxllvdbg llvdbg +# define cxxinfo info +# define cxxllinfo llinfo # else -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) # endif #else # define cxxdbg(x...) # define cxxlldbg(x...) -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) #endif /**************************************************************************** diff --git a/platform/stm32l476vg-disco/stm32_cxxinitialize.c b/platform/stm32l476vg-disco/stm32_cxxinitialize.c index 0a59c0967..6141f33f5 100644 --- a/platform/stm32l476vg-disco/stm32_cxxinitialize.c +++ b/platform/stm32l476vg-disco/stm32_cxxinitialize.c @@ -61,17 +61,17 @@ # define cxxdbg dbg # define cxxlldbg lldbg # ifdef CONFIG_DEBUG_INFO -# define cxxvdbg vdbg -# define cxxllvdbg llvdbg +# define cxxinfo info +# define cxxllinfo llinfo # else -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) # endif #else # define cxxdbg(x...) # define cxxlldbg(x...) -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) #endif /**************************************************************************** diff --git a/platform/stm32ldiscovery/stm32_cxxinitialize.c b/platform/stm32ldiscovery/stm32_cxxinitialize.c index a0b644e09..726a7c95d 100644 --- a/platform/stm32ldiscovery/stm32_cxxinitialize.c +++ b/platform/stm32ldiscovery/stm32_cxxinitialize.c @@ -61,17 +61,17 @@ # define cxxdbg dbg # define cxxlldbg lldbg # ifdef CONFIG_DEBUG_INFO -# define cxxvdbg vdbg -# define cxxllvdbg llvdbg +# define cxxinfo info +# define cxxllinfo llinfo # else -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) # endif #else # define cxxdbg(x...) # define cxxlldbg(x...) -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) #endif /**************************************************************************** diff --git a/platform/teensy-lc/kl_cxxinitialize.c b/platform/teensy-lc/kl_cxxinitialize.c index ac914ddbd..24205a24d 100644 --- a/platform/teensy-lc/kl_cxxinitialize.c +++ b/platform/teensy-lc/kl_cxxinitialize.c @@ -61,17 +61,17 @@ # define cxxdbg dbg # define cxxlldbg lldbg # ifdef CONFIG_DEBUG_INFO -# define cxxvdbg vdbg -# define cxxllvdbg llvdbg +# define cxxinfo info +# define cxxllinfo llinfo # else -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) # endif #else # define cxxdbg(x...) # define cxxlldbg(x...) -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) #endif /**************************************************************************** diff --git a/platform/viewtool-stm32f107/stm32_cxxinitialize.c b/platform/viewtool-stm32f107/stm32_cxxinitialize.c index cc619ddfe..f5058c2cf 100644 --- a/platform/viewtool-stm32f107/stm32_cxxinitialize.c +++ b/platform/viewtool-stm32f107/stm32_cxxinitialize.c @@ -61,17 +61,17 @@ # define cxxdbg dbg # define cxxlldbg lldbg # ifdef CONFIG_DEBUG_INFO -# define cxxvdbg vdbg -# define cxxllvdbg llvdbg +# define cxxinfo info +# define cxxllinfo llinfo # else -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) # endif #else # define cxxdbg(x...) # define cxxlldbg(x...) -# define cxxvdbg(x...) -# define cxxllvdbg(x...) +# define cxxinfo(x...) +# define cxxllinfo(x...) #endif /**************************************************************************** diff --git a/system/cle/cle.c b/system/cle/cle.c index 1f744cf5c..da8b79bf8 100644 --- a/system/cle/cle.c +++ b/system/cle/cle.c @@ -115,10 +115,10 @@ # endif # if CONFIG_SYSTEM_CLE_DEBUGLEVEL > 1 -# define clevdbg(format, ...) \ +# define cleinfo(format, ...) \ syslog(LOG_DEBUG, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__) # else -# define clevdbg(x...) +# define cleinfo(x...) # endif #else # if CONFIG_SYSTEM_CLE_DEBUGLEVEL > 0 @@ -128,9 +128,9 @@ # endif # if CONFIG_SYSTEM_CLE_DEBUGLEVEL > 1 -# define clevdbg cle_debug +# define cleinfo cle_debug # else -# define clevdbg (void) +# define cleinfo (void) # endif #endif @@ -250,7 +250,7 @@ static void cle_write(FAR struct cle_s *priv, FAR const char *buffer, ssize_t nwritten; uint16_t nremaining = buflen; - //clevdbg("buffer=%p buflen=%d\n", buffer, (int)buflen); + //cleinfo("buffer=%p buflen=%d\n", buffer, (int)buflen); /* Loop until all bytes have been successfully written (or until a * unrecoverable error is encountered) @@ -346,7 +346,7 @@ static int cle_getch(FAR struct cle_s *priv) /* On success, return the character that was read */ - clevdbg("Returning: %c[%02x]\n", isprint(buffer) ? buffer : '.', buffer); + cleinfo("Returning: %c[%02x]\n", isprint(buffer) ? buffer : '.', buffer); return buffer; } @@ -393,7 +393,7 @@ static void cle_setcursor(FAR struct cle_s *priv, uint16_t column) char buffer[16]; int len; - clevdbg("row=%d column=%d offset=%d\n", priv->row, column, priv->coloffs); + cleinfo("row=%d column=%d offset=%d\n", priv->row, column, priv->coloffs); /* Format the cursor position command. The origin is (1,1). */ @@ -524,7 +524,7 @@ static int cle_getcursor(FAR struct cle_s *priv, FAR uint16_t *prow, } } - clevdbg("row=%ld column=%ld\n", row, column); + cleinfo("row=%ld column=%ld\n", row, column); /* Make sure that the values are within range */ @@ -569,7 +569,7 @@ static bool cle_opentext(FAR struct cle_s *priv, uint16_t pos, { int i; - clevdbg("pos=%ld increment=%ld\n", (long)pos, (long)increment); + cleinfo("pos=%ld increment=%ld\n", (long)pos, (long)increment); /* Check if there is space in the line buffer to open up a region the size * of 'increment' @@ -609,7 +609,7 @@ static void cle_closetext(FAR struct cle_s *priv, uint16_t pos, uint16_t size) { int i; - clevdbg("pos=%ld size=%ld\n", (long)pos, (long)size); + cleinfo("pos=%ld size=%ld\n", (long)pos, (long)size); /* Close up the gap to remove 'size' characters at 'pos' */ @@ -714,7 +714,7 @@ static void cle_showtext(FAR struct cle_s *priv) static void cle_insertch(FAR struct cle_s *priv, char ch) { - clevdbg("curpos=%ld ch=%c[%02x]\n", priv->curpos, isprint(ch) ? ch : '.', ch); + cleinfo("curpos=%ld ch=%c[%02x]\n", priv->curpos, isprint(ch) ? ch : '.', ch); /* Make space in the buffer for the new character */ @@ -953,7 +953,7 @@ int cle(FAR char *line, uint16_t linelen, FILE *instream, FILE *outstream) priv.coloffs = column - 1; - clevdbg("row=%d column=%d\n", priv.row, column); + cleinfo("row=%d column=%d\n", priv.row, column); /* The editor loop */ diff --git a/system/nxplayer/nxplayer.c b/system/nxplayer/nxplayer.c index 123be07ef..5fbb0006f 100644 --- a/system/nxplayer/nxplayer.c +++ b/system/nxplayer/nxplayer.c @@ -519,7 +519,7 @@ static int nxplayer_readbuffer(FAR struct nxplayer_s *pPlayer, int errcode = errno; int readerror = ferror(pPlayer->fileFd); - audvdbg("Closing audio file, nbytes=%d readerr=%d\n", + audinfo("Closing audio file, nbytes=%d readerr=%d\n", apb->nbytes, readerror); #endif @@ -639,7 +639,7 @@ static void *nxplayer_playthread(pthread_addr_t pvarg) int x; int ret; - audvdbg("Entry\n"); + audinfo("Entry\n"); /* Query the audio device for it's preferred buffer size / qty */ @@ -783,7 +783,7 @@ static void *nxplayer_playthread(pthread_addr_t pvarg) } } - audvdbg("%d buffers queued, running=%d streaming=%d\n", + audinfo("%d buffers queued, running=%d streaming=%d\n", x, running, streaming); /* Start the audio device */ @@ -849,7 +849,7 @@ static void *nxplayer_playthread(pthread_addr_t pvarg) * (3) Terminate playing by sending the AUDIO_MSG_COMPLETE message. */ - audvdbg("%s\n", running ? "Playing..." : "Not runnning"); + audinfo("%s\n", running ? "Playing..." : "Not runnning"); while (running) { /* Wait for a signal either from the Audio driver that it needs @@ -946,7 +946,7 @@ static void *nxplayer_playthread(pthread_addr_t pvarg) case AUDIO_MSG_STOP: /* Send a stop message to the device */ - audvdbg("Stopping! outstanding=%d\n", outstanding); + audinfo("Stopping! outstanding=%d\n", outstanding); #ifdef CONFIG_AUDIO_MULTI_SESSION ioctl(pPlayer->devFd, AUDIOIOC_STOP, @@ -965,7 +965,7 @@ static void *nxplayer_playthread(pthread_addr_t pvarg) /* Message indicating the playback is complete */ case AUDIO_MSG_COMPLETE: - audvdbg("Play complete. outstanding=%d\n", outstanding); + audinfo("Play complete. outstanding=%d\n", outstanding); DEBUGASSERT(outstanding == 0); running = false; break; @@ -980,7 +980,7 @@ static void *nxplayer_playthread(pthread_addr_t pvarg) /* Release our audio buffers and unregister / release the device */ err_out: - audvdbg("Clean-up and exit\n"); + audinfo("Clean-up and exit\n"); /* Unregister the message queue and release the session */ @@ -999,7 +999,7 @@ err_out: #ifdef CONFIG_AUDIO_DRIVER_SPECIFIC_BUFFERS if (pBuffers != NULL) { - audvdbg("Freeing buffers\n"); + audinfo("Freeing buffers\n"); for (x = 0; x < buf_info.nbuffers; x++) { /* Fill in the buffer descriptor struct to issue a free request */ @@ -1016,7 +1016,7 @@ err_out: free(pBuffers); } #else - audvdbg("Freeing buffers\n"); + audinfo("Freeing buffers\n"); for (x = 0; x < CONFIG_AUDIO_NUM_BUFFERS; x++) { /* Fill in the buffer descriptor struct to issue a free request */ @@ -1052,7 +1052,7 @@ err_out: nxplayer_release(pPlayer); - audvdbg("Exit\n"); + audinfo("Exit\n"); return NULL; } @@ -1661,9 +1661,9 @@ int nxplayer_playfile(FAR struct nxplayer_s *pPlayer, return -EBUSY; } - audvdbg("==============================\n"); - audvdbg("Playing file %s\n", pFilename); - audvdbg("==============================\n"); + audinfo("==============================\n"); + audinfo("Playing file %s\n", pFilename); + audinfo("==============================\n"); /* Test that the specified file exists */ diff --git a/system/prun/prun.c b/system/prun/prun.c index d1af40bfb..59dc29b4c 100644 --- a/system/prun/prun.c +++ b/system/prun/prun.c @@ -99,7 +99,7 @@ int prun(FAR char *exepath, size_t varsize, size_t strsize) return -ENOEXEC; } - bvdbg("Loaded %s\n", exepath); + binfo("Loaded %s\n", exepath); /* Execute the P-Code program until a stopping condition occurs */ @@ -124,7 +124,7 @@ int prun(FAR char *exepath, size_t varsize, size_t strsize) /* Clean up resources used by the interpreter */ - bvdbg("Execution terminated\n"); + binfo("Execution terminated\n"); pexec_release(st); return ret; } diff --git a/system/ubloxmodem/ubloxmodem_main.c b/system/ubloxmodem/ubloxmodem_main.c index bec4d1fdf..d5beedd90 100644 --- a/system/ubloxmodem/ubloxmodem_main.c +++ b/system/ubloxmodem/ubloxmodem_main.c @@ -60,14 +60,14 @@ #ifdef CONFIG_MODEM_U_BLOX_DEBUG # define m_dbg dbg -# define m_vdbg vdbg +# define m_info info # define m_vlldbg lldbg -# define m_vllvdbg llvdbg +# define m_vllinfo llinfo #else # define m_dbg(x...) -# define m_vdbg(x...) +# define m_info(x...) # define m_lldbg(x...) -# define m_llvdbg(x...) +# define m_llinfo(x...) #endif #define UBLOXMODEM_MAX_REGISTERS 16 @@ -131,14 +131,14 @@ static int ubloxmodem_open_tty(void) fd = open(CONFIG_SYSTEM_UBLOXMODEM_TTY_DEVNODE, O_RDWR); if (fd < 0) { - m_vdbg("failed to open TTY\n"); + m_info("failed to open TTY\n"); return fd; } ret = make_nonblock(fd); if (ret < 0) { - m_vdbg("make_nonblock failed\n"); + m_info("make_nonblock failed\n"); close(fd); return ret; } @@ -158,14 +158,14 @@ static int chat_readb(int fd, FAR char* dst, int timeout_ms) ret = poll(&fds, 1, timeout_ms); if (ret <= 0) { - m_vdbg("poll timed out\n"); + m_info("poll timed out\n"); return -ETIMEDOUT; } ret = read(fd, dst, 1); if (ret != 1) { - m_vdbg("read failed\n"); + m_info("read failed\n"); return -EPERM; } @@ -196,7 +196,7 @@ static int chat_match_response(int fd, FAR char* response, int timeout_ms) } else { - m_vdbg("expected %c (0x%02X), got %c (0x%02X)\n", + m_info("expected %c (0x%02X), got %c (0x%02X)\n", *response, *response, c, c); return -EILSEQ; } @@ -230,7 +230,7 @@ static int chat_single(int fd, FAR char* cmd, FAR char* resp) ret = chat_match_response(fd, cmd, 5 * 1000); if (ret < 0) { - m_vdbg("invalid echo\n"); + m_info("invalid echo\n"); return ret; } diff --git a/system/vi/vi.c b/system/vi/vi.c index 6289ee219..63ff0b902 100644 --- a/system/vi/vi.c +++ b/system/vi/vi.c @@ -160,10 +160,10 @@ # endif # if CONFIG_SYSTEM_VI_DEBUGLEVEL > 1 -# define vivdbg(format, ...) \ +# define viinfo(format, ...) \ syslog(LOG_DEBUG, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__) # else -# define vivdbg(x...) +# define viinfo(x...) # endif #else # if CONFIG_SYSTEM_VI_DEBUGLEVEL > 0 @@ -175,9 +175,9 @@ # endif # if CONFIG_SYSTEM_VI_DEBUGLEVEL > 1 -# define vivdbg vi_debug +# define viinfo vi_debug # else -# define vivdbg (void) +# define viinfo (void) # endif #endif @@ -494,7 +494,7 @@ static void vi_write(FAR struct vi_s *vi, FAR const char *buffer, ssize_t nwritten; size_t nremaining = buflen; - //vivdbg("buffer=%p buflen=%d\n", buffer, (int)buflen); + //viinfo("buffer=%p buflen=%d\n", buffer, (int)buflen); /* Loop until all bytes have been successfully written (or until a * unrecoverable error is encountered) @@ -592,7 +592,7 @@ static char vi_getch(FAR struct vi_s *vi) /* On success, return the character that was read */ - vivdbg("Returning: %c[%02x]\n", isprint(buffer) ? buffer : '.', buffer); + viinfo("Returning: %c[%02x]\n", isprint(buffer) ? buffer : '.', buffer); return buffer; } @@ -718,7 +718,7 @@ static void vi_setcursor(FAR struct vi_s *vi, uint16_t row, uint16_t column) char buffer[16]; int len; - vivdbg("row=%d column=%d\n", row, column); + viinfo("row=%d column=%d\n", row, column); /* Format the cursor position command. The origin is (1,1). */ @@ -772,7 +772,7 @@ static void vi_clrscreen(FAR struct vi_s *vi) static void vi_scrollup(FAR struct vi_s *vi, uint16_t nlines) { - vivdbg("nlines=%d\n", nlines); + viinfo("nlines=%d\n", nlines); /* Scroll for the specified number of lines */ @@ -794,7 +794,7 @@ static void vi_scrollup(FAR struct vi_s *vi, uint16_t nlines) static void vi_scrolldown(FAR struct vi_s *vi, uint16_t nlines) { - vivdbg("nlines=%d\n", nlines); + viinfo("nlines=%d\n", nlines); /* Scroll for the specified number of lines */ @@ -883,7 +883,7 @@ static off_t vi_linebegin(FAR struct vi_s *vi, off_t pos) pos--; } - vivdbg("Return pos=%ld\n", (long)pos); + viinfo("Return pos=%ld\n", (long)pos); return pos; } @@ -910,7 +910,7 @@ static off_t vi_prevline(FAR struct vi_s *vi, off_t pos) pos = vi_linebegin(vi, pos - 1); } - vivdbg("Return pos=%ld\n", (long)pos); + viinfo("Return pos=%ld\n", (long)pos); return pos; } @@ -933,7 +933,7 @@ static off_t vi_lineend(FAR struct vi_s *vi, off_t pos) pos++; } - vivdbg("Return pos=%ld\n", (long)pos); + viinfo("Return pos=%ld\n", (long)pos); return pos; } @@ -960,7 +960,7 @@ static off_t vi_nextline(FAR struct vi_s *vi, off_t pos) pos++; } - vivdbg("Return pos=%ld\n", (long)pos); + viinfo("Return pos=%ld\n", (long)pos); return pos; } @@ -982,7 +982,7 @@ static bool vi_extendtext(FAR struct vi_s *vi, off_t pos, size_t increment) FAR char *alloc; int i; - vivdbg("pos=%ld increment=%ld\n", (long)pos, (long)increment); + viinfo("pos=%ld increment=%ld\n", (long)pos, (long)increment); /* Check if we need to reallocate */ @@ -1041,7 +1041,7 @@ static bool vi_extendtext(FAR struct vi_s *vi, off_t pos, size_t increment) static void vi_shrinkpos(off_t delpos, size_t delsize, FAR off_t *pos) { - vivdbg("delpos=%ld delsize=%ld pos=%ld\n", + viinfo("delpos=%ld delsize=%ld pos=%ld\n", (long)delpos, (long)delsize, (long)*pos); /* Check if the position is beyond the deleted region */ @@ -1079,7 +1079,7 @@ static void vi_shrinktext(FAR struct vi_s *vi, off_t pos, size_t size) size_t allocsize; int i; - vivdbg("pos=%ld size=%ld\n", (long)pos, (long)size); + viinfo("pos=%ld size=%ld\n", (long)pos, (long)size); /* Close up the gap to remove 'size' characters at 'pos' */ @@ -1137,7 +1137,7 @@ static bool vi_insertfile(FAR struct vi_s *vi, off_t pos, int result; bool ret; - vivdbg("pos=%ld filename=\"%s\"\n", (long)pos, filename); + viinfo("pos=%ld filename=\"%s\"\n", (long)pos, filename); /* Get the size of the file */ @@ -1208,7 +1208,7 @@ static bool vi_savetext(FAR struct vi_s *vi, FAR const char *filename, FILE *stream; size_t nwritten; - vivdbg("filename=\"%s\" pos=%ld size=%ld\n", + viinfo("filename=\"%s\" pos=%ld size=%ld\n", filename, (long)pos, (long)size); /* Open the file for writing */ @@ -1251,7 +1251,7 @@ static bool vi_checkfile(FAR struct vi_s *vi, FAR const char *filename) struct stat buf; int ret; - vivdbg("filename=\"%s\"\n", filename); + viinfo("filename=\"%s\"\n", filename); /* Get the size of the file */ @@ -1293,7 +1293,7 @@ static bool vi_checkfile(FAR struct vi_s *vi, FAR const char *filename) static void vi_setmode(FAR struct vi_s *vi, uint8_t mode, long value) { - vivdbg("mode=%d value=%ld\n", mode, value); + viinfo("mode=%d value=%ld\n", mode, value); /* Set the mode and clear mode-dependent states that are not preserved * across mode changes. @@ -1320,7 +1320,7 @@ static void vi_setmode(FAR struct vi_s *vi, uint8_t mode, long value) static void vi_setsubmode(FAR struct vi_s *vi, uint8_t mode, char prompt, long value) { - vivdbg("mode=%d prompt='%c' value=%ld\n", mode, prompt, value); + viinfo("mode=%d prompt='%c' value=%ld\n", mode, prompt, value); /* Set up the new mode */ @@ -1362,7 +1362,7 @@ static void vi_setsubmode(FAR struct vi_s *vi, uint8_t mode, char prompt, static void vi_exitsubmode(FAR struct vi_s *vi, uint8_t mode) { - vivdbg("mode=%d\n", mode); + viinfo("mode=%d\n", mode); /* Set up the new mode */ @@ -1394,7 +1394,7 @@ static void vi_windowpos(FAR struct vi_s *vi, off_t start, off_t end, uint16_t column; off_t pos; - vivdbg("start=%ld end=%ld\n", (long)start, (long)end); + viinfo("start=%ld end=%ld\n", (long)start, (long)end); /* Make sure that the end position is not beyond the end of the text. We * assume that the start position is okay. @@ -1588,7 +1588,7 @@ static void vi_scrollcheck(FAR struct vi_s *vi) */ vi->prevpos = vi->winpos; - vivdbg("winpos=%ld hscroll=%d\n", + viinfo("winpos=%ld hscroll=%d\n", (long)vi->winpos, (long)vi->hscroll); } @@ -1754,7 +1754,7 @@ static void vi_cusorup(FAR struct vi_s *vi, int nlines) off_t start; off_t end; - vivdbg("nlines=%d\n", nlines); + viinfo("nlines=%d\n", nlines); /* How many lines do we need to move? Zero means 1 (so does 1) */ @@ -1795,7 +1795,7 @@ static void vi_cursordown(FAR struct vi_s *vi, int nlines) off_t start; off_t end; - vivdbg("nlines=%d\n", nlines); + viinfo("nlines=%d\n", nlines); /* How many lines do we need to move? Zero means 1 (so does 1) */ @@ -1836,7 +1836,7 @@ static off_t vi_cursorleft(FAR struct vi_s *vi, off_t curpos, int ncolumns) { int remaining; - vivdbg("curpos=%ld ncolumns=%d\n", curpos, ncolumns); + viinfo("curpos=%ld ncolumns=%d\n", curpos, ncolumns); /* Loop decrementing the cursor position for each repetition count. Break * out early if we hit either the beginning of the text buffer, or the end @@ -1864,7 +1864,7 @@ static off_t vi_cursorright(FAR struct vi_s *vi, off_t curpos, int ncolumns) { int remaining; - vivdbg("curpos=%ld ncolumns=%d\n", curpos, ncolumns); + viinfo("curpos=%ld ncolumns=%d\n", curpos, ncolumns); /* Loop incrementing the cursor position for each repetition count. Break * out early if we hit either the end of the text buffer, or the end of the line. @@ -1890,7 +1890,7 @@ static void vi_delforward(FAR struct vi_s *vi) off_t end; size_t size; - vivdbg("curpos=%ld value=%ld\n", (long)vi->curpos, vi->value); + viinfo("curpos=%ld value=%ld\n", (long)vi->curpos, vi->value); /* Get the cursor position as if we would have move the cursor right N * times (which might be curpos, vi->value); + viinfo("curpos=%ld value=%ld\n", (long)vi->curpos, vi->value); /* Back up one character. This is where the deletion will end */ @@ -1992,7 +1992,7 @@ static void vi_delline(FAR struct vi_s *vi) */ vi_linerange(vi, &start, &end); - vivdbg("start=%ld end=%ld\n", (long)start, (long)end); + viinfo("start=%ld end=%ld\n", (long)start, (long)end); /* Remove the text from the text buffer */ @@ -2019,7 +2019,7 @@ static void vi_yank(FAR struct vi_s *vi) */ vi_linerange(vi, &start, &end); - vivdbg("start=%ld end=%ld\n", (long)start, (long)end); + viinfo("start=%ld end=%ld\n", (long)start, (long)end); /* Free any previously yanked lines */ @@ -2062,7 +2062,7 @@ static void vi_paste(FAR struct vi_s *vi) { off_t start; - vivdbg("curpos=%ld yankalloc=%d\n", (long)vi->curpos, (long)vi->yankalloc); + viinfo("curpos=%ld yankalloc=%d\n", (long)vi->curpos, (long)vi->yankalloc); /* Make sure there is something to be yanked */ @@ -2108,7 +2108,7 @@ static void vi_paste(FAR struct vi_s *vi) static void vi_gotoline(FAR struct vi_s *vi) { - vivdbg("curpos=%ld value=%ld\n", (long)vi->curpos, vi->value); + viinfo("curpos=%ld value=%ld\n", (long)vi->curpos, vi->value); /* Special case the first line */ @@ -2153,7 +2153,7 @@ static void vi_gotoline(FAR struct vi_s *vi) static void vi_cmd_mode(FAR struct vi_s *vi) { - vivdbg("Enter command mode\n"); + viinfo("Enter command mode\n"); /* Loop while we are in command mode */ @@ -2205,7 +2205,7 @@ static void vi_cmd_mode(FAR struct vi_s *vi) vi->value = tmp; - vivdbg("Value=%ld\n", vi->value); + viinfo("Value=%ld\n", vi->value); continue; } @@ -2468,7 +2468,7 @@ static void vi_cmdch(FAR struct vi_s *vi, char ch) int index = vi->cmdlen; int next = index + 1; - vivdbg("cmdlen=%d ch=%c[%02x]\n", vi->cmdlen, isprint(ch) ? ch : '.', ch); + viinfo("cmdlen=%d ch=%c[%02x]\n", vi->cmdlen, isprint(ch) ? ch : '.', ch); /* Abort gracelessly if the scratch buffer becomes full */ @@ -2502,7 +2502,7 @@ static void vi_cmdch(FAR struct vi_s *vi, char ch) static void vi_cmdbackspace(FAR struct vi_s *vi) { - vivdbg("cmdlen=%d\n", vi->cmdlen); + viinfo("cmdlen=%d\n", vi->cmdlen); if (vi->cmdlen > 0) { @@ -2540,7 +2540,7 @@ static void vi_parsecolon(FAR struct vi_s *vi) int col; int ch; - vivdbg("Parse: \"%s\"\n", vi->scratch); + viinfo("Parse: \"%s\"\n", vi->scratch); /* NUL terminate the command */ @@ -2679,7 +2679,7 @@ static void vi_parsecolon(FAR struct vi_s *vi) * A filename where one is not needed is also an error. */ - vivdbg("cmd=%d filename=\"%s\"\n", cmd, vi->filename); + viinfo("cmd=%d filename=\"%s\"\n", cmd, vi->filename); if (cmd == CMD_NONE || (IS_READ(cmd) && !filename) || (!USES_FILE(cmd) && filename)) @@ -2838,7 +2838,7 @@ static void vi_cmd_submode(FAR struct vi_s *vi) { int ch; - vivdbg("Enter colon command sub-mode\n"); + viinfo("Enter colon command sub-mode\n"); /* Loop while we are in colon command mode */ @@ -2941,7 +2941,7 @@ static bool vi_findstring(FAR struct vi_s *vi) off_t pos; int len; - vivdbg("findstr: \"%s\"\n", vi->findstr); + viinfo("findstr: \"%s\"\n", vi->findstr); /* The search string is in the find buffer */ @@ -2997,7 +2997,7 @@ static void vi_parsefind(FAR struct vi_s *vi) * string from the previous find operation. */ - vivdbg("scratch: \"%s\"\n", vi->scratch); + viinfo("scratch: \"%s\"\n", vi->scratch); if (vi->cmdlen > 0) { @@ -3033,7 +3033,7 @@ static void vi_find_submode(FAR struct vi_s *vi) { int ch; - vivdbg("Enter find sub-mode\n"); + viinfo("Enter find sub-mode\n"); /* Loop while we are in find mode */ @@ -3133,7 +3133,7 @@ static void vi_find_submode(FAR struct vi_s *vi) static void vi_replacech(FAR struct vi_s *vi, char ch) { - vivdbg("curpos=%ld ch=%c[%02x]\n", vi->curpos, isprint(ch) ? ch : '.', ch); + viinfo("curpos=%ld ch=%c[%02x]\n", vi->curpos, isprint(ch) ? ch : '.', ch); /* Is there a newline at the current cursor position? */ @@ -3170,7 +3170,7 @@ static void vi_replacech_submode(FAR struct vi_s *vi) nchars = (vi->value > 0 ? vi->value : 1); - vivdbg("Enter replaces character(s) sub-mode: nchars=%d\n", nchars); + viinfo("Enter replaces character(s) sub-mode: nchars=%d\n", nchars); /* Are there that many characters left on the line to be replaced? */ @@ -3284,7 +3284,7 @@ static void vi_replacech_submode(FAR struct vi_s *vi) static void vi_insertch(FAR struct vi_s *vi, char ch) { - vivdbg("curpos=%ld ch=%c[%02x]\n", vi->curpos, isprint(ch) ? ch : '.', ch); + viinfo("curpos=%ld ch=%c[%02x]\n", vi->curpos, isprint(ch) ? ch : '.', ch); /* Make space in the buffer for the new character */ @@ -3308,7 +3308,7 @@ static void vi_insert_mode(FAR struct vi_s *vi) { int ch; - vivdbg("Enter insert mode\n"); + viinfo("Enter insert mode\n"); /* Loop while we are in insert mode */ @@ -3427,7 +3427,7 @@ static void vi_replace_mode(FAR struct vi_s *vi) off_t start = vi->curpos; int ch; - vivdbg("Enter replace mode\n"); + viinfo("Enter replace mode\n"); /* Loop until ESC is pressed */ @@ -3716,7 +3716,7 @@ int vi_main(int argc, char **argv) { /* We loop, processing each mode change */ - vivdbg("mode=%d\n", vi->mode); + viinfo("mode=%d\n", vi->mode); switch (vi->mode) { From 468bdcf8e6247e1f8032a87a0093566a79e16156 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 11 Jun 2016 14:13:39 -0600 Subject: [PATCH 45/74] Rename CONFIG_DEBUG to CONFIG_DEBUG_FEATURES --- examples/README.txt | 6 +- examples/cc3000/telnetd_daemon.c | 2 +- examples/cc3000/telnetd_driver.c | 2 +- examples/elf/elf_main.c | 6 +- examples/helloxx/helloxx_main.cxx | 2 +- examples/nxflat/nxflat_main.c | 6 +- examples/ostest/ostest.h | 4 +- examples/posix_spawn/spawn_main.c | 6 +- examples/usbserial/Kconfig | 10 +- examples/usbterm/Kconfig | 10 +- graphics/tiff/tiff_initialize.c | 4 +- netutils/ftpc/Kconfig | 2 +- netutils/ftpc/ftpc_connect.c | 6 +- netutils/ftpc/ftpc_putfile.c | 4 +- netutils/telnetd/telnetd_daemon.c | 2 +- netutils/tftpc/tftpc_get.c | 2 +- netutils/tftpc/tftpc_internal.h | 2 +- netutils/tftpc/tftpc_packets.c | 2 +- netutils/tftpc/tftpc_put.c | 2 +- netutils/thttpd/Kconfig | 2 +- netutils/thttpd/config.h | 2 +- netutils/thttpd/libhttpd.c | 10 +- netutils/webserver/httpd.c | 4 +- nshlib/Kconfig | 14 +- nshlib/nsh_usbkeyboard.c | 2 +- platform/arduino-due/sam_cxxinitialize.c | 2 +- platform/cloudctrl/stm32_cxxinitialize.c | 2 +- platform/fire-stm32v2/stm32_cxxinitialize.c | 2 +- platform/mikroe-stm32f4/stm32_cxxinitialize.c | 2 +- platform/nucleo-144/stm32_cxxinitialize.c | 2 +- platform/nucleo-f303re/stm32_cxxinitialize.c | 2 +- platform/nucleo-f4x1re/stm32_cxxinitialize.c | 2 +- platform/nucleo-l476rg/stm32_cxxinitialize.c | 2 +- .../olimex-stm32-h405/stm32_cxxinitialize.c | 2 +- .../olimex-stm32-h407/stm32_cxxinitialize.c | 2 +- .../olimex-stm32-p207/stm32_cxxinitialize.c | 2 +- .../olimexino-stm32/stm32_cxxinitialize.c | 2 +- platform/pcduino-a10/a1x_cxxinitialize.c | 2 +- platform/sabre-6quad/imx_cxxinitialize.c | 2 +- platform/sam3u-ek/sam_cxxinitialized.c | 2 +- platform/sam4e-ek/sam_cxxinitialize.c | 2 +- platform/sam4l-xplained/sam_cxxinitialize.c | 2 +- .../sam4s-xplained-pro/sam_cxxinitialize.c | 2 +- platform/sam4s-xplained/sam_cxxinitialize.c | 2 +- platform/sama5d2-xult/sam_cxxinitialize.c | 2 +- platform/sama5d3-xplained/sam_cxxinitialize.c | 2 +- platform/sama5d3x-ek/sam_cxxinitialize.c | 2 +- platform/sama5d4-ek/sam_cxxinitialize.c | 2 +- platform/samd20-xplained/sam_cxxinitialize.c | 2 +- platform/samd21-xplained/sam_cxxinitialize.c | 2 +- platform/same70-xplained/sam_cxxinitialize.c | 2 +- platform/saml21-xplained/sam_cxxinitialize.c | 2 +- platform/samv71-xult/sam_cxxinitialize.c | 2 +- platform/shenzhou/stm32_cxxinitialize.c | 2 +- platform/spark/stm32_cxxinitialize.c | 2 +- platform/stm3220g-eval/stm32_cxxinitialize.c | 2 +- platform/stm3240g-eval/stm32_cxxinitialize.c | 2 +- .../stm32f3discovery/stm32_cxxinitialize.c | 2 +- .../stm32f429i-disco/stm32_cxxinitialize.c | 2 +- .../stm32f4discovery/stm32_cxxinitialize.c | 2 +- .../stm32f746g-disco/stm32_cxxinitialize.c | 2 +- .../stm32l476vg-disco/stm32_cxxinitialize.c | 2 +- .../stm32ldiscovery/stm32_cxxinitialize.c | 2 +- platform/teensy-lc/kl_cxxinitialize.c | 2 +- .../viewtool-stm32f107/stm32_cxxinitialize.c | 2 +- system/cdcacm/Kconfig | 10 +- system/cdcacm/README.txt | 86 ++++----- system/composite/Kconfig | 10 +- system/composite/README.txt | 152 ++++++++-------- system/nxplayer/nxplayer.c | 12 +- system/usbmsc/Kconfig | 10 +- system/usbmsc/README.txt | 164 +++++++++--------- system/zmodem/Makefile.host | 4 +- system/zmodem/README.txt | 2 +- 74 files changed, 322 insertions(+), 322 deletions(-) diff --git a/examples/README.txt b/examples/README.txt index e5b0e9e55..bd053d634 100644 --- a/examples/README.txt +++ b/examples/README.txt @@ -484,7 +484,7 @@ examples/ftpc You may also want to define the following in your configuration file. Otherwise, you will have not feeback about what is going on: - CONFIG_DEBUG=y + CONFIG_DEBUG_FEATURES=y CONFIG_DEBUG_INFO=y CONFIG_DEBUG_FTPC=y @@ -2089,7 +2089,7 @@ examples/usbserial CONFIG_EXAMPLES_USBSERIAL_ONLYBIG Send only large, multi-packet messages. Default: Send large and small. - If CONFIG_USBDEV_TRACE is enabled (or CONFIG_DEBUG and CONFIG_DEBUG_USB), then + If CONFIG_USBDEV_TRACE is enabled (or CONFIG_DEBUG_FEATURES and CONFIG_DEBUG_USB), then the example code will also manage the USB trace output. The amount of trace output can be controlled using: @@ -2184,7 +2184,7 @@ examples/usbterm CONFIG_EXAMPLES_USBTERM_BUFLEN - The size of the input and output buffers used for receiving data. Default 256 bytes. - If CONFIG_USBDEV_TRACE is enabled (or CONFIG_DEBUG and CONFIG_DEBUG_USB, or + If CONFIG_USBDEV_TRACE is enabled (or CONFIG_DEBUG_FEATURES and CONFIG_DEBUG_USB, or CONFIG_USBDEV_TRACE), then the example code will also manage the USB trace output. The amount of trace output can be controlled using: diff --git a/examples/cc3000/telnetd_daemon.c b/examples/cc3000/telnetd_daemon.c index 5b9ed2ab9..1e2cb0392 100644 --- a/examples/cc3000/telnetd_daemon.c +++ b/examples/cc3000/telnetd_daemon.c @@ -165,7 +165,7 @@ static int telnetd_daemon(int argc, char *argv[]) * being available. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES close(0); close(1); close(2); diff --git a/examples/cc3000/telnetd_driver.c b/examples/cc3000/telnetd_driver.c index c890ae418..d1a0bc753 100644 --- a/examples/cc3000/telnetd_driver.c +++ b/examples/cc3000/telnetd_driver.c @@ -180,7 +180,7 @@ static inline void telnetd_dumpbuffer(FAR const char *msg, FAR const char *buffer, unsigned int nbytes) { - /* CONFIG_DEBUG, CONFIG_DEBUG_INFO, and CONFIG_DEBUG_NET have to be + /* CONFIG_DEBUG_FEATURES, CONFIG_DEBUG_INFO, and CONFIG_DEBUG_NET have to be * defined or the following does nothing. */ diff --git a/examples/elf/elf_main.c b/examples/elf/elf_main.c index 322ba83c9..bb8c95d72 100644 --- a/examples/elf/elf_main.c +++ b/examples/elf/elf_main.c @@ -100,12 +100,12 @@ # define CONFIG_EXAMPLES_ELF_DEVPATH "/dev/ram0" #endif -/* If CONFIG_DEBUG is enabled, use dbg instead of printf so that the +/* If CONFIG_DEBUG_FEATURES is enabled, use dbg instead of printf so that the * output will be synchronous with the debug output. */ #ifdef CONFIG_CPP_HAVE_VARARGS -# ifdef CONFIG_DEBUG +# ifdef CONFIG_DEBUG_FEATURES # define message(format, ...) dbg(format, ##__VA_ARGS__) # define err(format, ...) dbg(format, ##__VA_ARGS__) # else @@ -113,7 +113,7 @@ # define err(format, ...) fprintf(stderr, format, ##__VA_ARGS__) # endif #else -# ifdef CONFIG_DEBUG +# ifdef CONFIG_DEBUG_FEATURES # define message dbg # define err dbg # else diff --git a/examples/helloxx/helloxx_main.cxx b/examples/helloxx/helloxx_main.cxx index 909e8b31d..064ec121d 100644 --- a/examples/helloxx/helloxx_main.cxx +++ b/examples/helloxx/helloxx_main.cxx @@ -58,7 +58,7 @@ // Debug ******************************************************************** // Non-standard debug that may be enabled just for testing the constructors -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_DEBUG_CXX #endif diff --git a/examples/nxflat/nxflat_main.c b/examples/nxflat/nxflat_main.c index a584a675a..e4190c6ab 100644 --- a/examples/nxflat/nxflat_main.c +++ b/examples/nxflat/nxflat_main.c @@ -96,12 +96,12 @@ #define ROMFSDEV "/dev/ram0" #define MOUNTPT "/mnt/romfs" -/* If CONFIG_DEBUG is enabled, use dbg instead of printf so that the +/* If CONFIG_DEBUG_FEATURES is enabled, use dbg instead of printf so that the * output will be synchronous with the debug output. */ #ifdef CONFIG_CPP_HAVE_VARARGS -# ifdef CONFIG_DEBUG +# ifdef CONFIG_DEBUG_FEATURES # define message(format, ...) dbg(format, ##__VA_ARGS__) # define err(format, ...) dbg(format, ##__VA_ARGS__) # else @@ -109,7 +109,7 @@ # define err(format, ...) fprintf(stderr, format, ##__VA_ARGS__) # endif #else -# ifdef CONFIG_DEBUG +# ifdef CONFIG_DEBUG_FEATURES # define message dbg # define err dbg # else diff --git a/examples/ostest/ostest.h b/examples/ostest/ostest.h index a5af19afa..61e7ef433 100644 --- a/examples/ostest/ostest.h +++ b/examples/ostest/ostest.h @@ -73,7 +73,7 @@ /* Priority inheritance */ -#if defined(CONFIG_DEBUG) && defined(CONFIG_PRIORITY_INHERITANCE) && defined(CONFIG_SEM_PHDEBUG) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_PRIORITY_INHERITANCE) && defined(CONFIG_SEM_PHDEBUG) # define dump_nfreeholders(s) printf(s " nfreeholders: %d\n", sem_nfreeholders()) #else # define dump_nfreeholders(s) @@ -215,7 +215,7 @@ int vfork_test(void); * priority inheritance */ -#if defined(CONFIG_DEBUG) && defined(CONFIG_PRIORITY_INHERITANCE) && defined(CONFIG_SEM_PHDEBUG) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_PRIORITY_INHERITANCE) && defined(CONFIG_SEM_PHDEBUG) void sem_enumholders(FAR sem_t *sem); int sem_nfreeholders(void); #else diff --git a/examples/posix_spawn/spawn_main.c b/examples/posix_spawn/spawn_main.c index fbd9dc65e..6cc47f08b 100644 --- a/examples/posix_spawn/spawn_main.c +++ b/examples/posix_spawn/spawn_main.c @@ -103,12 +103,12 @@ # define CONFIG_EXAMPLES_ELF_DEVPATH "/dev/ram0" #endif -/* If CONFIG_DEBUG is enabled, use dbg instead of printf so that the +/* If CONFIG_DEBUG_FEATURES is enabled, use dbg instead of printf so that the * output will be synchronous with the debug output. */ #ifdef CONFIG_CPP_HAVE_VARARGS -# ifdef CONFIG_DEBUG +# ifdef CONFIG_DEBUG_FEATURES # define message(format, ...) dbg(format, ##__VA_ARGS__) # define err(format, ...) dbg(format, ##__VA_ARGS__) # else @@ -116,7 +116,7 @@ # define err(format, ...) fprintf(stderr, format, ##__VA_ARGS__) # endif #else -# ifdef CONFIG_DEBUG +# ifdef CONFIG_DEBUG_FEATURES # define message dbg # define err dbg # else diff --git a/examples/usbserial/Kconfig b/examples/usbserial/Kconfig index 5133678ac..dc7def9f8 100644 --- a/examples/usbserial/Kconfig +++ b/examples/usbserial/Kconfig @@ -25,7 +25,7 @@ config EXAMPLES_USBSERIAL_TRACEINIT default n depends on USBDEV_TRACE || DEBUG_USB ---help--- - If USBDEV_TRACE is enabled (or DEBUG and DEBUG_USB), + If USBDEV_TRACE is enabled (or CONFIG_DEBUG_FEATURES and CONFIG_DEBUG_USB), then the example code will also manage the USB trace output. The amount of trace output can be controlled this configuration value: This setting will show USB initialization events @@ -35,7 +35,7 @@ config EXAMPLES_USBSERIAL_TRACECLASS default n depends on USBDEV_TRACE || DEBUG_USB ---help--- - If USBDEV_TRACE is enabled (or DEBUG and DEBUG_USB), + If USBDEV_TRACE is enabled (or CONFIG_DEBUG_FEATURES and CONFIG_DEBUG_USB), then the example code will also manage the USB trace output. The amount of trace output can be controlled this configuration value: This setting will show USB class driver events @@ -45,7 +45,7 @@ config EXAMPLES_USBSERIAL_TRACETRANSFERS default n depends on USBDEV_TRACE || DEBUG_USB ---help--- - If USBDEV_TRACE is enabled (or DEBUG and DEBUG_USB), + If USBDEV_TRACE is enabled (or CONFIG_DEBUG_FEATURES and CONFIG_DEBUG_USB), then the example code will also manage the USB trace output. The amount of trace output can be controlled this configuration value: This setting will show USB data transfer events @@ -55,7 +55,7 @@ config EXAMPLES_USBSERIAL_TRACECONTROLLER default n depends on USBDEV_TRACE || DEBUG_USB ---help--- - If USBDEV_TRACE is enabled (or DEBUG and DEBUG_USB), + If USBDEV_TRACE is enabled (or CONFIG_DEBUG_FEATURES and CONFIG_DEBUG_USB), then the example code will also manage the USB trace output. The amount of trace output can be controlled this configuration value: This setting will show USB device controller events @@ -65,7 +65,7 @@ config EXAMPLES_USBSERIAL_TRACEINTERRUPTS default n depends on USBDEV_TRACE || DEBUG_USB ---help--- - If USBDEV_TRACE is enabled (or DEBUG and DEBUG_USB), + If USBDEV_TRACE is enabled (or CONFIG_DEBUG_FEATURES and CONFIG_DEBUG_USB), then the example code will also manage the USB trace output. The amount of trace output can be controlled this configuration value: This setting will show USB device controller interrupt-related events. diff --git a/examples/usbterm/Kconfig b/examples/usbterm/Kconfig index 889b2892c..208aed452 100644 --- a/examples/usbterm/Kconfig +++ b/examples/usbterm/Kconfig @@ -16,7 +16,7 @@ config EXAMPLES_USBTERM_TRACEINIT default n depends on USBDEV_TRACE || DEBUG_USB ---help--- - If USBDEV_TRACE is enabled (or DEBUG and DEBUG_USB), + If USBDEV_TRACE is enabled (or CONFIG_DEBUG_FEATURES and CONFIG_DEBUG_USB), then the example code will also manage the USB trace output. The amount of trace output can be controlled this configuration value: This setting will show USB initialization events @@ -26,7 +26,7 @@ config EXAMPLES_USBTERM_TRACECLASS default n depends on USBDEV_TRACE || DEBUG_USB ---help--- - If USBDEV_TRACE is enabled (or DEBUG and DEBUG_USB), + If USBDEV_TRACE is enabled (or CONFIG_DEBUG_FEATURES and CONFIG_DEBUG_USB), then the example code will also manage the USB trace output. The amount of trace output can be controlled this configuration value: This setting will show USB class driver events @@ -36,7 +36,7 @@ config EXAMPLES_USBTERM_TRACETRANSFERS default n depends on USBDEV_TRACE || DEBUG_USB ---help--- - If USBDEV_TRACE is enabled (or DEBUG and DEBUG_USB), + If USBDEV_TRACE is enabled (or CONFIG_DEBUG_FEATURES and CONFIG_DEBUG_USB), then the example code will also manage the USB trace output. The amount of trace output can be controlled this configuration value: This setting will show USB data transfer events @@ -46,7 +46,7 @@ config EXAMPLES_USBTERM_TRACECONTROLLER default n depends on USBDEV_TRACE || DEBUG_USB ---help--- - If USBDEV_TRACE is enabled (or DEBUG and DEBUG_USB), + If USBDEV_TRACE is enabled (or CONFIG_DEBUG_FEATURES and CONFIG_DEBUG_USB), then the example code will also manage the USB trace output. The amount of trace output can be controlled this configuration value: This setting will show USB device controller events @@ -56,7 +56,7 @@ config EXAMPLES_USBTERM_TRACEINTERRUPTS default n depends on USBDEV_TRACE || DEBUG_USB ---help--- - If USBDEV_TRACE is enabled (or DEBUG and DEBUG_USB), + If USBDEV_TRACE is enabled (or CONFIG_DEBUG_FEATURES and CONFIG_DEBUG_USB), then the example code will also manage the USB trace output. The amount of trace output can be controlled this configuration value: This setting will show USB device controller interrupt-related events. diff --git a/graphics/tiff/tiff_initialize.c b/graphics/tiff/tiff_initialize.c index 645743164..f3757ae8a 100644 --- a/graphics/tiff/tiff_initialize.c +++ b/graphics/tiff/tiff_initialize.c @@ -203,12 +203,12 @@ #define TIFF_RGB_STRIPBCOFFSET 248 /* Debug *******************************************************************/ -/* CONFIG_DEBUG_TIFFOFFSETS may be defined (along with CONFIG_DEBUG and +/* CONFIG_DEBUG_TIFFOFFSETS may be defined (along with CONFIG_DEBUG_FEATURES and * CONFIG_DEBUG_GRAPHICS) in order to verify the pre-determined TIFF file * offsets. */ -#if !defined(CONFIG_DEBUG) || !defined(CONFIG_DEBUG_GRAPHICS) +#if !defined(CONFIG_DEBUG_FEATURES) || !defined(CONFIG_DEBUG_GRAPHICS) # undef CONFIG_DEBUG_TIFFOFFSETS #endif diff --git a/netutils/ftpc/Kconfig b/netutils/ftpc/Kconfig index ca092f5e4..938e8a86c 100644 --- a/netutils/ftpc/Kconfig +++ b/netutils/ftpc/Kconfig @@ -14,7 +14,7 @@ if NETUTILS_FTPC config DEBUG_FTPC bool "Debug FTP client" default n - depends on DEBUG + depends on DEBUG_FEATURES ---help--- Enable debug support for the FTP client. This option simple forces CONFIG_DEBUG_NET to be on, but only for the files within this directory. diff --git a/netutils/ftpc/ftpc_connect.c b/netutils/ftpc/ftpc_connect.c index 74598f931..95abcc1f3 100644 --- a/netutils/ftpc/ftpc_connect.c +++ b/netutils/ftpc/ftpc_connect.c @@ -159,7 +159,7 @@ errout: int ftpc_reconnect(FAR struct ftpc_session_s *session) { struct sockaddr_in addr; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES char *tmp; #endif int ret; @@ -190,7 +190,7 @@ int ftpc_reconnect(FAR struct ftpc_session_s *session) /* Connect the socket to the server */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES tmp = inet_ntoa(session->addr); ndbg("Connecting to server address %s:%d\n", tmp, ntohs(session->port)); #endif @@ -236,7 +236,7 @@ int ftpc_reconnect(FAR struct ftpc_session_s *session) goto errout_with_socket; } -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES ndbg("Connected\n"); tmp = inet_ntoa(addr.sin_addr); ndbg(" Remote address: %s:%d\n", tmp, ntohs(addr.sin_port)); diff --git a/netutils/ftpc/ftpc_putfile.c b/netutils/ftpc/ftpc_putfile.c index 29a8f17f4..0f9da8363 100644 --- a/netutils/ftpc/ftpc_putfile.c +++ b/netutils/ftpc/ftpc_putfile.c @@ -188,7 +188,7 @@ static int ftpc_sendfile(struct ftpc_session_s *session, const char *path, FILE *stream, uint8_t how, uint8_t xfrmode) { long offset = session->offset; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES FAR char *rname; FAR char *str; int len; @@ -261,7 +261,7 @@ static int ftpc_sendfile(struct ftpc_session_s *session, const char *path, /* Get the remote filename from the response */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES str = strstr(session->reply, " for "); if (str) { diff --git a/netutils/telnetd/telnetd_daemon.c b/netutils/telnetd/telnetd_daemon.c index 405f980cf..815502974 100644 --- a/netutils/telnetd/telnetd_daemon.c +++ b/netutils/telnetd/telnetd_daemon.c @@ -231,7 +231,7 @@ static int telnetd_daemon(int argc, char *argv[]) * being available. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES close(0); close(1); close(2); diff --git a/netutils/tftpc/tftpc_get.c b/netutils/tftpc/tftpc_get.c index 6b90024f2..2b7ae8fa3 100644 --- a/netutils/tftpc/tftpc_get.c +++ b/netutils/tftpc/tftpc_get.c @@ -119,7 +119,7 @@ static inline int tftp_parsedatapacket(const uint8_t *packet, *blockno = (uint16_t)packet[2] << 8 | (uint16_t)packet[3]; return OK; } -#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_NET) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_DEBUG_NET) else if (*opcode == TFTP_ERR) { (void)tftp_parseerrpacket(packet); diff --git a/netutils/tftpc/tftpc_internal.h b/netutils/tftpc/tftpc_internal.h index 18aeabcc6..e25d5365a 100644 --- a/netutils/tftpc/tftpc_internal.h +++ b/netutils/tftpc/tftpc_internal.h @@ -162,7 +162,7 @@ extern int tftp_sockinit(struct sockaddr_in *server, in_addr_t addr); extern int tftp_mkreqpacket(uint8_t *buffer, int opcode, const char *path, bool binary); extern int tftp_mkackpacket(uint8_t *buffer, uint16_t blockno); extern int tftp_mkerrpacket(uint8_t *buffer, uint16_t errorcode, const char *errormsg); -#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_NET) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_DEBUG_NET) extern int tftp_parseerrpacket(const uint8_t *packet); #endif diff --git a/netutils/tftpc/tftpc_packets.c b/netutils/tftpc/tftpc_packets.c index 6832cd6e9..ea8a760f3 100644 --- a/netutils/tftpc/tftpc_packets.c +++ b/netutils/tftpc/tftpc_packets.c @@ -207,7 +207,7 @@ int tftp_mkerrpacket(uint8_t *buffer, uint16_t errorcode, const char *errormsg) * ****************************************************************************/ -#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_NET) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_DEBUG_NET) int tftp_parseerrpacket(const uint8_t *buffer) { uint16_t opcode = (uint16_t)buffer[0] << 8 | (uint16_t)buffer[1]; diff --git a/netutils/tftpc/tftpc_put.c b/netutils/tftpc/tftpc_put.c index 492febc16..097d64ecf 100644 --- a/netutils/tftpc/tftpc_put.c +++ b/netutils/tftpc/tftpc_put.c @@ -271,7 +271,7 @@ static int tftp_rcvack(int sd, uint8_t *packet, struct sockaddr_in *server, if (opcode != TFTP_ACK) { ninfo("Bad opcode\n"); -#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_NET) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_DEBUG_NET) if (opcode == TFTP_ERR) { (void)tftp_parseerrpacket(packet); diff --git a/netutils/thttpd/Kconfig b/netutils/thttpd/Kconfig index 68d6d79b7..4bb5606be 100644 --- a/netutils/thttpd/Kconfig +++ b/netutils/thttpd/Kconfig @@ -194,7 +194,7 @@ config THTTPD_OCCASIONAL_MSEC config THTTPD_MEMDEBUG bool "Enable memory debug" default n - depends on DEBUG && DEBUG_NET + depends on DEBUG_FEATURES && DEBUG_NET ---help--- Enable THTTPD memory usage debug output. Default: n diff --git a/netutils/thttpd/config.h b/netutils/thttpd/config.h index 2d5531794..e7e511348 100644 --- a/netutils/thttpd/config.h +++ b/netutils/thttpd/config.h @@ -215,7 +215,7 @@ /* Memory debug instrumentation depends on other debug options */ -# if (!defined(CONFIG_DEBUG) || !defined(CONFIG_DEBUG_NET)) && defined(CONFIG_THTTPD_MEMDEBUG) +# if (!defined(CONFIG_DEBUG_FEATURES) || !defined(CONFIG_DEBUG_NET)) && defined(CONFIG_THTTPD_MEMDEBUG) # undef CONFIG_THTTPD_MEMDEBUG # endif diff --git a/netutils/thttpd/libhttpd.c b/netutils/thttpd/libhttpd.c index 04311f95c..6eefa1090 100644 --- a/netutils/thttpd/libhttpd.c +++ b/netutils/thttpd/libhttpd.c @@ -166,7 +166,7 @@ static int check_referer(httpd_conn *hc); #ifdef CONFIG_THTTPD_URLPATTERN static int really_check_referer(httpd_conn *hc); #endif -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES_FEATURES static int sockaddr_check(httpd_sockaddr *saP); #else # define sockaddr_check(saP) (1) @@ -221,7 +221,7 @@ static int initialize_listen_socket(httpd_sockaddr *saP) /* Check sockaddr. */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES_FEATURES if (!sockaddr_check(saP)) { ndbg("unknown sockaddr family on listen socket\n"); @@ -2038,7 +2038,7 @@ static int really_check_referer(httpd_conn *hc) } #endif /* CONFIG_THTTPD_URLPATTERN */ -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES_FEATURES static int sockaddr_check(httpd_sockaddr *saP) { switch (saP->sin_family) @@ -2055,7 +2055,7 @@ static int sockaddr_check(httpd_sockaddr *saP) return 0; } } -#endif /* CONFIG_DEBUG */ +#endif /* CONFIG_DEBUG_FEATURES_FEATURES */ static size_t sockaddr_len(httpd_sockaddr *saP) { @@ -2307,7 +2307,7 @@ int httpd_get_conn(httpd_server *hs, int listen_fd, httpd_conn *hc) return GC_FAIL; } -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES_FEATURES if (!sockaddr_check(&sa)) { ndbg("unknown sockaddr family\n"); diff --git a/netutils/webserver/httpd.c b/netutils/webserver/httpd.c index 774a7f66c..2f73d99af 100644 --- a/netutils/webserver/httpd.c +++ b/netutils/webserver/httpd.c @@ -193,7 +193,7 @@ static int httpd_close(struct httpd_fs_file *file) #ifdef CONFIG_NETUTILS_HTTPD_DUMPBUFFER static void httpd_dumpbuffer(FAR const char *msg, FAR const char *buffer, unsigned int nbytes) { - /* CONFIG_DEBUG, CONFIG_DEBUG_INFO, and CONFIG_DEBUG_NET have to be + /* CONFIG_DEBUG_FEATURES, CONFIG_DEBUG_INFO, and CONFIG_DEBUG_NET have to be * defined or the following does nothing. */ @@ -206,7 +206,7 @@ static void httpd_dumpbuffer(FAR const char *msg, FAR const char *buffer, unsign #ifdef CONFIG_NETUTILS_HTTPD_DUMPPSTATE static void httpd_dumppstate(struct httpd_state *pstate, const char *msg) { -#if defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_NET) +#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_DEBUG_INFO) && defined(CONFIG_DEBUG_NET) ninfo("[%d] pstate(%p): [%s]\n", pstate->ht_sockfd, pstate, msg); ninfo(" filename: [%s]\n", pstate->ht_filename); ninfo(" htfile len: %d\n", pstate->ht_file.len); diff --git a/nshlib/Kconfig b/nshlib/Kconfig index f871200d6..c19b304f8 100644 --- a/nshlib/Kconfig +++ b/nshlib/Kconfig @@ -879,7 +879,7 @@ endif #NSH_USBKBD endmenu # Console Configuration menu "USB Device Trace Support" - depends on USBDEV && (DEBUG || USBDEV_TRACE) + depends on USBDEV && (DEBUG_FEATURES || USBDEV_TRACE) config NSH_USBDEV_TRACE bool "Enable Builtin USB Trace Support" @@ -887,9 +887,9 @@ config NSH_USBDEV_TRACE ---help--- Enable builtin USB trace support in NSH. If selected, buffered USB trace data will be presented each time a command is provided to NSH. - The USB trace data will be sent to the console unless DEBUG set or - unless you are using a USB console. In those cases, the trace data - will go to the SYSLOG device. + The USB trace data will be sent to the console unless CONFIG_DEBUG_FEATURES + set or unless you are using a USB console. In those cases, the trace + data will go to the SYSLOG device. If not enabled, the USB trace support can be provided by external logic such as apps/system/usbmonitor. @@ -1038,12 +1038,12 @@ endif # NSH_NETINIT_THREAD config NSH_NETINIT_DEBUG bool "Network init debug" default n - depends on DEBUG + depends on DEBUG_FEATURES ---help--- Normally debug output is controlled by DEBUG_NET. However, that will generate a LOT of debug output, especially if CONFIG_DEBUG_INFO is - also selected. This option is intended to force VERVOSE debug - output from the NSH network initialization logic even if DEBUG_NET + also selected. This option is intended to force vervose debug + output from the NSH network initialization logic even if CONFIG_DEBUG_NET or CONFIG_DEBUG_INFO are not selected. This allows for focused, unit- level debug of the NSH network initialization logic. diff --git a/nshlib/nsh_usbkeyboard.c b/nshlib/nsh_usbkeyboard.c index 145256fee..97f2f206a 100644 --- a/nshlib/nsh_usbkeyboard.c +++ b/nshlib/nsh_usbkeyboard.c @@ -111,7 +111,7 @@ static int nsh_wait_usbready(FAR const char *msg) fd = open(NSH_USBKBD_DEVNAME, O_RDONLY); if (fd < 0) { -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES int errcode = errno; /* ENOENT means that the USB device is not yet connected and, diff --git a/platform/arduino-due/sam_cxxinitialize.c b/platform/arduino-due/sam_cxxinitialize.c index 53289960d..27ccfea79 100644 --- a/platform/arduino-due/sam_cxxinitialize.c +++ b/platform/arduino-due/sam_cxxinitialize.c @@ -53,7 +53,7 @@ * constructors. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_DEBUG_CXX #endif diff --git a/platform/cloudctrl/stm32_cxxinitialize.c b/platform/cloudctrl/stm32_cxxinitialize.c index 7ffcb6f02..b6685f38f 100644 --- a/platform/cloudctrl/stm32_cxxinitialize.c +++ b/platform/cloudctrl/stm32_cxxinitialize.c @@ -54,7 +54,7 @@ * constructors. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_DEBUG_CXX #endif diff --git a/platform/fire-stm32v2/stm32_cxxinitialize.c b/platform/fire-stm32v2/stm32_cxxinitialize.c index 87811ddd7..fc5dd7c1d 100644 --- a/platform/fire-stm32v2/stm32_cxxinitialize.c +++ b/platform/fire-stm32v2/stm32_cxxinitialize.c @@ -53,7 +53,7 @@ * constructors. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_DEBUG_CXX #endif diff --git a/platform/mikroe-stm32f4/stm32_cxxinitialize.c b/platform/mikroe-stm32f4/stm32_cxxinitialize.c index 05c430ba6..2e83a5d1c 100644 --- a/platform/mikroe-stm32f4/stm32_cxxinitialize.c +++ b/platform/mikroe-stm32f4/stm32_cxxinitialize.c @@ -53,7 +53,7 @@ * constructors. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_DEBUG_CXX #endif diff --git a/platform/nucleo-144/stm32_cxxinitialize.c b/platform/nucleo-144/stm32_cxxinitialize.c index 6d592a1a3..1970d880f 100644 --- a/platform/nucleo-144/stm32_cxxinitialize.c +++ b/platform/nucleo-144/stm32_cxxinitialize.c @@ -54,7 +54,7 @@ * constructors */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_DEBUG_CXX #endif diff --git a/platform/nucleo-f303re/stm32_cxxinitialize.c b/platform/nucleo-f303re/stm32_cxxinitialize.c index e915348ac..6dbe6f2bf 100644 --- a/platform/nucleo-f303re/stm32_cxxinitialize.c +++ b/platform/nucleo-f303re/stm32_cxxinitialize.c @@ -53,7 +53,7 @@ * constructors */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_DEBUG_CXX #endif diff --git a/platform/nucleo-f4x1re/stm32_cxxinitialize.c b/platform/nucleo-f4x1re/stm32_cxxinitialize.c index c7f4b9488..933102b0c 100644 --- a/platform/nucleo-f4x1re/stm32_cxxinitialize.c +++ b/platform/nucleo-f4x1re/stm32_cxxinitialize.c @@ -53,7 +53,7 @@ * constructors. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_DEBUG_CXX #endif diff --git a/platform/nucleo-l476rg/stm32_cxxinitialize.c b/platform/nucleo-l476rg/stm32_cxxinitialize.c index f94721ab5..ace93d39e 100644 --- a/platform/nucleo-l476rg/stm32_cxxinitialize.c +++ b/platform/nucleo-l476rg/stm32_cxxinitialize.c @@ -53,7 +53,7 @@ * constructors. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_DEBUG_CXX #endif diff --git a/platform/olimex-stm32-h405/stm32_cxxinitialize.c b/platform/olimex-stm32-h405/stm32_cxxinitialize.c index 786118dd1..05e6248c8 100644 --- a/platform/olimex-stm32-h405/stm32_cxxinitialize.c +++ b/platform/olimex-stm32-h405/stm32_cxxinitialize.c @@ -53,7 +53,7 @@ * constructors. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_DEBUG_CXX #endif diff --git a/platform/olimex-stm32-h407/stm32_cxxinitialize.c b/platform/olimex-stm32-h407/stm32_cxxinitialize.c index 8511cf2b4..98c551164 100644 --- a/platform/olimex-stm32-h407/stm32_cxxinitialize.c +++ b/platform/olimex-stm32-h407/stm32_cxxinitialize.c @@ -53,7 +53,7 @@ * constructors. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_DEBUG_CXX #endif diff --git a/platform/olimex-stm32-p207/stm32_cxxinitialize.c b/platform/olimex-stm32-p207/stm32_cxxinitialize.c index 4aa67c363..6286cba68 100644 --- a/platform/olimex-stm32-p207/stm32_cxxinitialize.c +++ b/platform/olimex-stm32-p207/stm32_cxxinitialize.c @@ -53,7 +53,7 @@ * constructors. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_DEBUG_CXX #endif diff --git a/platform/olimexino-stm32/stm32_cxxinitialize.c b/platform/olimexino-stm32/stm32_cxxinitialize.c index 543956d98..ec4f4393a 100644 --- a/platform/olimexino-stm32/stm32_cxxinitialize.c +++ b/platform/olimexino-stm32/stm32_cxxinitialize.c @@ -53,7 +53,7 @@ * constructors. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_DEBUG_CXX #endif diff --git a/platform/pcduino-a10/a1x_cxxinitialize.c b/platform/pcduino-a10/a1x_cxxinitialize.c index caca40f3d..ce50f2180 100644 --- a/platform/pcduino-a10/a1x_cxxinitialize.c +++ b/platform/pcduino-a10/a1x_cxxinitialize.c @@ -53,7 +53,7 @@ * constructors. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_DEBUG_CXX #endif diff --git a/platform/sabre-6quad/imx_cxxinitialize.c b/platform/sabre-6quad/imx_cxxinitialize.c index ac1b00402..b4bc3698a 100644 --- a/platform/sabre-6quad/imx_cxxinitialize.c +++ b/platform/sabre-6quad/imx_cxxinitialize.c @@ -53,7 +53,7 @@ * constructors. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_DEBUG_CXX #endif diff --git a/platform/sam3u-ek/sam_cxxinitialized.c b/platform/sam3u-ek/sam_cxxinitialized.c index 766b938b2..47f686ddf 100644 --- a/platform/sam3u-ek/sam_cxxinitialized.c +++ b/platform/sam3u-ek/sam_cxxinitialized.c @@ -53,7 +53,7 @@ * constructors. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_DEBUG_CXX #endif diff --git a/platform/sam4e-ek/sam_cxxinitialize.c b/platform/sam4e-ek/sam_cxxinitialize.c index 7e4d16a6a..b0abe5b26 100644 --- a/platform/sam4e-ek/sam_cxxinitialize.c +++ b/platform/sam4e-ek/sam_cxxinitialize.c @@ -53,7 +53,7 @@ * constructors. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_DEBUG_CXX #endif diff --git a/platform/sam4l-xplained/sam_cxxinitialize.c b/platform/sam4l-xplained/sam_cxxinitialize.c index 881a1dd4f..7f473e993 100644 --- a/platform/sam4l-xplained/sam_cxxinitialize.c +++ b/platform/sam4l-xplained/sam_cxxinitialize.c @@ -53,7 +53,7 @@ * constructors. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_DEBUG_CXX #endif diff --git a/platform/sam4s-xplained-pro/sam_cxxinitialize.c b/platform/sam4s-xplained-pro/sam_cxxinitialize.c index f6e090322..8d55c47fa 100644 --- a/platform/sam4s-xplained-pro/sam_cxxinitialize.c +++ b/platform/sam4s-xplained-pro/sam_cxxinitialize.c @@ -53,7 +53,7 @@ * constructors. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_DEBUG_CXX #endif diff --git a/platform/sam4s-xplained/sam_cxxinitialize.c b/platform/sam4s-xplained/sam_cxxinitialize.c index 7e8c65993..54e4afa71 100644 --- a/platform/sam4s-xplained/sam_cxxinitialize.c +++ b/platform/sam4s-xplained/sam_cxxinitialize.c @@ -53,7 +53,7 @@ * constructors. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_DEBUG_CXX #endif diff --git a/platform/sama5d2-xult/sam_cxxinitialize.c b/platform/sama5d2-xult/sam_cxxinitialize.c index 283cc6d9d..a47f0c188 100644 --- a/platform/sama5d2-xult/sam_cxxinitialize.c +++ b/platform/sama5d2-xult/sam_cxxinitialize.c @@ -53,7 +53,7 @@ * constructors. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_DEBUG_CXX #endif diff --git a/platform/sama5d3-xplained/sam_cxxinitialize.c b/platform/sama5d3-xplained/sam_cxxinitialize.c index 013e3ded3..20f87c4bf 100644 --- a/platform/sama5d3-xplained/sam_cxxinitialize.c +++ b/platform/sama5d3-xplained/sam_cxxinitialize.c @@ -53,7 +53,7 @@ * constructors. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_DEBUG_CXX #endif diff --git a/platform/sama5d3x-ek/sam_cxxinitialize.c b/platform/sama5d3x-ek/sam_cxxinitialize.c index e65426b13..0d475aae3 100644 --- a/platform/sama5d3x-ek/sam_cxxinitialize.c +++ b/platform/sama5d3x-ek/sam_cxxinitialize.c @@ -53,7 +53,7 @@ * constructors. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_DEBUG_CXX #endif diff --git a/platform/sama5d4-ek/sam_cxxinitialize.c b/platform/sama5d4-ek/sam_cxxinitialize.c index 3630c420a..de17676ec 100644 --- a/platform/sama5d4-ek/sam_cxxinitialize.c +++ b/platform/sama5d4-ek/sam_cxxinitialize.c @@ -53,7 +53,7 @@ * constructors. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_DEBUG_CXX #endif diff --git a/platform/samd20-xplained/sam_cxxinitialize.c b/platform/samd20-xplained/sam_cxxinitialize.c index 8ce87c07a..1bd6fc053 100644 --- a/platform/samd20-xplained/sam_cxxinitialize.c +++ b/platform/samd20-xplained/sam_cxxinitialize.c @@ -53,7 +53,7 @@ * constructors. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_DEBUG_CXX #endif diff --git a/platform/samd21-xplained/sam_cxxinitialize.c b/platform/samd21-xplained/sam_cxxinitialize.c index 39108333b..29d550fcf 100644 --- a/platform/samd21-xplained/sam_cxxinitialize.c +++ b/platform/samd21-xplained/sam_cxxinitialize.c @@ -53,7 +53,7 @@ * constructors. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_DEBUG_CXX #endif diff --git a/platform/same70-xplained/sam_cxxinitialize.c b/platform/same70-xplained/sam_cxxinitialize.c index 745a74a63..ec63fcd1e 100644 --- a/platform/same70-xplained/sam_cxxinitialize.c +++ b/platform/same70-xplained/sam_cxxinitialize.c @@ -53,7 +53,7 @@ * constructors. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_DEBUG_CXX #endif diff --git a/platform/saml21-xplained/sam_cxxinitialize.c b/platform/saml21-xplained/sam_cxxinitialize.c index 7d5fead2c..a60c88967 100644 --- a/platform/saml21-xplained/sam_cxxinitialize.c +++ b/platform/saml21-xplained/sam_cxxinitialize.c @@ -53,7 +53,7 @@ * constructors. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_DEBUG_CXX #endif diff --git a/platform/samv71-xult/sam_cxxinitialize.c b/platform/samv71-xult/sam_cxxinitialize.c index efdff7f76..865d6e60c 100644 --- a/platform/samv71-xult/sam_cxxinitialize.c +++ b/platform/samv71-xult/sam_cxxinitialize.c @@ -53,7 +53,7 @@ * constructors. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_DEBUG_CXX #endif diff --git a/platform/shenzhou/stm32_cxxinitialize.c b/platform/shenzhou/stm32_cxxinitialize.c index f3dfdb106..2498378b7 100644 --- a/platform/shenzhou/stm32_cxxinitialize.c +++ b/platform/shenzhou/stm32_cxxinitialize.c @@ -53,7 +53,7 @@ * constructors. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_DEBUG_CXX #endif diff --git a/platform/spark/stm32_cxxinitialize.c b/platform/spark/stm32_cxxinitialize.c index dbf3bf67f..fa33d21f8 100644 --- a/platform/spark/stm32_cxxinitialize.c +++ b/platform/spark/stm32_cxxinitialize.c @@ -53,7 +53,7 @@ * constructors. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_DEBUG_CXX #endif diff --git a/platform/stm3220g-eval/stm32_cxxinitialize.c b/platform/stm3220g-eval/stm32_cxxinitialize.c index ab6044e94..c3aa574a3 100644 --- a/platform/stm3220g-eval/stm32_cxxinitialize.c +++ b/platform/stm3220g-eval/stm32_cxxinitialize.c @@ -53,7 +53,7 @@ * constructors. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_DEBUG_CXX #endif diff --git a/platform/stm3240g-eval/stm32_cxxinitialize.c b/platform/stm3240g-eval/stm32_cxxinitialize.c index 0356fc6ea..0917f658d 100644 --- a/platform/stm3240g-eval/stm32_cxxinitialize.c +++ b/platform/stm3240g-eval/stm32_cxxinitialize.c @@ -53,7 +53,7 @@ * constructors. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_DEBUG_CXX #endif diff --git a/platform/stm32f3discovery/stm32_cxxinitialize.c b/platform/stm32f3discovery/stm32_cxxinitialize.c index 050930846..59f73ba07 100644 --- a/platform/stm32f3discovery/stm32_cxxinitialize.c +++ b/platform/stm32f3discovery/stm32_cxxinitialize.c @@ -53,7 +53,7 @@ * constructors. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_DEBUG_CXX #endif diff --git a/platform/stm32f429i-disco/stm32_cxxinitialize.c b/platform/stm32f429i-disco/stm32_cxxinitialize.c index c71f79cba..3ffd8a20e 100644 --- a/platform/stm32f429i-disco/stm32_cxxinitialize.c +++ b/platform/stm32f429i-disco/stm32_cxxinitialize.c @@ -53,7 +53,7 @@ * constructors. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_DEBUG_CXX #endif diff --git a/platform/stm32f4discovery/stm32_cxxinitialize.c b/platform/stm32f4discovery/stm32_cxxinitialize.c index 1596b3f51..9a2353f8e 100644 --- a/platform/stm32f4discovery/stm32_cxxinitialize.c +++ b/platform/stm32f4discovery/stm32_cxxinitialize.c @@ -53,7 +53,7 @@ * constructors */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_DEBUG_CXX #endif diff --git a/platform/stm32f746g-disco/stm32_cxxinitialize.c b/platform/stm32f746g-disco/stm32_cxxinitialize.c index ce83890dc..47f3e3ae0 100644 --- a/platform/stm32f746g-disco/stm32_cxxinitialize.c +++ b/platform/stm32f746g-disco/stm32_cxxinitialize.c @@ -53,7 +53,7 @@ * constructors */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_DEBUG_CXX #endif diff --git a/platform/stm32l476vg-disco/stm32_cxxinitialize.c b/platform/stm32l476vg-disco/stm32_cxxinitialize.c index 6141f33f5..096eab010 100644 --- a/platform/stm32l476vg-disco/stm32_cxxinitialize.c +++ b/platform/stm32l476vg-disco/stm32_cxxinitialize.c @@ -53,7 +53,7 @@ * constructors. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_DEBUG_CXX #endif diff --git a/platform/stm32ldiscovery/stm32_cxxinitialize.c b/platform/stm32ldiscovery/stm32_cxxinitialize.c index 726a7c95d..abe57211a 100644 --- a/platform/stm32ldiscovery/stm32_cxxinitialize.c +++ b/platform/stm32ldiscovery/stm32_cxxinitialize.c @@ -53,7 +53,7 @@ * constructors. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_DEBUG_CXX #endif diff --git a/platform/teensy-lc/kl_cxxinitialize.c b/platform/teensy-lc/kl_cxxinitialize.c index 24205a24d..3da6bf4e6 100644 --- a/platform/teensy-lc/kl_cxxinitialize.c +++ b/platform/teensy-lc/kl_cxxinitialize.c @@ -53,7 +53,7 @@ * constructors. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_DEBUG_CXX #endif diff --git a/platform/viewtool-stm32f107/stm32_cxxinitialize.c b/platform/viewtool-stm32f107/stm32_cxxinitialize.c index f5058c2cf..808f8e5e4 100644 --- a/platform/viewtool-stm32f107/stm32_cxxinitialize.c +++ b/platform/viewtool-stm32f107/stm32_cxxinitialize.c @@ -53,7 +53,7 @@ * constructors. */ -#ifndef CONFIG_DEBUG +#ifndef CONFIG_DEBUG_FEATURES # undef CONFIG_DEBUG_CXX #endif diff --git a/system/cdcacm/Kconfig b/system/cdcacm/Kconfig index 4fb293772..0dfa88a7f 100644 --- a/system/cdcacm/Kconfig +++ b/system/cdcacm/Kconfig @@ -29,7 +29,7 @@ config SYSTEM_CDCACM_TRACEINIT default n depends on USBDEV_TRACE || DEBUG_USB ---help--- - If USBDEV_TRACE is enabled (or DEBUG and DEBUG_USB), + If USBDEV_TRACE is enabled (or CONFIG_DEBUG_FEATURES and CONFIG_DEBUG_USB), then the add-on code will also manage the USB trace output. The amount of trace output can be controlled this configuration value: This setting will show USB initialization events @@ -39,7 +39,7 @@ config SYSTEM_CDCACM_TRACECLASS default n depends on USBDEV_TRACE || DEBUG_USB ---help--- - If USBDEV_TRACE is enabled (or DEBUG and DEBUG_USB), + If USBDEV_TRACE is enabled (or CONFIG_DEBUG_FEATURES and CONFIG_DEBUG_USB), then the add-on code will also manage the USB trace output. The amount of trace output can be controlled this configuration value: This setting will show USB class driver events @@ -49,7 +49,7 @@ config SYSTEM_CDCACM_TRACETRANSFERS default n depends on USBDEV_TRACE || DEBUG_USB ---help--- - If USBDEV_TRACE is enabled (or DEBUG and DEBUG_USB), + If USBDEV_TRACE is enabled (or CONFIG_DEBUG_FEATURES and CONFIG_DEBUG_USB), then the add-on code will also manage the USB trace output. The amount of trace output can be controlled this configuration value: This setting will show USB data transfer events @@ -59,7 +59,7 @@ config SYSTEM_CDCACM_TRACECONTROLLER default n depends on USBDEV_TRACE || DEBUG_USB ---help--- - If USBDEV_TRACE is enabled (or DEBUG and DEBUG_USB), + If USBDEV_TRACE is enabled (or CONFIG_DEBUG_FEATURES and CONFIG_DEBUG_USB), then the add-on code will also manage the USB trace output. The amount of trace output can be controlled this configuration value: This setting will show USB device controller events @@ -69,7 +69,7 @@ config SYSTEM_CDCACM_TRACEINTERRUPTS default n depends on USBDEV_TRACE || DEBUG_USB ---help--- - If USBDEV_TRACE is enabled (or DEBUG and DEBUG_USB), + If USBDEV_TRACE is enabled (or CONFIG_DEBUG_FEATURES and CONFIG_DEBUG_USB), then the add-on code will also manage the USB trace output. The amount of trace output can be controlled this configuration value: This setting will show USB device controller interrupt-related events. diff --git a/system/cdcacm/README.txt b/system/cdcacm/README.txt index a428cb318..7bb961372 100755 --- a/system/cdcacm/README.txt +++ b/system/cdcacm/README.txt @@ -1,43 +1,43 @@ -system/cdcacm -^^^^^^^^^^^^^^^ - - This very simple add-on allows the USB CDC/ACM serial device can be dynamically - connected and disconnected from a host. This add-on can only be used as - an NSH built-in command. If built-in, then two new NSH commands will be - supported: - - 1. sercon - Connect the CDC/ACM serial device - 2. serdis - Disconnect the CDC/ACM serial device - - Configuration prequisites (not complete): - - CONFIG_USBDEV=y : USB device support must be enabled - CONFIG_CDCACM=y : The CDC/ACM driver must be built - CONFIG_NSH_BUILTIN_APPS : NSH built-in application support must be enabled - - Configuration options specific to this add-on: - - CONFIG_SYSTEM_CDCACM_DEVMINOR : The minor number of the CDC/ACM device. - : i.e., the 'x' in /dev/ttyACMx - - If CONFIG_USBDEV_TRACE is enabled (or CONFIG_DEBUG and CONFIG_DEBUG_USB, or - CONFIG_USBDEV_TRACE), then the add-on code will also initialize the USB trace - output. The amount of trace output can be controlled using: - - CONFIG_SYSTEM_CDCACM_TRACEINIT - Show initialization events - CONFIG_SYSTEM_CDCACM_TRACECLASS - Show class driver events - CONFIG_SYSTEM_CDCACM_TRACETRANSFERS - Show data transfer events - CONFIG_SYSTEM_CDCACM_TRACECONTROLLER - Show controller events - CONFIG_SYSTEM_CDCACM_TRACEINTERRUPTS - Show interrupt-related events. - - Note: This add-on is only enables or disable USB CDC/ACM via the NSH - 'sercon' and 'serdis' command. It will enable and disable tracing per - the settings before enabling and after disabling the CDC/ACM device. It - will not, however, monitor buffered trace data in the interim. If - CONFIG_USBDEV_TRACE is defined (and the debug options are not), other - application logic will need to monitor the buffered trace data. +system/cdcacm +^^^^^^^^^^^^^^^ + + This very simple add-on allows the USB CDC/ACM serial device can be dynamically + connected and disconnected from a host. This add-on can only be used as + an NSH built-in command. If built-in, then two new NSH commands will be + supported: + + 1. sercon - Connect the CDC/ACM serial device + 2. serdis - Disconnect the CDC/ACM serial device + + Configuration prequisites (not complete): + + CONFIG_USBDEV=y : USB device support must be enabled + CONFIG_CDCACM=y : The CDC/ACM driver must be built + CONFIG_NSH_BUILTIN_APPS : NSH built-in application support must be enabled + + Configuration options specific to this add-on: + + CONFIG_SYSTEM_CDCACM_DEVMINOR : The minor number of the CDC/ACM device. + : i.e., the 'x' in /dev/ttyACMx + + If CONFIG_USBDEV_TRACE is enabled (or CONFIG_DEBUG_FEATURES and CONFIG_DEBUG_USB, or + CONFIG_USBDEV_TRACE), then the add-on code will also initialize the USB trace + output. The amount of trace output can be controlled using: + + CONFIG_SYSTEM_CDCACM_TRACEINIT + Show initialization events + CONFIG_SYSTEM_CDCACM_TRACECLASS + Show class driver events + CONFIG_SYSTEM_CDCACM_TRACETRANSFERS + Show data transfer events + CONFIG_SYSTEM_CDCACM_TRACECONTROLLER + Show controller events + CONFIG_SYSTEM_CDCACM_TRACEINTERRUPTS + Show interrupt-related events. + + Note: This add-on is only enables or disable USB CDC/ACM via the NSH + 'sercon' and 'serdis' command. It will enable and disable tracing per + the settings before enabling and after disabling the CDC/ACM device. It + will not, however, monitor buffered trace data in the interim. If + CONFIG_USBDEV_TRACE is defined (and the debug options are not), other + application logic will need to monitor the buffered trace data. diff --git a/system/composite/Kconfig b/system/composite/Kconfig index a787f0934..108ed9b9e 100644 --- a/system/composite/Kconfig +++ b/system/composite/Kconfig @@ -104,7 +104,7 @@ config SYSTEM_COMPOSITE_TRACEINIT bool "USB Trace Initialization" default n ---help--- - If USBDEV_TRACE is enabled (or DEBUG and DEBUG_USB), + If USBDEV_TRACE is enabled (or CONFIG_DEBUG_FEATURES and CONFIG_DEBUG_USB), then the add-on code will also manage the USB trace output. The amount of trace output can be controlled this configuration value: This setting will show USB initialization events @@ -113,7 +113,7 @@ config SYSTEM_COMPOSITE_TRACECLASS bool "USB Trace Class" default n ---help--- - If USBDEV_TRACE is enabled (or DEBUG and DEBUG_USB), + If USBDEV_TRACE is enabled (or CONFIG_DEBUG_FEATURES and CONFIG_DEBUG_USB), then the add-on code will also manage the USB trace output. The amount of trace output can be controlled this configuration value: This setting will show USB class driver events @@ -122,7 +122,7 @@ config SYSTEM_COMPOSITE_TRACETRANSFERS bool "USB Trace Transfers" default n ---help--- - If USBDEV_TRACE is enabled (or DEBUG and DEBUG_USB), + If USBDEV_TRACE is enabled (or CONFIG_DEBUG_FEATURES and CONFIG_DEBUG_USB), then the add-on code will also manage the USB trace output. The amount of trace output can be controlled this configuration value: This setting will show USB data transfer events @@ -131,7 +131,7 @@ config SYSTEM_COMPOSITE_TRACECONTROLLER bool "USB Trace Device Controller Events" default n ---help--- - If USBDEV_TRACE is enabled (or DEBUG and DEBUG_USB), + If USBDEV_TRACE is enabled (or CONFIG_DEBUG_FEATURES and CONFIG_DEBUG_USB), then the add-on code will also manage the USB trace output. The amount of trace output can be controlled this configuration value: This setting will show USB device controller events @@ -140,7 +140,7 @@ config SYSTEM_COMPOSITE_TRACEINTERRUPTS bool "USB Trace Device Controller Interrupt Events" default n ---help--- - If USBDEV_TRACE is enabled (or DEBUG and DEBUG_USB), + If USBDEV_TRACE is enabled (or CONFIG_DEBUG_FEATURES and CONFIG_DEBUG_USB), then the add-on code will also manage the USB trace output. The amount of trace output can be controlled this configuration value: This setting will show USB device controller interrupt-related events. diff --git a/system/composite/README.txt b/system/composite/README.txt index 14d912f1c..58922cba7 100755 --- a/system/composite/README.txt +++ b/system/composite/README.txt @@ -1,76 +1,76 @@ -system/composite -^^^^^^^^^^^^^^^^^^ - - This logic adds a NXH command to control a USB composite device. The only - supported composite is CDC/ACM serial with a USB mass storage device. - - Required overall configuration: - - CONFIG_USBDEV=y - USB device support - CONFIG_USBDEV_COMPOSITE=y - USB composite device support - CONFIG_COMPOSITE_IAD=y - Interface associate descriptor needed - - CONFIG_CDCACM=y - USB CDC/ACM serial device support - CONFIG_CDCACM_COMPOSITE=y - USB CDC/ACM serial composite device support - CONFIG_CDCACM_IFNOBASE=0 - CDC/ACM interfaces start with number 0 - CONFIG_CDCACM_STRBASE=4 - Base of string numbers (not really needed) - CONFIG_CDCACM_EPINTIN=1 - Endpoint numbers must be unique - CONFIG_CDCACM_EPBULKIN=2 - CONFIG_CDCACM_EPBULKOUT=3 - - CONFIG_USBMSC - USB mass storage device support - CONFIG_USBMSC_COMPOSITE=y - USB mass storage composite device support - CONFIG_USBMSC_IFNOBASE=2 - USB mass storage interfaces start with number 2 - CONFIG_USBMSC_STRBASE=4 - Base of string numbers (needed) - CONFIG_USBMSC_EPBULKOUT=4 - Endpoint numbers must be unique - CONFIG_USBMSC_EPBULKIN=5 - - CONFIG_NSH_BUILTIN_APPS - This add-on can be built as two NSH "built-in" commands if this option - is selected: 'conn' will connect the USB composite device; 'msdis' - will disconnect the USB composite device. - - Configuration options unique to this add-on: - - CONFIG_SYSTEM_COMPOSITE_DEBUGMM - Enables some debug tests to check for memory usage and memory leaks. - - CONFIG_SYSTEM_COMPOSITE_NLUNS - Defines the number of logical units (LUNs) exported by the USB storage - driver. Each LUN corresponds to one exported block driver (or partition - of a block driver). May be 1, 2, or 3. Default is 1. - CONFIG_SYSTEM_COMPOSITE_DEVMINOR1 - The minor device number of the block driver for the first LUN. For - example, N in /dev/mmcsdN. Used for registering the block driver. Default - is zero. - CONFIG_SYSTEM_COMPOSITE_DEVPATH1 - The full path to the registered block driver. Default is "/dev/mmcsd0" - CONFIG_SYSTEM_COMPOSITE_DEVMINOR2 and CONFIG_SYSTEM_COMPOSITE_DEVPATH2 - Similar parameters that would have to be provided if CONFIG_SYSTEM_COMPOSITE_NLUNS - is 2 or 3. No defaults. - CONFIG_SYSTEM_COMPOSITE_DEVMINOR3 and CONFIG_SYSTEM_COMPOSITE_DEVPATH2 - Similar parameters that would have to be provided if CONFIG_SYSTEM_COMPOSITE_NLUNS - is 3. No defaults. - - CONFIG_SYSTEM_COMPOSITE_TTYUSB - The minor number of the USB serial device. - Default is zero (corresponding to /dev/ttyUSB0 or /dev/ttyACM0). Default is zero. - CCONFIG_SYSTEM_COMPOSITE_SERDEV - The string corresponding to - CONFIG_SYSTEM_COMPOSITE_TTYUSB. The default is "/dev/ttyUSB0" (for the PL2303 - emulation) or "/dev/ttyACM0" (for the CDC/ACM serial device). - CONFIG_SYSTEM_COMPOSITE_BUFSIZE - The size of the serial I/O buffer in - bytes. Default 256 bytes. - - If CONFIG_USBDEV_TRACE is enabled (or CONFIG_DEBUG and CONFIG_DEBUG_USB), then - the add-on code will also manage the USB trace output. The amount of trace output - can be controlled using: - - CONFIG_SYSTEM_COMPOSITE_TRACEINIT - Show initialization events - CONFIG_SYSTEM_COMPOSITE_TRACECLASS - Show class driver events - CONFIG_SYSTEM_COMPOSITE_TRACETRANSFERS - Show data transfer events - CONFIG_SYSTEM_COMPOSITE_TRACECONTROLLER - Show controller events - CONFIG_SYSTEM_COMPOSITE_TRACEINTERRUPTS - Show interrupt-related events. +system/composite +^^^^^^^^^^^^^^^^^^ + + This logic adds a NXH command to control a USB composite device. The only + supported composite is CDC/ACM serial with a USB mass storage device. + + Required overall configuration: + + CONFIG_USBDEV=y - USB device support + CONFIG_USBDEV_COMPOSITE=y - USB composite device support + CONFIG_COMPOSITE_IAD=y - Interface associate descriptor needed + + CONFIG_CDCACM=y - USB CDC/ACM serial device support + CONFIG_CDCACM_COMPOSITE=y - USB CDC/ACM serial composite device support + CONFIG_CDCACM_IFNOBASE=0 - CDC/ACM interfaces start with number 0 + CONFIG_CDCACM_STRBASE=4 - Base of string numbers (not really needed) + CONFIG_CDCACM_EPINTIN=1 - Endpoint numbers must be unique + CONFIG_CDCACM_EPBULKIN=2 + CONFIG_CDCACM_EPBULKOUT=3 + + CONFIG_USBMSC - USB mass storage device support + CONFIG_USBMSC_COMPOSITE=y - USB mass storage composite device support + CONFIG_USBMSC_IFNOBASE=2 - USB mass storage interfaces start with number 2 + CONFIG_USBMSC_STRBASE=4 - Base of string numbers (needed) + CONFIG_USBMSC_EPBULKOUT=4 - Endpoint numbers must be unique + CONFIG_USBMSC_EPBULKIN=5 + + CONFIG_NSH_BUILTIN_APPS + This add-on can be built as two NSH "built-in" commands if this option + is selected: 'conn' will connect the USB composite device; 'msdis' + will disconnect the USB composite device. + + Configuration options unique to this add-on: + + CONFIG_SYSTEM_COMPOSITE_DEBUGMM + Enables some debug tests to check for memory usage and memory leaks. + + CONFIG_SYSTEM_COMPOSITE_NLUNS + Defines the number of logical units (LUNs) exported by the USB storage + driver. Each LUN corresponds to one exported block driver (or partition + of a block driver). May be 1, 2, or 3. Default is 1. + CONFIG_SYSTEM_COMPOSITE_DEVMINOR1 + The minor device number of the block driver for the first LUN. For + example, N in /dev/mmcsdN. Used for registering the block driver. Default + is zero. + CONFIG_SYSTEM_COMPOSITE_DEVPATH1 + The full path to the registered block driver. Default is "/dev/mmcsd0" + CONFIG_SYSTEM_COMPOSITE_DEVMINOR2 and CONFIG_SYSTEM_COMPOSITE_DEVPATH2 + Similar parameters that would have to be provided if CONFIG_SYSTEM_COMPOSITE_NLUNS + is 2 or 3. No defaults. + CONFIG_SYSTEM_COMPOSITE_DEVMINOR3 and CONFIG_SYSTEM_COMPOSITE_DEVPATH2 + Similar parameters that would have to be provided if CONFIG_SYSTEM_COMPOSITE_NLUNS + is 3. No defaults. + + CONFIG_SYSTEM_COMPOSITE_TTYUSB - The minor number of the USB serial device. + Default is zero (corresponding to /dev/ttyUSB0 or /dev/ttyACM0). Default is zero. + CCONFIG_SYSTEM_COMPOSITE_SERDEV - The string corresponding to + CONFIG_SYSTEM_COMPOSITE_TTYUSB. The default is "/dev/ttyUSB0" (for the PL2303 + emulation) or "/dev/ttyACM0" (for the CDC/ACM serial device). + CONFIG_SYSTEM_COMPOSITE_BUFSIZE - The size of the serial I/O buffer in + bytes. Default 256 bytes. + + If CONFIG_USBDEV_TRACE is enabled (or CONFIG_DEBUG_FEATURES and CONFIG_DEBUG_USB), then + the add-on code will also manage the USB trace output. The amount of trace output + can be controlled using: + + CONFIG_SYSTEM_COMPOSITE_TRACEINIT + Show initialization events + CONFIG_SYSTEM_COMPOSITE_TRACECLASS + Show class driver events + CONFIG_SYSTEM_COMPOSITE_TRACETRANSFERS + Show data transfer events + CONFIG_SYSTEM_COMPOSITE_TRACECONTROLLER + Show controller events + CONFIG_SYSTEM_COMPOSITE_TRACEINTERRUPTS + Show interrupt-related events. diff --git a/system/nxplayer/nxplayer.c b/system/nxplayer/nxplayer.c index 5fbb0006f..ffbce5e1a 100644 --- a/system/nxplayer/nxplayer.c +++ b/system/nxplayer/nxplayer.c @@ -515,7 +515,7 @@ static int nxplayer_readbuffer(FAR struct nxplayer_s *pPlayer, if (apb->nbytes < apb->nmaxbytes) { -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES int errcode = errno; int readerror = ferror(pPlayer->fileFd); @@ -534,7 +534,7 @@ static int nxplayer_readbuffer(FAR struct nxplayer_s *pPlayer, apb->flags |= AUDIO_APB_FINAL; -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES /* Was this a file read error */ if (apb->nbytes == 0 && readerror) @@ -632,7 +632,7 @@ static void *nxplayer_playthread(pthread_addr_t pvarg) #else FAR struct ap_buffer_s* pBuffers[CONFIG_AUDIO_NUM_BUFFERS]; #endif -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES int outstanding = 0; #endif int prio; @@ -772,7 +772,7 @@ static void *nxplayer_playthread(pthread_addr_t pvarg) failed = true; break; } -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES else { /* The audio driver has one more buffer */ @@ -875,7 +875,7 @@ static void *nxplayer_playthread(pthread_addr_t pvarg) /* An audio buffer is being dequeued by the driver */ case AUDIO_MSG_DEQUEUE: -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES /* Make sure that we believe that the audio driver has at * least one buffer. */ @@ -929,7 +929,7 @@ static void *nxplayer_playthread(pthread_addr_t pvarg) streaming = false; failed = true; } -#ifdef CONFIG_DEBUG +#ifdef CONFIG_DEBUG_FEATURES else { /* The audio driver has one more buffer */ diff --git a/system/usbmsc/Kconfig b/system/usbmsc/Kconfig index 1bfe307e8..a70cbc33c 100644 --- a/system/usbmsc/Kconfig +++ b/system/usbmsc/Kconfig @@ -90,7 +90,7 @@ config SYSTEM_USBMSC_TRACEINIT bool "USB Trace Initialization" default n ---help--- - If USBDEV_TRACE is enabled (or DEBUG and DEBUG_USB), + If USBDEV_TRACE is enabled (or CONFIG_DEBUG_FEATURES and CONFIG_DEBUG_USB), then the add-on code will also manage the USB trace output. The amount of trace output can be controlled this configuration value: This setting will show USB initialization events @@ -99,7 +99,7 @@ config SYSTEM_USBMSC_TRACECLASS bool "USB Trace Class" default n ---help--- - If USBDEV_TRACE is enabled (or DEBUG and DEBUG_USB), + If USBDEV_TRACE is enabled (or CONFIG_DEBUG_FEATURES and CONFIG_DEBUG_USB), then the add-on code will also manage the USB trace output. The amount of trace output can be controlled this configuration value: This setting will show USB class driver events @@ -108,7 +108,7 @@ config SYSTEM_USBMSC_TRACETRANSFERS bool "USB Trace Transfers" default n ---help--- - If USBDEV_TRACE is enabled (or DEBUG and DEBUG_USB), + If USBDEV_TRACE is enabled (or CONFIG_DEBUG_FEATURES and CONFIG_DEBUG_USB), then the add-on code will also manage the USB trace output. The amount of trace output can be controlled this configuration value: This setting will show USB data transfer events @@ -117,7 +117,7 @@ config SYSTEM_USBMSC_TRACECONTROLLER bool "USB Trace Device Controller Events" default n ---help--- - If USBDEV_TRACE is enabled (or DEBUG and DEBUG_USB), + If USBDEV_TRACE is enabled (or CONFIG_DEBUG_FEATURES and CONFIG_DEBUG_USB), then the add-on code will also manage the USB trace output. The amount of trace output can be controlled this configuration value: This setting will show USB device controller events @@ -126,7 +126,7 @@ config SYSTEM_USBMSC_TRACEINTERRUPTS bool "USB Trace Device Controller Interrupt Events" default n ---help--- - If USBDEV_TRACE is enabled (or DEBUG and DEBUG_USB), + If USBDEV_TRACE is enabled (or CONFIG_DEBUG_FEATURES and CONFIG_DEBUG_USB), then the add-on code will also manage the USB trace output. The amount of trace output can be controlled this configuration value: This setting will show USB device controller interrupt-related events. diff --git a/system/usbmsc/README.txt b/system/usbmsc/README.txt index 935687a51..27836b237 100755 --- a/system/usbmsc/README.txt +++ b/system/usbmsc/README.txt @@ -1,82 +1,82 @@ -system/usbmsc -^^^^^^^^^^^^^^^ - - This add-on registers a block device driver, then exports the block - the device using the USB storage class driver. In order to use this - add-on, your board-specific logic must provide the function: - - void board_usbmsc_initialize(void); - - This function will be called by the system/usbmsc indirectly via the - boarctl BOARDIOC_USBDEV_CONTROL command in order to do the actual - registration of the block device drivers. For examples of the - implementation of board_usbmsc_initialize() see - configs/mcu123-lpc124x/src/up_usbmsc.c or - configs/stm3210e-eval/src/usbmsc.c - - Configuration options: - - CONFIG_NSH_BUILTIN_APPS - This add-on can be built as two NSH "built-in" commands if this option - is selected: 'msconn' will connect the USB mass storage device; 'msdis' - will disconnect the USB storage device. - CONFIG_LIB_BOARDCTL - Enables the boardctl() interfaces. - CONFIG_BOARDCTL_USBDEVCTRL - Enables the BOARDIOC_USBDEV_CONTROL boardctl() command. - CONFIG_SYSTEM_USBMSC_NLUNS - Defines the number of logical units (LUNs) exported by the USB storage - driver. Each LUN corresponds to one exported block driver (or partition - of a block driver). May be 1, 2, or 3. Default is 1. - CONFIG_SYSTEM_USBMSC_DEVMINOR1 - The minor device number of the block driver for the first LUN. For - example, N in /dev/mmcsdN. Used for registering the block driver. Default - is zero. - CONFIG_SYSTEM_USBMSC_DEVPATH1 - The full path to the registered block driver. Default is "/dev/mmcsd0" - CONFIG_SYSTEM_USBMSC_DEVMINOR2 and CONFIG_SYSTEM_USBMSC_DEVPATH2 - Similar parameters that would have to be provided if CONFIG_SYSTEM_USBMSC_NLUNS - is 2 or 3. No defaults. - CONFIG_SYSTEM_USBMSC_DEVMINOR3 and CONFIG_SYSTEM_USBMSC_DEVPATH3 - Similar parameters that would have to be provided if CONFIG_SYSTEM_USBMSC_NLUNS - is 3. No defaults. - CONFIG_SYSTEM_USBMSC_DEBUGMM - Enables some debug tests to check for memory usage and memory leaks. - - If CONFIG_USBDEV_TRACE is enabled (or CONFIG_DEBUG and CONFIG_DEBUG_USB), then - the code will also manage the USB trace output. The amount of trace output - can be controlled using: - - CONFIG_SYSTEM_USBMSC_TRACEINIT - Show initialization events - CONFIG_SYSTEM_USBMSC_TRACECLASS - Show class driver events - CONFIG_SYSTEM_USBMSC_TRACETRANSFERS - Show data transfer events - CONFIG_SYSTEM_USBMSC_TRACECONTROLLER - Show controller events - CONFIG_SYSTEM_USBMSC_TRACEINTERRUPTS - Show interrupt-related events. - - Error results are always shown in the trace output - - NOTE 1: When built as an NSH add-on command (CONFIG_NSH_BUILTIN_APPS=y), - Caution should be used to assure that the SD drive (or other storage device) is - not in use when the USB storage device is configured. Specifically, the SD - driver should be unmounted like: - - nsh> mount -t vfat /dev/mmcsd0 /mnt/sdcard # Card is mounted in NSH - ... - nsh> umount /mnd/sdcard # Unmount before connecting USB!!! - nsh> msconn # Connect the USB storage device - ... - nsh> msdis # Disconnect USB storate device - nsh> mount -t vfat /dev/mmcsd0 /mnt/sdcard # Restore the mount - - Failure to do this could result in corruption of the SD card format. - - NOTE 2: This add-on used internal USB device driver interfaces. As such, - it relies on internal OS interfaces that are not normally available to a - user-space program. As a result, this add-on cannot be used if a - NuttX is built as a protected, supervisor kernel (CONFIG_BUILD_PROTECTED - or CONFIG_BUILD_KERNEL). +system/usbmsc +^^^^^^^^^^^^^^^ + + This add-on registers a block device driver, then exports the block + the device using the USB storage class driver. In order to use this + add-on, your board-specific logic must provide the function: + + void board_usbmsc_initialize(void); + + This function will be called by the system/usbmsc indirectly via the + boarctl BOARDIOC_USBDEV_CONTROL command in order to do the actual + registration of the block device drivers. For examples of the + implementation of board_usbmsc_initialize() see + configs/mcu123-lpc124x/src/up_usbmsc.c or + configs/stm3210e-eval/src/usbmsc.c + + Configuration options: + + CONFIG_NSH_BUILTIN_APPS + This add-on can be built as two NSH "built-in" commands if this option + is selected: 'msconn' will connect the USB mass storage device; 'msdis' + will disconnect the USB storage device. + CONFIG_LIB_BOARDCTL + Enables the boardctl() interfaces. + CONFIG_BOARDCTL_USBDEVCTRL + Enables the BOARDIOC_USBDEV_CONTROL boardctl() command. + CONFIG_SYSTEM_USBMSC_NLUNS + Defines the number of logical units (LUNs) exported by the USB storage + driver. Each LUN corresponds to one exported block driver (or partition + of a block driver). May be 1, 2, or 3. Default is 1. + CONFIG_SYSTEM_USBMSC_DEVMINOR1 + The minor device number of the block driver for the first LUN. For + example, N in /dev/mmcsdN. Used for registering the block driver. Default + is zero. + CONFIG_SYSTEM_USBMSC_DEVPATH1 + The full path to the registered block driver. Default is "/dev/mmcsd0" + CONFIG_SYSTEM_USBMSC_DEVMINOR2 and CONFIG_SYSTEM_USBMSC_DEVPATH2 + Similar parameters that would have to be provided if CONFIG_SYSTEM_USBMSC_NLUNS + is 2 or 3. No defaults. + CONFIG_SYSTEM_USBMSC_DEVMINOR3 and CONFIG_SYSTEM_USBMSC_DEVPATH3 + Similar parameters that would have to be provided if CONFIG_SYSTEM_USBMSC_NLUNS + is 3. No defaults. + CONFIG_SYSTEM_USBMSC_DEBUGMM + Enables some debug tests to check for memory usage and memory leaks. + + If CONFIG_USBDEV_TRACE is enabled (or CONFIG_DEBUG_FEATURES and CONFIG_DEBUG_USB), then + the code will also manage the USB trace output. The amount of trace output + can be controlled using: + + CONFIG_SYSTEM_USBMSC_TRACEINIT + Show initialization events + CONFIG_SYSTEM_USBMSC_TRACECLASS + Show class driver events + CONFIG_SYSTEM_USBMSC_TRACETRANSFERS + Show data transfer events + CONFIG_SYSTEM_USBMSC_TRACECONTROLLER + Show controller events + CONFIG_SYSTEM_USBMSC_TRACEINTERRUPTS + Show interrupt-related events. + + Error results are always shown in the trace output + + NOTE 1: When built as an NSH add-on command (CONFIG_NSH_BUILTIN_APPS=y), + Caution should be used to assure that the SD drive (or other storage device) is + not in use when the USB storage device is configured. Specifically, the SD + driver should be unmounted like: + + nsh> mount -t vfat /dev/mmcsd0 /mnt/sdcard # Card is mounted in NSH + ... + nsh> umount /mnd/sdcard # Unmount before connecting USB!!! + nsh> msconn # Connect the USB storage device + ... + nsh> msdis # Disconnect USB storate device + nsh> mount -t vfat /dev/mmcsd0 /mnt/sdcard # Restore the mount + + Failure to do this could result in corruption of the SD card format. + + NOTE 2: This add-on used internal USB device driver interfaces. As such, + it relies on internal OS interfaces that are not normally available to a + user-space program. As a result, this add-on cannot be used if a + NuttX is built as a protected, supervisor kernel (CONFIG_BUILD_PROTECTED + or CONFIG_BUILD_KERNEL). diff --git a/system/zmodem/Makefile.host b/system/zmodem/Makefile.host index 288bb0a16..6d7e5fba5 100755 --- a/system/zmodem/Makefile.host +++ b/system/zmodem/Makefile.host @@ -43,7 +43,7 @@ # make -f Makefile.host TOPDIR=/home/me/projects/nuttx # APPDIR=/home/me/projects/apps # -# 2. Add CONFIG_DEBUG=1 to the make command line to enable debug output +# 2. Add CONFIG_DEBUG_FEATURES=1 to the make command line to enable debug output # 3. Make sure to clean old target .o files before making new host .o # files. # @@ -62,7 +62,7 @@ HOSTAPPS = $(ZMODEM)/host/apps HOSTCFLAGS += -isystem $(HOSTDIR) -I $(ZMODEM) HOSTCFLAGS += -Dsz_main=main -Drz_main=main -ifeq ($(CONFIG_DEBUG),y) +ifeq ($(CONFIG_DEBUG_FEATURES),y) HOSTCFLAGS += -DCONFIG_DEBUG_ZMODEM=1 -DCONFIG_SYSTEM_ZMODEM_DUMPBUFFER=1 endif diff --git a/system/zmodem/README.txt b/system/zmodem/README.txt index a9dd7ef10..bf33e798e 100755 --- a/system/zmodem/README.txt +++ b/system/zmodem/README.txt @@ -174,7 +174,7 @@ Building the Zmodem Tools to Run Under Linux make -f Makefile.host TOPDIR=/home/me/projects/nuttx APPDIR=/home/me/projects/apps - 2. Add CONFIG_DEBUG=1 to the make command line to enable debug output + 2. Add CONFIG_DEBUG_FEATURES=1 to the make command line to enable debug output 3. Make sure to clean old target .o files before making new host .o files. This build is has been verified as of 2013-7-16 using Linux to transfer From e82a54bf18b0204baeebad48ca965b48d7008ae9 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 11 Jun 2016 14:49:55 -0600 Subject: [PATCH 46/74] Reserver the name 'err' for other purposes --- examples/ajoystick/ajoy_main.c | 6 ++-- examples/configdata/configdata_main.c | 8 +++--- examples/djoystick/djoy_main.c | 6 ++-- examples/elf/elf_main.c | 20 +++++++------- examples/fstest/fstest_main.c | 7 +++-- examples/nxffs/nxffs_main.c | 6 ++-- examples/nxflat/nxflat_main.c | 20 +++++++------- examples/posix_spawn/spawn_main.c | 40 +++++++++++++-------------- examples/smart/smart_main.c | 7 +++-- examples/zerocross/zerocross_main.c | 6 ++-- interpreters/bas/bas.c | 10 +++---- interpreters/bas/bas_program.c | 7 +++-- interpreters/bas/bas_statement.c | 7 +++-- netutils/esp8266/esp8266.c | 6 ++-- netutils/ftpc/ftpc_login.c | 8 +++--- netutils/thttpd/cgi-src/redirect.c | 9 +++--- netutils/thttpd/cgi-src/ssi.c | 10 +++---- netutils/thttpd/thttpd_cgi.c | 11 ++++---- 18 files changed, 100 insertions(+), 94 deletions(-) diff --git a/examples/ajoystick/ajoy_main.c b/examples/ajoystick/ajoy_main.c index c047d2555..7d90037c6 100644 --- a/examples/ajoystick/ajoy_main.c +++ b/examples/ajoystick/ajoy_main.c @@ -387,7 +387,7 @@ int ajoy_main(int argc, char *argv[]) int fd; int tmp; int ret; - int err = EXIT_FAILURE; + int errcode = EXIT_FAILURE; /* Reset some globals that might been been left in a bad state */ @@ -459,9 +459,9 @@ int ajoy_main(int argc, char *argv[]) } } - err = EXIT_SUCCESS; + errcode = EXIT_SUCCESS; errout_with_fd: close(fd); - return err; + return errcode; } diff --git a/examples/configdata/configdata_main.c b/examples/configdata/configdata_main.c index 95a31ca55..d729b60e3 100644 --- a/examples/configdata/configdata_main.c +++ b/examples/configdata/configdata_main.c @@ -408,7 +408,7 @@ static int configdata_verifyconfig(void) { FAR struct configdata_entrydesc_s *entry; int ret; - int err = OK; + int errcode = OK; int i; static int iteration = 0; @@ -441,7 +441,7 @@ static int configdata_verifyconfig(void) printf("ERROR: Failed to read an entry: %d\n", i); printf(" Entry id: %04X\n", entry->id); printf(" Entry size: %d\n", entry->len); - err = ERROR; + errcode = ERROR; } } else @@ -453,7 +453,7 @@ static int configdata_verifyconfig(void) printf("ERROR: Succesffully read a deleted entry\n"); printf(" Entry id: %04X\n", entry->id); printf(" Entry size: %d\n", entry->len); - err = ERROR; + errcode = ERROR; } else { @@ -466,7 +466,7 @@ static int configdata_verifyconfig(void) } } - return err; + return errcode; } /**************************************************************************** diff --git a/examples/djoystick/djoy_main.c b/examples/djoystick/djoy_main.c index bf4139228..2971fffc2 100644 --- a/examples/djoystick/djoy_main.c +++ b/examples/djoystick/djoy_main.c @@ -150,7 +150,7 @@ int djoy_main(int argc, char *argv[]) int fd; int tmp; int ret; - int err = EXIT_FAILURE; + int errcode = EXIT_FAILURE; /* Reset some globals that might been been left in a bad state */ @@ -248,9 +248,9 @@ int djoy_main(int argc, char *argv[]) g_djoylast = newset; } - err = EXIT_SUCCESS; + errcode = EXIT_SUCCESS; errout_with_fd: close(fd); - return err; + return errcode; } diff --git a/examples/elf/elf_main.c b/examples/elf/elf_main.c index bb8c95d72..5543ba575 100644 --- a/examples/elf/elf_main.c +++ b/examples/elf/elf_main.c @@ -107,18 +107,18 @@ #ifdef CONFIG_CPP_HAVE_VARARGS # ifdef CONFIG_DEBUG_FEATURES # define message(format, ...) dbg(format, ##__VA_ARGS__) -# define err(format, ...) dbg(format, ##__VA_ARGS__) +# define errmsg(format, ...) dbg(format, ##__VA_ARGS__) # else # define message(format, ...) printf(format, ##__VA_ARGS__) -# define err(format, ...) fprintf(stderr, format, ##__VA_ARGS__) +# define errmsg(format, ...) fprintf(stderr, format, ##__VA_ARGS__) # endif #else # ifdef CONFIG_DEBUG_FEATURES # define message dbg -# define err dbg +# define errmsg dbg # else # define message printf -# define err printf +# define errmsg printf # endif #endif @@ -241,7 +241,7 @@ int elf_main(int argc, char *argv[]) ret = elf_initialize(); if (ret < 0) { - err("ERROR: Initialization of the ELF loader failed: %d\n", ret); + errmsg("ERROR: Initialization of the ELF loader failed: %d\n", ret); exit(1); } @@ -254,7 +254,7 @@ int elf_main(int argc, char *argv[]) NSECTORS(romfs_img_len), SECTORSIZE); if (ret < 0) { - err("ERROR: romdisk_register failed: %d\n", ret); + errmsg("ERROR: romdisk_register failed: %d\n", ret); elf_uninitialize(); exit(1); } @@ -269,8 +269,8 @@ int elf_main(int argc, char *argv[]) ret = mount(CONFIG_EXAMPLES_ELF_DEVPATH, MOUNTPT, "romfs", MS_RDONLY, NULL); if (ret < 0) { - err("ERROR: mount(%s,%s,romfs) failed: %s\n", - CONFIG_EXAMPLES_ELF_DEVPATH, MOUNTPT, errno); + errmsg("ERROR: mount(%s,%s,romfs) failed: %s\n", + CONFIG_EXAMPLES_ELF_DEVPATH, MOUNTPT, errno); elf_uninitialize(); } @@ -319,7 +319,7 @@ int elf_main(int argc, char *argv[]) ret = load_module(&bin); if (ret < 0) { - err("ERROR: Failed to load program '%s'\n", dirlist[i]); + errmsg("ERROR: Failed to load program '%s'\n", dirlist[i]); exit(1); } @@ -333,7 +333,7 @@ int elf_main(int argc, char *argv[]) if (ret < 0) { - err("ERROR: Failed to execute program '%s'\n", dirlist[i]); + errmsg("ERROR: Failed to execute program '%s'\n", dirlist[i]); } else { diff --git a/examples/fstest/fstest_main.c b/examples/fstest/fstest_main.c index 8cc31b69d..c86b8f062 100644 --- a/examples/fstest/fstest_main.c +++ b/examples/fstest/fstest_main.c @@ -318,21 +318,22 @@ static inline int fstest_wrfile(FAR struct fstest_filedesc_s *file) nbyteswritten = write(fd, &g_fileimage[offset], nbytestowrite); if (nbyteswritten < 0) { - int err = errno; + int errcode = errno; /* If the write failed because there is no space on the device, * then don't complain. */ - if (err != ENOSPC) + if (errcode != ENOSPC) { - printf("ERROR: Failed to write file: %d\n", err); + printf("ERROR: Failed to write file: %d\n", errcode); printf(" File name: %s\n", file->name); printf(" File size: %d\n", file->len); printf(" Write offset: %ld\n", (long)offset); printf(" Write size: %ld\n", (long)nbytestowrite); ret = ERROR; } + close(fd); /* Remove any garbage file that might have been left behind */ diff --git a/examples/nxffs/nxffs_main.c b/examples/nxffs/nxffs_main.c index 117af7caf..5e501ce16 100644 --- a/examples/nxffs/nxffs_main.c +++ b/examples/nxffs/nxffs_main.c @@ -351,15 +351,15 @@ static inline int nxffs_wrfile(FAR struct nxffs_filedesc_s *file) nbyteswritten = write(fd, &g_fileimage[offset], nbytestowrite); if (nbyteswritten < 0) { - int err = errno; + int errcode = errno; /* If the write failed because there is no space on the device, * then don't complain. */ - if (err != ENOSPC) + if (errcode != ENOSPC) { - printf("ERROR: Failed to write file: %d\n", err); + printf("ERROR: Failed to write file: %d\n", errcode); printf(" File name: %s\n", file->name); printf(" File size: %lu\n", (unsigned long)file->len); printf(" Write offset: %ld\n", (long)offset); diff --git a/examples/nxflat/nxflat_main.c b/examples/nxflat/nxflat_main.c index e4190c6ab..0c75ba10f 100644 --- a/examples/nxflat/nxflat_main.c +++ b/examples/nxflat/nxflat_main.c @@ -103,18 +103,18 @@ #ifdef CONFIG_CPP_HAVE_VARARGS # ifdef CONFIG_DEBUG_FEATURES # define message(format, ...) dbg(format, ##__VA_ARGS__) -# define err(format, ...) dbg(format, ##__VA_ARGS__) +# define errmsg(format, ...) dbg(format, ##__VA_ARGS__) # else # define message(format, ...) printf(format, ##__VA_ARGS__) -# define err(format, ...) fprintf(stderr, format, ##__VA_ARGS__) +# define errmsg(format, ...) fprintf(stderr, format, ##__VA_ARGS__) # endif #else # ifdef CONFIG_DEBUG_FEATURES # define message dbg -# define err dbg +# define errmsg dbg # else # define message printf -# define err printf +# define errmsg printf # endif #endif @@ -170,7 +170,7 @@ int nxflat_main(int argc, char *argv[]) ret = nxflat_initialize(); if (ret < 0) { - err("ERROR: Initialization of the NXFLAT loader failed: %d\n", ret); + errmsg("ERROR: Initialization of the NXFLAT loader failed: %d\n", ret); exit(1); } @@ -180,7 +180,7 @@ int nxflat_main(int argc, char *argv[]) ret = romdisk_register(0, (FAR uint8_t *)romfs_img, NSECTORS(romfs_img_len), SECTORSIZE); if (ret < 0) { - err("ERROR: romdisk_register failed: %d\n", ret); + errmsg("ERROR: romdisk_register failed: %d\n", ret); nxflat_uninitialize(); exit(1); } @@ -193,8 +193,8 @@ int nxflat_main(int argc, char *argv[]) ret = mount(ROMFSDEV, MOUNTPT, "romfs", MS_RDONLY, NULL); if (ret < 0) { - err("ERROR: mount(%s,%s,romfs) failed: %s\n", - ROMFSDEV, MOUNTPT, errno); + errmsg("ERROR: mount(%s,%s,romfs) failed: %s\n", + ROMFSDEV, MOUNTPT, errno); nxflat_uninitialize(); } @@ -241,7 +241,7 @@ int nxflat_main(int argc, char *argv[]) ret = load_module(&bin); if (ret < 0) { - err("ERROR: Failed to load program '%s'\n", dirlist[i]); + errmsg("ERROR: Failed to load program '%s'\n", dirlist[i]); exit(1); } @@ -250,7 +250,7 @@ int nxflat_main(int argc, char *argv[]) ret = exec_module(&bin); if (ret < 0) { - err("ERROR: Failed to execute program '%s'\n", dirlist[i]); + errmsg("ERROR: Failed to execute program '%s'\n", dirlist[i]); unload_module(&bin); } diff --git a/examples/posix_spawn/spawn_main.c b/examples/posix_spawn/spawn_main.c index 6cc47f08b..1480f21bf 100644 --- a/examples/posix_spawn/spawn_main.c +++ b/examples/posix_spawn/spawn_main.c @@ -110,18 +110,18 @@ #ifdef CONFIG_CPP_HAVE_VARARGS # ifdef CONFIG_DEBUG_FEATURES # define message(format, ...) dbg(format, ##__VA_ARGS__) -# define err(format, ...) dbg(format, ##__VA_ARGS__) +# define errmsg(format, ...) dbg(format, ##__VA_ARGS__) # else # define message(format, ...) printf(format, ##__VA_ARGS__) -# define err(format, ...) fprintf(stderr, format, ##__VA_ARGS__) +# define errmsg(format, ...) fprintf(stderr, format, ##__VA_ARGS__) # endif #else # ifdef CONFIG_DEBUG_FEATURES # define message dbg -# define err dbg +# define errmsg dbg # else # define message printf -# define err printf +# define errmsg printf # endif #endif @@ -244,7 +244,7 @@ int spawn_main(int argc, char *argv[]) ret = elf_initialize(); if (ret < 0) { - err("ERROR: Initialization of the ELF loader failed: %d\n", ret); + errmsg("ERROR: Initialization of the ELF loader failed: %d\n", ret); exit(1); } @@ -257,7 +257,7 @@ int spawn_main(int argc, char *argv[]) NSECTORS(romfs_img_len), SECTORSIZE); if (ret < 0) { - err("ERROR: romdisk_register failed: %d\n", ret); + errmsg("ERROR: romdisk_register failed: %d\n", ret); elf_uninitialize(); exit(1); } @@ -272,8 +272,8 @@ int spawn_main(int argc, char *argv[]) ret = mount(CONFIG_EXAMPLES_ELF_DEVPATH, MOUNTPT, "romfs", MS_RDONLY, NULL); if (ret < 0) { - err("ERROR: mount(%s,%s,romfs) failed: %s\n", - CONFIG_EXAMPLES_ELF_DEVPATH, MOUNTPT, errno); + errmsg("ERROR: mount(%s,%s,romfs) failed: %s\n", + CONFIG_EXAMPLES_ELF_DEVPATH, MOUNTPT, errno); elf_uninitialize(); } @@ -307,14 +307,14 @@ int spawn_main(int argc, char *argv[]) ret = posix_spawn_file_actions_init(&file_actions); if (ret != 0) { - err("ERROR: posix_spawn_file_actions_init failed: %d\n", ret); + errmsg("ERROR: posix_spawn_file_actions_init failed: %d\n", ret); } posix_spawn_file_actions_dump(&file_actions); ret = posix_spawnattr_init(&attr); if (ret != 0) { - err("ERROR: posix_spawnattr_init failed: %d\n", ret); + errmsg("ERROR: posix_spawnattr_init failed: %d\n", ret); } posix_spawnattr_dump(&attr); @@ -340,7 +340,7 @@ int spawn_main(int argc, char *argv[]) ret = posix_spawn(&pid, filepath, &file_actions, &attr, NULL, (FAR char * const*)&g_argv); if (ret != 0) { - err("ERROR: posix_spawn failed: %d\n", ret); + errmsg("ERROR: posix_spawn failed: %d\n", ret); } sleep(4); @@ -351,14 +351,14 @@ int spawn_main(int argc, char *argv[]) ret = posix_spawn_file_actions_destroy(&file_actions); if (ret != 0) { - err("ERROR: posix_spawn_file_actions_destroy failed: %d\n", ret); + errmsg("ERROR: posix_spawn_file_actions_destroy failed: %d\n", ret); } posix_spawn_file_actions_dump(&file_actions); ret = posix_spawnattr_destroy(&attr); if (ret != 0) { - err("ERROR: posix_spawnattr_destroy failed: %d\n", ret); + errmsg("ERROR: posix_spawnattr_destroy failed: %d\n", ret); } posix_spawnattr_dump(&attr); @@ -379,14 +379,14 @@ int spawn_main(int argc, char *argv[]) ret = posix_spawn_file_actions_init(&file_actions); if (ret != 0) { - err("ERROR: posix_spawn_file_actions_init failed: %d\n", ret); + errmsg("ERROR: posix_spawn_file_actions_init failed: %d\n", ret); } posix_spawn_file_actions_dump(&file_actions); ret = posix_spawnattr_init(&attr); if (ret != 0) { - err("ERROR: posix_spawnattr_init failed: %d\n", ret); + errmsg("ERROR: posix_spawnattr_init failed: %d\n", ret); } posix_spawnattr_dump(&attr); @@ -397,7 +397,7 @@ int spawn_main(int argc, char *argv[]) ret = posix_spawn_file_actions_addclose(&file_actions, 0); if (ret != 0) { - err("ERROR: posix_spawn_file_actions_addclose failed: %d\n", ret); + errmsg("ERROR: posix_spawn_file_actions_addclose failed: %d\n", ret); } posix_spawn_file_actions_dump(&file_actions); @@ -405,7 +405,7 @@ int spawn_main(int argc, char *argv[]) ret = posix_spawn_file_actions_addopen(&file_actions, 0, fullpath, O_RDONLY, 0644); if (ret != 0) { - err("ERROR: posix_spawn_file_actions_addopen failed: %d\n", ret); + errmsg("ERROR: posix_spawn_file_actions_addopen failed: %d\n", ret); } posix_spawn_file_actions_dump(&file_actions); @@ -431,7 +431,7 @@ int spawn_main(int argc, char *argv[]) ret = posix_spawn(&pid, filepath, &file_actions, &attr, NULL, NULL); if (ret != 0) { - err("ERROR: posix_spawn failed: %d\n", ret); + errmsg("ERROR: posix_spawn failed: %d\n", ret); } sleep(2); @@ -442,14 +442,14 @@ int spawn_main(int argc, char *argv[]) ret = posix_spawn_file_actions_destroy(&file_actions); if (ret != 0) { - err("ERROR: posix_spawn_file_actions_destroy failed: %d\n", ret); + errmsg("ERROR: posix_spawn_file_actions_destroy failed: %d\n", ret); } posix_spawn_file_actions_dump(&file_actions); ret = posix_spawnattr_destroy(&attr); if (ret != 0) { - err("ERROR: posix_spawnattr_destroy failed: %d\n", ret); + errmsg("ERROR: posix_spawnattr_destroy failed: %d\n", ret); } posix_spawnattr_dump(&attr); diff --git a/examples/smart/smart_main.c b/examples/smart/smart_main.c index b189205b3..0504ec976 100644 --- a/examples/smart/smart_main.c +++ b/examples/smart/smart_main.c @@ -356,21 +356,22 @@ static inline int smart_wrfile(FAR struct smart_filedesc_s *file) nbyteswritten = write(fd, &g_fileimage[offset], nbytestowrite); if (nbyteswritten < 0) { - int err = errno; + int errcode = errno; /* If the write failed because there is no space on the device, * then don't complain. */ - if (err != ENOSPC) + if (errcode != ENOSPC) { - printf("ERROR: Failed to write file: %d\n", err); + printf("ERROR: Failed to write file: %d\n", errcode); printf(" File name: %s\n", file->name); printf(" File size: %d\n", file->len); printf(" Write offset: %ld\n", (long)offset); printf(" Write size: %ld\n", (long)nbytestowrite); ret = ERROR; } + close(fd); /* Remove any garbage file that might have been left behind */ diff --git a/examples/zerocross/zerocross_main.c b/examples/zerocross/zerocross_main.c index 89d66aee6..40d7b1152 100644 --- a/examples/zerocross/zerocross_main.c +++ b/examples/zerocross/zerocross_main.c @@ -92,7 +92,7 @@ int zerocross_main(int argc, char *argv[]) int fd; int tmp; int ret; - int err = EXIT_FAILURE; + int errcode = EXIT_FAILURE; /* Open the zerocross device */ @@ -140,9 +140,9 @@ int zerocross_main(int argc, char *argv[]) printf("Sample = %d\n", value.si_value.sival_int); } - err = EXIT_SUCCESS; + errcode = EXIT_SUCCESS; errout_with_fd: close(fd); - return err; + return errcode; } diff --git a/interpreters/bas/bas.c b/interpreters/bas/bas.c index fdbe67e14..b69c6b8ab 100644 --- a/interpreters/bas/bas.c +++ b/interpreters/bas/bas.c @@ -173,7 +173,7 @@ static int cat(const char *filename) int fd; char buf[4096]; ssize_t l; - int err; + int errcode; if ((fd = open(filename, O_RDONLY)) == -1) { @@ -189,9 +189,9 @@ static int cat(const char *filename) { if ((w = write(1, buf + off, l - off)) == -1) { - err = errno; + errcode = errno; close(fd); - errno = err; + errno = errcode; return -1; } @@ -201,9 +201,9 @@ static int cat(const char *filename) if (l == -1) { - err = errno; + errcode = errno; close(fd); - errno = err; + errno = errcode; return -1; } diff --git a/interpreters/bas/bas_program.c b/interpreters/bas/bas_program.c index f132c7b27..dd6e0daf4 100644 --- a/interpreters/bas/bas_program.c +++ b/interpreters/bas/bas_program.c @@ -671,10 +671,11 @@ void Program_PCtoError(struct Program *this, struct Pc *pc, struct Value *v) struct Value *Program_merge(struct Program *this, int dev, struct Value *value) { struct String s; - int l, err = 0; + int l; + int errcode = 0; l = 0; - while (String_new(&s), (err = FS_appendToString(dev, &s, 1)) != -1 && + while (String_new(&s), (errcode = FS_appendToString(dev, &s, 1)) != -1 && s.length) { struct Token *line; @@ -702,7 +703,7 @@ struct Value *Program_merge(struct Program *this, int dev, struct Value *value) } String_destroy(&s); - if (err) + if (errcode) { return Value_new_ERROR(value, IOERROR, FS_errmsg); } diff --git a/interpreters/bas/bas_statement.c b/interpreters/bas/bas_statement.c index 4d72c25e9..aeb0dc211 100644 --- a/interpreters/bas/bas_statement.c +++ b/interpreters/bas/bas_statement.c @@ -271,9 +271,10 @@ struct Value *stmt_CASE(struct Value *value) struct Value *stmt_CHDIR_MKDIR(struct Value *value) { - int res = -1, err = -1; struct Pc dirpc; struct Pc statementpc = g_pc; + int res = -1; + int errcode = -1; ++g_pc.token; dirpc = g_pc; @@ -299,14 +300,14 @@ struct Value *stmt_CHDIR_MKDIR(struct Value *value) assert(0); } - err = errno; + errcode = errno; } Value_destroy(value); if (g_pass == INTERPRET && res == -1) { g_pc = dirpc; - return Value_new_ERROR(value, IOERROR, strerror(err)); + return Value_new_ERROR(value, IOERROR, strerror(errcode)); } return (struct Value *)0; diff --git a/netutils/esp8266/esp8266.c b/netutils/esp8266/esp8266.c index 0e996edc6..3eb6aa5e1 100644 --- a/netutils/esp8266/esp8266.c +++ b/netutils/esp8266/esp8266.c @@ -270,9 +270,9 @@ static int lesp_low_level_read(uint8_t* buf, int size) ret = poll(fds, 1, lespPOLLING_TIME_MS); if (ret < 0) { - int err = errno; - ndbg("worker read Error %d (errno %d)\n", ret, err); - UNUSED(err); + int errcode = errno; + ndbg("worker read Error %d (errno %d)\n", ret, errcode); + UNUSED(errcode); } else if ((fds[0].revents & POLLERR) && (fds[0].revents & POLLHUP)) { diff --git a/netutils/ftpc/ftpc_login.c b/netutils/ftpc/ftpc_login.c index b2e01d268..4af7c21cb 100644 --- a/netutils/ftpc/ftpc_login.c +++ b/netutils/ftpc/ftpc_login.c @@ -82,7 +82,7 @@ int ftpc_login(SESSION handle, FAR struct ftpc_login_s *login) { FAR struct ftpc_session_s *session = (FAR struct ftpc_session_s *)handle; - int err; + int errcode; int ret; /* Verify that we are connected to a server */ @@ -90,7 +90,7 @@ int ftpc_login(SESSION handle, FAR struct ftpc_login_s *login) if (!ftpc_connected(session)) { ndbg("Not connected\n"); - err = ENOTCONN; + errcode = ENOTCONN; goto errout_with_err; } @@ -99,7 +99,7 @@ int ftpc_login(SESSION handle, FAR struct ftpc_login_s *login) if (ftpc_loggedin(session)) { ndbg("Already logged in\n"); - err = EINVAL; + errcode = EINVAL; goto errout_with_err; } @@ -130,7 +130,7 @@ int ftpc_login(SESSION handle, FAR struct ftpc_login_s *login) return OK; errout_with_err: - set_errno(err); + set_errno(errcode); errout: return ERROR; } diff --git a/netutils/thttpd/cgi-src/redirect.c b/netutils/thttpd/cgi-src/redirect.c index 3b1b1df7c..5cf42803d 100644 --- a/netutils/thttpd/cgi-src/redirect.c +++ b/netutils/thttpd/cgi-src/redirect.c @@ -158,7 +158,7 @@ int main(int argc, char *argv[]) char *cp = 0; FILE *fp; char *star; - int err = 0; + int errcode = 0; /* Get the name that we were run as, which is the filename being ** * redirected. @@ -195,7 +195,7 @@ int main(int argc, char *argv[]) if (fp == (FILE *) 0) { internal_error("Couldn't open .redirects file."); - err = 3; + errcode = 3; goto errout_with_cp; } @@ -260,7 +260,7 @@ int main(int argc, char *argv[]) /* No match found. */ not_found(script_name); - err = 4; + errcode = 4; success_out: fclose(fp); @@ -269,5 +269,6 @@ errout_with_cp: { free(cp); } - return err; + + return errcode; } diff --git a/netutils/thttpd/cgi-src/ssi.c b/netutils/thttpd/cgi-src/ssi.c index e2374122e..2d4c1407d 100644 --- a/netutils/thttpd/cgi-src/ssi.c +++ b/netutils/thttpd/cgi-src/ssi.c @@ -888,7 +888,7 @@ int main(int argc, char *argv[]) char *script_name; char *path_info; char *path_translated; - int err = 0; + int errcode = 0; /* Default formats. */ @@ -930,14 +930,14 @@ int main(int argc, char *argv[]) if (!path_translated) { internal_error("Couldn't get PATH_TRANSLATED environment variable."); - err = 3; + errcode = 3; goto errout_with_g_url; } if (!check_filename(path_translated)) { not_permitted("initial", "PATH_TRANSLATED", path_translated); - err = 4; + errcode = 4; goto errout_with_g_url; } @@ -947,7 +947,7 @@ int main(int argc, char *argv[]) if (!instream) { not_found(path_translated); - err = 5; + errcode = 5; goto errout_with_g_url; } @@ -959,5 +959,5 @@ int main(int argc, char *argv[]) errout_with_g_url: free(g_url); - return err; + return errcode; } diff --git a/netutils/thttpd/thttpd_cgi.c b/netutils/thttpd/thttpd_cgi.c index 45ef74387..b7f7bb587 100644 --- a/netutils/thttpd/thttpd_cgi.c +++ b/netutils/thttpd/thttpd_cgi.c @@ -707,7 +707,7 @@ static int cgi_child(int argc, char **argv) int nbytes; int fd; int ret; - int err = 1; + int errcode = 1; /* Use low-level debug out (because the low-level output may survive closing * all file descriptors @@ -954,7 +954,7 @@ static int cgi_child(int argc, char **argv) } } while (!outdone); - err = 0; + errcode = 0; /* Get rid of watch structures */ @@ -977,15 +977,16 @@ errout_with_cgiconn: httpd_free(cc); errout: - nllinfo("Return %d\n", err); - if (err != 0) + nllinfo("Return %d\n", errcode); + if (errcode != 0) { INTERNALERROR("errout"); httpd_send_err(hc, 500, err500title, "", err500form, hc->encodedurl); httpd_write_response(hc); cgi_semgive(); } - return err; + + return errcode; } /**************************************************************************** From f4bae25e32202c354612b875e87bf24f7009d84d Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 11 Jun 2016 14:55:13 -0600 Subject: [PATCH 47/74] Rename *lldbg to *llerr --- examples/cc3000/telnetd_daemon.c | 12 +++---- examples/cc3000/telnetd_driver.c | 16 +++++----- examples/helloxx/helloxx_main.cxx | 4 +-- netutils/ftpc/ftpc_transfer.c | 2 +- netutils/telnetd/telnetd_daemon.c | 14 ++++---- netutils/thttpd/fdwatch.c | 10 +++--- netutils/thttpd/thttpd_cgi.c | 32 +++++++++---------- nshlib/nsh_netinit.c | 2 +- platform/arduino-due/sam_cxxinitialize.c | 4 +-- platform/cloudctrl/stm32_cxxinitialize.c | 4 +-- platform/fire-stm32v2/stm32_cxxinitialize.c | 4 +-- platform/mikroe-stm32f4/stm32_cxxinitialize.c | 4 +-- platform/nucleo-144/stm32_cxxinitialize.c | 4 +-- platform/nucleo-f303re/stm32_cxxinitialize.c | 4 +-- platform/nucleo-f4x1re/stm32_cxxinitialize.c | 4 +-- platform/nucleo-l476rg/stm32_cxxinitialize.c | 4 +-- .../olimex-stm32-h405/stm32_cxxinitialize.c | 4 +-- .../olimex-stm32-h407/stm32_cxxinitialize.c | 4 +-- .../olimex-stm32-p207/stm32_cxxinitialize.c | 4 +-- .../olimexino-stm32/stm32_cxxinitialize.c | 4 +-- platform/pcduino-a10/a1x_cxxinitialize.c | 4 +-- platform/sabre-6quad/imx_cxxinitialize.c | 4 +-- platform/sam3u-ek/sam_cxxinitialized.c | 4 +-- platform/sam4e-ek/sam_cxxinitialize.c | 4 +-- platform/sam4l-xplained/sam_cxxinitialize.c | 4 +-- .../sam4s-xplained-pro/sam_cxxinitialize.c | 4 +-- platform/sam4s-xplained/sam_cxxinitialize.c | 4 +-- platform/sama5d2-xult/sam_cxxinitialize.c | 4 +-- platform/sama5d3-xplained/sam_cxxinitialize.c | 4 +-- platform/sama5d3x-ek/sam_cxxinitialize.c | 4 +-- platform/sama5d4-ek/sam_cxxinitialize.c | 4 +-- platform/samd20-xplained/sam_cxxinitialize.c | 4 +-- platform/samd21-xplained/sam_cxxinitialize.c | 4 +-- platform/same70-xplained/sam_cxxinitialize.c | 4 +-- platform/saml21-xplained/sam_cxxinitialize.c | 4 +-- platform/samv71-xult/sam_cxxinitialize.c | 4 +-- platform/shenzhou/stm32_cxxinitialize.c | 4 +-- platform/spark/stm32_cxxinitialize.c | 4 +-- platform/stm3220g-eval/stm32_cxxinitialize.c | 4 +-- platform/stm3240g-eval/stm32_cxxinitialize.c | 4 +-- .../stm32f3discovery/stm32_cxxinitialize.c | 4 +-- .../stm32f429i-disco/stm32_cxxinitialize.c | 4 +-- .../stm32f4discovery/stm32_cxxinitialize.c | 4 +-- .../stm32f746g-disco/stm32_cxxinitialize.c | 4 +-- .../stm32l476vg-disco/stm32_cxxinitialize.c | 4 +-- .../stm32ldiscovery/stm32_cxxinitialize.c | 4 +-- platform/teensy-lc/kl_cxxinitialize.c | 4 +-- .../viewtool-stm32f107/stm32_cxxinitialize.c | 4 +-- system/ubloxmodem/ubloxmodem_main.c | 4 +-- 49 files changed, 128 insertions(+), 128 deletions(-) diff --git a/examples/cc3000/telnetd_daemon.c b/examples/cc3000/telnetd_daemon.c index 1e2cb0392..9245b5ebf 100644 --- a/examples/cc3000/telnetd_daemon.c +++ b/examples/cc3000/telnetd_daemon.c @@ -160,7 +160,7 @@ static int telnetd_daemon(int argc, char *argv[]) goto errout_with_socket; } - /* Now go silent. Only the lldbg family of debug functions should + /* Now go silent. Only the llerr family of debug functions should * be used after this point because these do not depend on stdout * being available. */ @@ -181,7 +181,7 @@ static int telnetd_daemon(int argc, char *argv[]) acceptsd = accept(listensd, (struct sockaddr*)&myaddr, &addrlen); if (acceptsd < 0) { - nlldbg("accept failed: %d\n", errno); + nllerr("accept failed: %d\n", errno); goto errout_with_socket; } @@ -192,7 +192,7 @@ static int telnetd_daemon(int argc, char *argv[]) ling.l_linger = 30; /* timeout is seconds */ if (setsockopt(acceptsd, SOL_SOCKET, SO_LINGER, &ling, sizeof(struct linger)) < 0) { - nlldbg("setsockopt failed: %d\n", errno); + nllerr("setsockopt failed: %d\n", errno); goto errout_with_acceptsd; } #endif @@ -203,7 +203,7 @@ static int telnetd_daemon(int argc, char *argv[]) devpath = telnetd_driver(acceptsd, daemon); if (devpath == NULL) { - nlldbg("telnetd_driver failed\n"); + nllerr("telnetd_driver failed\n"); goto errout_with_acceptsd; } @@ -213,7 +213,7 @@ static int telnetd_daemon(int argc, char *argv[]) drvrfd = open(devpath, O_RDWR); if (drvrfd < 0) { - nlldbg("Failed to open %s: %d\n", devpath, errno); + nllerr("Failed to open %s: %d\n", devpath, errno); goto errout_with_acceptsd; } @@ -243,7 +243,7 @@ static int telnetd_daemon(int argc, char *argv[]) daemon->entry, NULL); if (pid < 0) { - nlldbg("Failed start the telnet session: %d\n", errno); + nllerr("Failed start the telnet session: %d\n", errno); goto errout_with_acceptsd; } diff --git a/examples/cc3000/telnetd_driver.c b/examples/cc3000/telnetd_driver.c index d1a0bc753..9a68190b2 100644 --- a/examples/cc3000/telnetd_driver.c +++ b/examples/cc3000/telnetd_driver.c @@ -397,7 +397,7 @@ static void telnetd_sendopt(FAR struct telnetd_dev_s *priv, uint8_t option, telnetd_dumpbuffer("Send optbuf", optbuf, 4); if (send(priv->td_psock, optbuf, 4, 0) < 0) { - nlldbg("Failed to send TELNET_IAC\n"); + nllerr("Failed to send TELNET_IAC\n"); } } @@ -498,7 +498,7 @@ static int telnetd_close(FAR struct file *filep) ret = asprintf(&devpath, TELNETD_DEVFMT, priv->td_minor); if (ret < 0) { - nlldbg("Failed to allocate the driver path\n"); + nllerr("Failed to allocate the driver path\n"); } else { @@ -507,7 +507,7 @@ static int telnetd_close(FAR struct file *filep) ret = unregister_driver(devpath); if (ret < 0) { - nlldbg("Failed to unregister the driver %s: %d\n", devpath, ret); + nllerr("Failed to unregister the driver %s: %d\n", devpath, ret); } free(devpath); @@ -645,7 +645,7 @@ static ssize_t telnetd_write(FAR struct file *filep, FAR const char *buffer, siz ret = send(priv->td_psock, priv->td_txbuffer, ncopied, 0); if (ret < 0) { - nlldbg("psock_send failed '%s': %d\n", priv->td_txbuffer, ret); + nllerr("psock_send failed '%s': %d\n", priv->td_txbuffer, ret); return ret; } @@ -662,7 +662,7 @@ static ssize_t telnetd_write(FAR struct file *filep, FAR const char *buffer, siz ret = send(priv->td_psock, priv->td_txbuffer, ncopied, 0); if (ret < 0) { - nlldbg("psock_send failed '%s': %d\n", priv->td_txbuffer, ret); + nllerr("psock_send failed '%s': %d\n", priv->td_txbuffer, ret); return ret; } } @@ -750,7 +750,7 @@ FAR char *telnetd_driver(long sd, FAR struct telnetd_s *daemon) priv = (FAR struct telnetd_dev_s*)malloc(sizeof(struct telnetd_dev_s)); if (!priv) { - nlldbg("Failed to allocate the driver data structure\n"); + nllerr("Failed to allocate the driver data structure\n"); return NULL; } @@ -786,7 +786,7 @@ FAR char *telnetd_driver(long sd, FAR struct telnetd_s *daemon) ret = asprintf(&devpath, TELNETD_DEVFMT, priv->td_minor); if (ret < 0) { - nlldbg("Failed to allocate the driver path\n"); + nllerr("Failed to allocate the driver path\n"); goto errout_with_dev; } @@ -795,7 +795,7 @@ FAR char *telnetd_driver(long sd, FAR struct telnetd_s *daemon) ret = register_driver(devpath, &g_telnetdfops, 0666, priv); if (ret < 0) { - nlldbg("Failed to register the driver %s: %d\n", devpath, ret); + nllerr("Failed to register the driver %s: %d\n", devpath, ret); goto errout_with_devpath; } diff --git a/examples/helloxx/helloxx_main.cxx b/examples/helloxx/helloxx_main.cxx index 064ec121d..5d01480b8 100644 --- a/examples/helloxx/helloxx_main.cxx +++ b/examples/helloxx/helloxx_main.cxx @@ -64,7 +64,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg -# define cxxlldbg lldbg +# define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info # define cxxllinfo llinfo @@ -74,7 +74,7 @@ # endif #else # define cxxdbg(x...) -# define cxxlldbg(x...) +# define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) #endif diff --git a/netutils/ftpc/ftpc_transfer.c b/netutils/ftpc/ftpc_transfer.c index 2b2d46edd..6fba83977 100644 --- a/netutils/ftpc/ftpc_transfer.c +++ b/netutils/ftpc/ftpc_transfer.c @@ -475,7 +475,7 @@ void ftpc_timeout(int argc, uint32_t arg1, ...) { FAR struct ftpc_session_s *session = (FAR struct ftpc_session_s *)arg1; - nlldbg("Timeout!\n"); + nllerr("Timeout!\n"); DEBUGASSERT(argc == 1 && session); kill(session->pid, CONFIG_FTP_SIGNAL); } diff --git a/netutils/telnetd/telnetd_daemon.c b/netutils/telnetd/telnetd_daemon.c index 815502974..3356981ff 100644 --- a/netutils/telnetd/telnetd_daemon.c +++ b/netutils/telnetd/telnetd_daemon.c @@ -226,7 +226,7 @@ static int telnetd_daemon(int argc, char *argv[]) goto errout_with_socket; } - /* Now go silent. Only the lldbg family of debug functions should + /* Now go silent. Only the llerr family of debug functions should * be used after this point because these do not depend on stdout * being available. */ @@ -259,7 +259,7 @@ static int telnetd_daemon(int argc, char *argv[]) } else { - nlldbg("ERROR: accept failed: %d\n", errval); + nllerr("ERROR: accept failed: %d\n", errval); goto errout_with_socket; } } @@ -271,7 +271,7 @@ static int telnetd_daemon(int argc, char *argv[]) ling.l_linger = 30; /* timeout is seconds */ if (setsockopt(acceptsd, SOL_SOCKET, SO_LINGER, &ling, sizeof(struct linger)) < 0) { - nlldbg("ERROR: setsockopt failed: %d\n", errno); + nllerr("ERROR: setsockopt failed: %d\n", errno); goto errout_with_acceptsd; } #endif @@ -281,7 +281,7 @@ static int telnetd_daemon(int argc, char *argv[]) fd = open("/dev/telnet", O_RDONLY); if (fd < 0) { - nlldbg("ERROR: open(/dev/telnet) failed: %d\n", errno); + nllerr("ERROR: open(/dev/telnet) failed: %d\n", errno); goto errout_with_acceptsd; } @@ -297,7 +297,7 @@ static int telnetd_daemon(int argc, char *argv[]) if (ret < 0) { - nlldbg("ERROR: open(/dev/telnet) failed: %d\n", errno); + nllerr("ERROR: open(/dev/telnet) failed: %d\n", errno); goto errout_with_acceptsd; } @@ -307,7 +307,7 @@ static int telnetd_daemon(int argc, char *argv[]) drvrfd = open(session.ts_devpath, O_RDWR); if (drvrfd < 0) { - nlldbg("ERROR: Failed to open %s: %d\n", session.ts_devpath, errno); + nllerr("ERROR: Failed to open %s: %d\n", session.ts_devpath, errno); goto errout_with_acceptsd; } @@ -333,7 +333,7 @@ static int telnetd_daemon(int argc, char *argv[]) daemon->entry, NULL); if (pid < 0) { - nlldbg("ERROR: Failed start the telnet session: %d\n", errno); + nllerr("ERROR: Failed start the telnet session: %d\n", errno); goto errout_with_acceptsd; } diff --git a/netutils/thttpd/fdwatch.c b/netutils/thttpd/fdwatch.c index 960979bc5..1d300aa87 100644 --- a/netutils/thttpd/fdwatch.c +++ b/netutils/thttpd/fdwatch.c @@ -58,30 +58,30 @@ /* Debug output from this file is normally suppressed. If enabled, be aware * that output to stdout will interfere with CGI programs (you could use the - * the low-level debug (lldbg) functions which probably do not use stdout + * the low-level debug (llerr) functions which probably do not use stdout */ #ifdef CONFIG_THTTPD_FDWATCH_DEBUG # ifdef CONFIG_CPP_HAVE_VARARGS # define fwdbg(format, ...) ndbg(format, ##__VA_ARGS__) -# define fwlldbg(format, ...) nlldbg(format, ##__VA_ARGS__) +# define fwllerr(format, ...) nllerr(format, ##__VA_ARGS__) # define fwinfo(format, ...) ninfo(format, ##__VA_ARGS__) # define fwllinfo(format, ...) nllinfo(format, ##__VA_ARGS__) # else # define fwdbg ndbg -# define fwlldbg nlldbg +# define fwllerr nllerr # define fwinfo ninfo # define fwllinfo nllinfo # endif #else # ifdef CONFIG_CPP_HAVE_VARARGS # define fwdbg(x...) -# define fwlldbg(x...) +# define fwllerr(x...) # define fwinfo(x...) # define fwllinfo(x...) # else # define fwdbg (void) -# define fwlldbg (void) +# define fwllerr (void) # define fwinfo (void) # define fwllinfo (void) # endif diff --git a/netutils/thttpd/thttpd_cgi.c b/netutils/thttpd/thttpd_cgi.c index b7f7bb587..341386abc 100644 --- a/netutils/thttpd/thttpd_cgi.c +++ b/netutils/thttpd/thttpd_cgi.c @@ -378,7 +378,7 @@ static inline int cgi_interpose_input(struct cgi_conn_s *cc) { if (errno != EINTR) { - nlldbg("read failed: %d\n", errno); + nllerr("read failed: %d\n", errno); return 1; } } @@ -391,7 +391,7 @@ static inline int cgi_interpose_input(struct cgi_conn_s *cc) nllinfo("nbytes_written: %d\n", nbytes_written); if (nbytes_written != nbytes_read) { - nlldbg("httpd_write failed\n"); + nllerr("httpd_write failed\n"); return 1; } cgi_dumpbuffer("Sent to CGI:", cc->inbuf.buffer, nbytes_written); @@ -469,7 +469,7 @@ static inline int cgi_interpose_output(struct cgi_conn_s *cc) { if (errno != EAGAIN) { - nlldbg("read: %d\n", errno); + nllerr("read: %d\n", errno); } return 1; } @@ -651,7 +651,7 @@ static inline int cgi_interpose_output(struct cgi_conn_s *cc) { if (errno != EAGAIN) { - nlldbg("read: %d\n", errno); + nllerr("read: %d\n", errno); } return 1; } @@ -720,7 +720,7 @@ static int cgi_child(int argc, char **argv) cc = (FAR struct cgi_conn_s*)httpd_malloc(sizeof(struct cgi_conn_s)); if (!cc) { - nlldbg("ERROR: cgi_conn allocation failed\n"); + nllerr("ERROR: cgi_conn allocation failed\n"); close(hc->conn_fd); goto errout; } @@ -768,7 +768,7 @@ static int cgi_child(int argc, char **argv) ret = pipe(pipefd); if (ret < 0) { - nlldbg("ERROR: STDIN pipe: %d\n", errno); + nllerr("ERROR: STDIN pipe: %d\n", errno); goto errout_with_cgiconn; } else @@ -784,7 +784,7 @@ static int cgi_child(int argc, char **argv) if (ret < 0) { - nlldbg("ERROR: STDIN dup2: %d\n", errno); + nllerr("ERROR: STDIN dup2: %d\n", errno); goto errout_with_descriptors; } } @@ -799,7 +799,7 @@ static int cgi_child(int argc, char **argv) ret = pipe(pipefd); if (ret < 0) { - nlldbg("ERROR: STDOUT pipe: %d\n", errno); + nllerr("ERROR: STDOUT pipe: %d\n", errno); goto errout_with_descriptors; } else @@ -815,7 +815,7 @@ static int cgi_child(int argc, char **argv) if (ret < 0) { - nlldbg("ERROR: STDOUT dup2: %d\n", errno); + nllerr("ERROR: STDOUT dup2: %d\n", errno); goto errout_with_descriptors; } } @@ -842,7 +842,7 @@ static int cgi_child(int argc, char **argv) httpd_realloc_str(&cc->outbuf.buffer, &cc->outbuf.size, CONFIG_THTTPD_CGIOUTBUFFERSIZE); if (!cc->outbuf.buffer) { - nlldbg("ERROR: hdr allocation failed\n"); + nllerr("ERROR: hdr allocation failed\n"); goto errout_with_descriptors; } @@ -851,7 +851,7 @@ static int cgi_child(int argc, char **argv) fw = fdwatch_initialize(2); if (!fw) { - nlldbg("ERROR: fdwatch allocation failed\n"); + nllerr("ERROR: fdwatch allocation failed\n"); goto errout_with_outbuffer; } @@ -868,7 +868,7 @@ static int cgi_child(int argc, char **argv) { /* Something went wrong. */ - nlldbg("ERROR: execve %s: %d\n", hc->expnfilename, errno); + nllerr("ERROR: execve %s: %d\n", hc->expnfilename, errno); goto errout_with_watch; } @@ -878,7 +878,7 @@ static int cgi_child(int argc, char **argv) client_data.i = child; if (tmr_create(NULL, cgi_kill, client_data, CONFIG_THTTPD_CGI_TIMELIMIT * 1000L, 0) == NULL) { - nlldbg("ERROR: tmr_create(cgi_kill child) failed\n"); + nllerr("ERROR: tmr_create(cgi_kill child) failed\n"); goto errout_with_watch; } #endif @@ -896,7 +896,7 @@ static int cgi_child(int argc, char **argv) { if (httpd_write(cc->wrfd, &(hc->read_buf[hc->checked_idx]), nbytes) != nbytes) { - nlldbg("ERROR: httpd_write failed\n"); + nllerr("ERROR: httpd_write failed\n"); return 1; } } @@ -1072,10 +1072,10 @@ static void cgi_kill(ClientData client_data, struct timeval *nowP) /* task_delete() is a very evil API. It can leave memory stranded! */ - nlldbg("Killing CGI child: %d\n", pid); + nllerr("Killing CGI child: %d\n", pid); if (task_delete(pid) != 0) { - nlldbg("task_delete() failed: %d\n", errno); + nllerr("task_delete() failed: %d\n", errno); } } #endif diff --git a/nshlib/nsh_netinit.c b/nshlib/nsh_netinit.c index 0f4d8504e..0643d2c0e 100644 --- a/nshlib/nsh_netinit.c +++ b/nshlib/nsh_netinit.c @@ -366,7 +366,7 @@ static void nsh_netinit_signal(int signo, FAR siginfo_t *siginfo, /* What is the count on the semaphore? Don't over-post */ ret = sem_getvalue(&g_notify_sem, &semcount); - nlldbg("Entry: semcount=%d\n", semcount); + nllerr("Entry: semcount=%d\n", semcount); if (ret == OK && semcount <= 0) { diff --git a/platform/arduino-due/sam_cxxinitialize.c b/platform/arduino-due/sam_cxxinitialize.c index 27ccfea79..298d08cf4 100644 --- a/platform/arduino-due/sam_cxxinitialize.c +++ b/platform/arduino-due/sam_cxxinitialize.c @@ -59,7 +59,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg -# define cxxlldbg lldbg +# define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info # define cxxllinfo llinfo @@ -69,7 +69,7 @@ # endif #else # define cxxdbg(x...) -# define cxxlldbg(x...) +# define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) #endif diff --git a/platform/cloudctrl/stm32_cxxinitialize.c b/platform/cloudctrl/stm32_cxxinitialize.c index b6685f38f..08703feb0 100644 --- a/platform/cloudctrl/stm32_cxxinitialize.c +++ b/platform/cloudctrl/stm32_cxxinitialize.c @@ -60,7 +60,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg -# define cxxlldbg lldbg +# define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info # define cxxllinfo llinfo @@ -70,7 +70,7 @@ # endif #else # define cxxdbg(x...) -# define cxxlldbg(x...) +# define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) #endif diff --git a/platform/fire-stm32v2/stm32_cxxinitialize.c b/platform/fire-stm32v2/stm32_cxxinitialize.c index fc5dd7c1d..2da95e1b4 100644 --- a/platform/fire-stm32v2/stm32_cxxinitialize.c +++ b/platform/fire-stm32v2/stm32_cxxinitialize.c @@ -59,7 +59,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg -# define cxxlldbg lldbg +# define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info # define cxxllinfo llinfo @@ -69,7 +69,7 @@ # endif #else # define cxxdbg(x...) -# define cxxlldbg(x...) +# define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) #endif diff --git a/platform/mikroe-stm32f4/stm32_cxxinitialize.c b/platform/mikroe-stm32f4/stm32_cxxinitialize.c index 2e83a5d1c..46820cfa3 100644 --- a/platform/mikroe-stm32f4/stm32_cxxinitialize.c +++ b/platform/mikroe-stm32f4/stm32_cxxinitialize.c @@ -59,7 +59,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg -# define cxxlldbg lldbg +# define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info # define cxxllinfo llinfo @@ -69,7 +69,7 @@ # endif #else # define cxxdbg(x...) -# define cxxlldbg(x...) +# define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) #endif diff --git a/platform/nucleo-144/stm32_cxxinitialize.c b/platform/nucleo-144/stm32_cxxinitialize.c index 1970d880f..4dcffedcf 100644 --- a/platform/nucleo-144/stm32_cxxinitialize.c +++ b/platform/nucleo-144/stm32_cxxinitialize.c @@ -60,7 +60,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg -# define cxxlldbg lldbg +# define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info # define cxxllinfo llinfo @@ -70,7 +70,7 @@ # endif #else # define cxxdbg(x...) -# define cxxlldbg(x...) +# define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) #endif diff --git a/platform/nucleo-f303re/stm32_cxxinitialize.c b/platform/nucleo-f303re/stm32_cxxinitialize.c index 6dbe6f2bf..5b36cf735 100644 --- a/platform/nucleo-f303re/stm32_cxxinitialize.c +++ b/platform/nucleo-f303re/stm32_cxxinitialize.c @@ -59,7 +59,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg -# define cxxlldbg lldbg +# define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info # define cxxllinfo llinfo @@ -69,7 +69,7 @@ # endif #else # define cxxdbg(x...) -# define cxxlldbg(x...) +# define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) #endif diff --git a/platform/nucleo-f4x1re/stm32_cxxinitialize.c b/platform/nucleo-f4x1re/stm32_cxxinitialize.c index 933102b0c..a42e5b48b 100644 --- a/platform/nucleo-f4x1re/stm32_cxxinitialize.c +++ b/platform/nucleo-f4x1re/stm32_cxxinitialize.c @@ -59,7 +59,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg -# define cxxlldbg lldbg +# define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info # define cxxllinfo llinfo @@ -69,7 +69,7 @@ # endif #else # define cxxdbg(x...) -# define cxxlldbg(x...) +# define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) #endif diff --git a/platform/nucleo-l476rg/stm32_cxxinitialize.c b/platform/nucleo-l476rg/stm32_cxxinitialize.c index ace93d39e..fcdd4f9d6 100644 --- a/platform/nucleo-l476rg/stm32_cxxinitialize.c +++ b/platform/nucleo-l476rg/stm32_cxxinitialize.c @@ -59,7 +59,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg -# define cxxlldbg lldbg +# define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info # define cxxllinfo llinfo @@ -69,7 +69,7 @@ # endif #else # define cxxdbg(x...) -# define cxxlldbg(x...) +# define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) #endif diff --git a/platform/olimex-stm32-h405/stm32_cxxinitialize.c b/platform/olimex-stm32-h405/stm32_cxxinitialize.c index 05e6248c8..0edd262fd 100644 --- a/platform/olimex-stm32-h405/stm32_cxxinitialize.c +++ b/platform/olimex-stm32-h405/stm32_cxxinitialize.c @@ -59,7 +59,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg -# define cxxlldbg lldbg +# define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info # define cxxllinfo llinfo @@ -69,7 +69,7 @@ # endif #else # define cxxdbg(x...) -# define cxxlldbg(x...) +# define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) #endif diff --git a/platform/olimex-stm32-h407/stm32_cxxinitialize.c b/platform/olimex-stm32-h407/stm32_cxxinitialize.c index 98c551164..95ff79b7f 100644 --- a/platform/olimex-stm32-h407/stm32_cxxinitialize.c +++ b/platform/olimex-stm32-h407/stm32_cxxinitialize.c @@ -59,7 +59,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg -# define cxxlldbg lldbg +# define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info # define cxxllinfo llinfo @@ -69,7 +69,7 @@ # endif #else # define cxxdbg(x...) -# define cxxlldbg(x...) +# define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) #endif diff --git a/platform/olimex-stm32-p207/stm32_cxxinitialize.c b/platform/olimex-stm32-p207/stm32_cxxinitialize.c index 6286cba68..3e129c18b 100644 --- a/platform/olimex-stm32-p207/stm32_cxxinitialize.c +++ b/platform/olimex-stm32-p207/stm32_cxxinitialize.c @@ -59,7 +59,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg -# define cxxlldbg lldbg +# define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info # define cxxllinfo llinfo @@ -69,7 +69,7 @@ # endif #else # define cxxdbg(x...) -# define cxxlldbg(x...) +# define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) #endif diff --git a/platform/olimexino-stm32/stm32_cxxinitialize.c b/platform/olimexino-stm32/stm32_cxxinitialize.c index ec4f4393a..fc4cc71b3 100644 --- a/platform/olimexino-stm32/stm32_cxxinitialize.c +++ b/platform/olimexino-stm32/stm32_cxxinitialize.c @@ -59,7 +59,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg -# define cxxlldbg lldbg +# define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info # define cxxllinfo llinfo @@ -69,7 +69,7 @@ # endif #else # define cxxdbg(x...) -# define cxxlldbg(x...) +# define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) #endif diff --git a/platform/pcduino-a10/a1x_cxxinitialize.c b/platform/pcduino-a10/a1x_cxxinitialize.c index ce50f2180..f1be61097 100644 --- a/platform/pcduino-a10/a1x_cxxinitialize.c +++ b/platform/pcduino-a10/a1x_cxxinitialize.c @@ -59,7 +59,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg -# define cxxlldbg lldbg +# define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info # define cxxllinfo llinfo @@ -69,7 +69,7 @@ # endif #else # define cxxdbg(x...) -# define cxxlldbg(x...) +# define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) #endif diff --git a/platform/sabre-6quad/imx_cxxinitialize.c b/platform/sabre-6quad/imx_cxxinitialize.c index b4bc3698a..da4ddcc81 100644 --- a/platform/sabre-6quad/imx_cxxinitialize.c +++ b/platform/sabre-6quad/imx_cxxinitialize.c @@ -59,7 +59,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg -# define cxxlldbg lldbg +# define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info # define cxxllinfo llinfo @@ -69,7 +69,7 @@ # endif #else # define cxxdbg(x...) -# define cxxlldbg(x...) +# define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) #endif diff --git a/platform/sam3u-ek/sam_cxxinitialized.c b/platform/sam3u-ek/sam_cxxinitialized.c index 47f686ddf..7bdb6495e 100644 --- a/platform/sam3u-ek/sam_cxxinitialized.c +++ b/platform/sam3u-ek/sam_cxxinitialized.c @@ -59,7 +59,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg -# define cxxlldbg lldbg +# define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info # define cxxllinfo llinfo @@ -69,7 +69,7 @@ # endif #else # define cxxdbg(x...) -# define cxxlldbg(x...) +# define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) #endif diff --git a/platform/sam4e-ek/sam_cxxinitialize.c b/platform/sam4e-ek/sam_cxxinitialize.c index b0abe5b26..a0d513f6c 100644 --- a/platform/sam4e-ek/sam_cxxinitialize.c +++ b/platform/sam4e-ek/sam_cxxinitialize.c @@ -59,7 +59,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg -# define cxxlldbg lldbg +# define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info # define cxxllinfo llinfo @@ -69,7 +69,7 @@ # endif #else # define cxxdbg(x...) -# define cxxlldbg(x...) +# define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) #endif diff --git a/platform/sam4l-xplained/sam_cxxinitialize.c b/platform/sam4l-xplained/sam_cxxinitialize.c index 7f473e993..676a134d5 100644 --- a/platform/sam4l-xplained/sam_cxxinitialize.c +++ b/platform/sam4l-xplained/sam_cxxinitialize.c @@ -59,7 +59,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg -# define cxxlldbg lldbg +# define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info # define cxxllinfo llinfo @@ -69,7 +69,7 @@ # endif #else # define cxxdbg(x...) -# define cxxlldbg(x...) +# define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) #endif diff --git a/platform/sam4s-xplained-pro/sam_cxxinitialize.c b/platform/sam4s-xplained-pro/sam_cxxinitialize.c index 8d55c47fa..0a35ca436 100644 --- a/platform/sam4s-xplained-pro/sam_cxxinitialize.c +++ b/platform/sam4s-xplained-pro/sam_cxxinitialize.c @@ -59,7 +59,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg -# define cxxlldbg lldbg +# define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info # define cxxllinfo llinfo @@ -69,7 +69,7 @@ # endif #else # define cxxdbg(x...) -# define cxxlldbg(x...) +# define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) #endif diff --git a/platform/sam4s-xplained/sam_cxxinitialize.c b/platform/sam4s-xplained/sam_cxxinitialize.c index 54e4afa71..8e696d725 100644 --- a/platform/sam4s-xplained/sam_cxxinitialize.c +++ b/platform/sam4s-xplained/sam_cxxinitialize.c @@ -59,7 +59,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg -# define cxxlldbg lldbg +# define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info # define cxxllinfo llinfo @@ -69,7 +69,7 @@ # endif #else # define cxxdbg(x...) -# define cxxlldbg(x...) +# define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) #endif diff --git a/platform/sama5d2-xult/sam_cxxinitialize.c b/platform/sama5d2-xult/sam_cxxinitialize.c index a47f0c188..f2f41f147 100644 --- a/platform/sama5d2-xult/sam_cxxinitialize.c +++ b/platform/sama5d2-xult/sam_cxxinitialize.c @@ -59,7 +59,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg -# define cxxlldbg lldbg +# define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info # define cxxllinfo llinfo @@ -69,7 +69,7 @@ # endif #else # define cxxdbg(x...) -# define cxxlldbg(x...) +# define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) #endif diff --git a/platform/sama5d3-xplained/sam_cxxinitialize.c b/platform/sama5d3-xplained/sam_cxxinitialize.c index 20f87c4bf..827938d6c 100644 --- a/platform/sama5d3-xplained/sam_cxxinitialize.c +++ b/platform/sama5d3-xplained/sam_cxxinitialize.c @@ -59,7 +59,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg -# define cxxlldbg lldbg +# define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info # define cxxllinfo llinfo @@ -69,7 +69,7 @@ # endif #else # define cxxdbg(x...) -# define cxxlldbg(x...) +# define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) #endif diff --git a/platform/sama5d3x-ek/sam_cxxinitialize.c b/platform/sama5d3x-ek/sam_cxxinitialize.c index 0d475aae3..0b261511c 100644 --- a/platform/sama5d3x-ek/sam_cxxinitialize.c +++ b/platform/sama5d3x-ek/sam_cxxinitialize.c @@ -59,7 +59,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg -# define cxxlldbg lldbg +# define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info # define cxxllinfo llinfo @@ -69,7 +69,7 @@ # endif #else # define cxxdbg(x...) -# define cxxlldbg(x...) +# define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) #endif diff --git a/platform/sama5d4-ek/sam_cxxinitialize.c b/platform/sama5d4-ek/sam_cxxinitialize.c index de17676ec..d8f08b4aa 100644 --- a/platform/sama5d4-ek/sam_cxxinitialize.c +++ b/platform/sama5d4-ek/sam_cxxinitialize.c @@ -59,7 +59,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg -# define cxxlldbg lldbg +# define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info # define cxxllinfo llinfo @@ -69,7 +69,7 @@ # endif #else # define cxxdbg(x...) -# define cxxlldbg(x...) +# define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) #endif diff --git a/platform/samd20-xplained/sam_cxxinitialize.c b/platform/samd20-xplained/sam_cxxinitialize.c index 1bd6fc053..5bb2096af 100644 --- a/platform/samd20-xplained/sam_cxxinitialize.c +++ b/platform/samd20-xplained/sam_cxxinitialize.c @@ -59,7 +59,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg -# define cxxlldbg lldbg +# define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info # define cxxllinfo llinfo @@ -69,7 +69,7 @@ # endif #else # define cxxdbg(x...) -# define cxxlldbg(x...) +# define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) #endif diff --git a/platform/samd21-xplained/sam_cxxinitialize.c b/platform/samd21-xplained/sam_cxxinitialize.c index 29d550fcf..ed2cab169 100644 --- a/platform/samd21-xplained/sam_cxxinitialize.c +++ b/platform/samd21-xplained/sam_cxxinitialize.c @@ -59,7 +59,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg -# define cxxlldbg lldbg +# define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info # define cxxllinfo llinfo @@ -69,7 +69,7 @@ # endif #else # define cxxdbg(x...) -# define cxxlldbg(x...) +# define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) #endif diff --git a/platform/same70-xplained/sam_cxxinitialize.c b/platform/same70-xplained/sam_cxxinitialize.c index ec63fcd1e..1277dfda5 100644 --- a/platform/same70-xplained/sam_cxxinitialize.c +++ b/platform/same70-xplained/sam_cxxinitialize.c @@ -59,7 +59,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg -# define cxxlldbg lldbg +# define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info # define cxxllinfo llinfo @@ -69,7 +69,7 @@ # endif #else # define cxxdbg(x...) -# define cxxlldbg(x...) +# define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) #endif diff --git a/platform/saml21-xplained/sam_cxxinitialize.c b/platform/saml21-xplained/sam_cxxinitialize.c index a60c88967..a523435d5 100644 --- a/platform/saml21-xplained/sam_cxxinitialize.c +++ b/platform/saml21-xplained/sam_cxxinitialize.c @@ -59,7 +59,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg -# define cxxlldbg lldbg +# define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info # define cxxllinfo llinfo @@ -69,7 +69,7 @@ # endif #else # define cxxdbg(x...) -# define cxxlldbg(x...) +# define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) #endif diff --git a/platform/samv71-xult/sam_cxxinitialize.c b/platform/samv71-xult/sam_cxxinitialize.c index 865d6e60c..a1ee79aaa 100644 --- a/platform/samv71-xult/sam_cxxinitialize.c +++ b/platform/samv71-xult/sam_cxxinitialize.c @@ -59,7 +59,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg -# define cxxlldbg lldbg +# define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info # define cxxllinfo llinfo @@ -69,7 +69,7 @@ # endif #else # define cxxdbg(x...) -# define cxxlldbg(x...) +# define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) #endif diff --git a/platform/shenzhou/stm32_cxxinitialize.c b/platform/shenzhou/stm32_cxxinitialize.c index 2498378b7..ebc1c9b31 100644 --- a/platform/shenzhou/stm32_cxxinitialize.c +++ b/platform/shenzhou/stm32_cxxinitialize.c @@ -59,7 +59,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg -# define cxxlldbg lldbg +# define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info # define cxxllinfo llinfo @@ -69,7 +69,7 @@ # endif #else # define cxxdbg(x...) -# define cxxlldbg(x...) +# define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) #endif diff --git a/platform/spark/stm32_cxxinitialize.c b/platform/spark/stm32_cxxinitialize.c index fa33d21f8..bc9597697 100644 --- a/platform/spark/stm32_cxxinitialize.c +++ b/platform/spark/stm32_cxxinitialize.c @@ -59,7 +59,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg -# define cxxlldbg lldbg +# define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info # define cxxllinfo llinfo @@ -69,7 +69,7 @@ # endif #else # define cxxdbg(x...) -# define cxxlldbg(x...) +# define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) #endif diff --git a/platform/stm3220g-eval/stm32_cxxinitialize.c b/platform/stm3220g-eval/stm32_cxxinitialize.c index c3aa574a3..7d1e6b6cb 100644 --- a/platform/stm3220g-eval/stm32_cxxinitialize.c +++ b/platform/stm3220g-eval/stm32_cxxinitialize.c @@ -59,7 +59,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg -# define cxxlldbg lldbg +# define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info # define cxxllinfo llinfo @@ -69,7 +69,7 @@ # endif #else # define cxxdbg(x...) -# define cxxlldbg(x...) +# define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) #endif diff --git a/platform/stm3240g-eval/stm32_cxxinitialize.c b/platform/stm3240g-eval/stm32_cxxinitialize.c index 0917f658d..79194605b 100644 --- a/platform/stm3240g-eval/stm32_cxxinitialize.c +++ b/platform/stm3240g-eval/stm32_cxxinitialize.c @@ -59,7 +59,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg -# define cxxlldbg lldbg +# define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info # define cxxllinfo llinfo @@ -69,7 +69,7 @@ # endif #else # define cxxdbg(x...) -# define cxxlldbg(x...) +# define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) #endif diff --git a/platform/stm32f3discovery/stm32_cxxinitialize.c b/platform/stm32f3discovery/stm32_cxxinitialize.c index 59f73ba07..d55f25d17 100644 --- a/platform/stm32f3discovery/stm32_cxxinitialize.c +++ b/platform/stm32f3discovery/stm32_cxxinitialize.c @@ -59,7 +59,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg -# define cxxlldbg lldbg +# define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info # define cxxllinfo llinfo @@ -69,7 +69,7 @@ # endif #else # define cxxdbg(x...) -# define cxxlldbg(x...) +# define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) #endif diff --git a/platform/stm32f429i-disco/stm32_cxxinitialize.c b/platform/stm32f429i-disco/stm32_cxxinitialize.c index 3ffd8a20e..de505735c 100644 --- a/platform/stm32f429i-disco/stm32_cxxinitialize.c +++ b/platform/stm32f429i-disco/stm32_cxxinitialize.c @@ -59,7 +59,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg -# define cxxlldbg lldbg +# define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info # define cxxllinfo llinfo @@ -69,7 +69,7 @@ # endif #else # define cxxdbg(x...) -# define cxxlldbg(x...) +# define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) #endif diff --git a/platform/stm32f4discovery/stm32_cxxinitialize.c b/platform/stm32f4discovery/stm32_cxxinitialize.c index 9a2353f8e..f51c75ad7 100644 --- a/platform/stm32f4discovery/stm32_cxxinitialize.c +++ b/platform/stm32f4discovery/stm32_cxxinitialize.c @@ -59,7 +59,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg -# define cxxlldbg lldbg +# define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info # define cxxllinfo llinfo @@ -69,7 +69,7 @@ # endif #else # define cxxdbg(x...) -# define cxxlldbg(x...) +# define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) #endif diff --git a/platform/stm32f746g-disco/stm32_cxxinitialize.c b/platform/stm32f746g-disco/stm32_cxxinitialize.c index 47f3e3ae0..5d3f195be 100644 --- a/platform/stm32f746g-disco/stm32_cxxinitialize.c +++ b/platform/stm32f746g-disco/stm32_cxxinitialize.c @@ -59,7 +59,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg -# define cxxlldbg lldbg +# define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info # define cxxllinfo llinfo @@ -69,7 +69,7 @@ # endif #else # define cxxdbg(x...) -# define cxxlldbg(x...) +# define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) #endif diff --git a/platform/stm32l476vg-disco/stm32_cxxinitialize.c b/platform/stm32l476vg-disco/stm32_cxxinitialize.c index 096eab010..4b685ab18 100644 --- a/platform/stm32l476vg-disco/stm32_cxxinitialize.c +++ b/platform/stm32l476vg-disco/stm32_cxxinitialize.c @@ -59,7 +59,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg -# define cxxlldbg lldbg +# define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info # define cxxllinfo llinfo @@ -69,7 +69,7 @@ # endif #else # define cxxdbg(x...) -# define cxxlldbg(x...) +# define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) #endif diff --git a/platform/stm32ldiscovery/stm32_cxxinitialize.c b/platform/stm32ldiscovery/stm32_cxxinitialize.c index abe57211a..07cb29ebd 100644 --- a/platform/stm32ldiscovery/stm32_cxxinitialize.c +++ b/platform/stm32ldiscovery/stm32_cxxinitialize.c @@ -59,7 +59,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg -# define cxxlldbg lldbg +# define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info # define cxxllinfo llinfo @@ -69,7 +69,7 @@ # endif #else # define cxxdbg(x...) -# define cxxlldbg(x...) +# define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) #endif diff --git a/platform/teensy-lc/kl_cxxinitialize.c b/platform/teensy-lc/kl_cxxinitialize.c index 3da6bf4e6..98bfa067e 100644 --- a/platform/teensy-lc/kl_cxxinitialize.c +++ b/platform/teensy-lc/kl_cxxinitialize.c @@ -59,7 +59,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg -# define cxxlldbg lldbg +# define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info # define cxxllinfo llinfo @@ -69,7 +69,7 @@ # endif #else # define cxxdbg(x...) -# define cxxlldbg(x...) +# define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) #endif diff --git a/platform/viewtool-stm32f107/stm32_cxxinitialize.c b/platform/viewtool-stm32f107/stm32_cxxinitialize.c index 808f8e5e4..892e8ceae 100644 --- a/platform/viewtool-stm32f107/stm32_cxxinitialize.c +++ b/platform/viewtool-stm32f107/stm32_cxxinitialize.c @@ -59,7 +59,7 @@ #ifdef CONFIG_DEBUG_CXX # define cxxdbg dbg -# define cxxlldbg lldbg +# define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info # define cxxllinfo llinfo @@ -69,7 +69,7 @@ # endif #else # define cxxdbg(x...) -# define cxxlldbg(x...) +# define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) #endif diff --git a/system/ubloxmodem/ubloxmodem_main.c b/system/ubloxmodem/ubloxmodem_main.c index d5beedd90..16c05994e 100644 --- a/system/ubloxmodem/ubloxmodem_main.c +++ b/system/ubloxmodem/ubloxmodem_main.c @@ -61,12 +61,12 @@ #ifdef CONFIG_MODEM_U_BLOX_DEBUG # define m_dbg dbg # define m_info info -# define m_vlldbg lldbg +# define m_vllerr llerr # define m_vllinfo llinfo #else # define m_dbg(x...) # define m_info(x...) -# define m_lldbg(x...) +# define m_llerr(x...) # define m_llinfo(x...) #endif From 586b0aa7e0f2d579e6572697cd252502a17a5405 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 11 Jun 2016 15:51:27 -0600 Subject: [PATCH 48/74] Change names of *dbg() * *err() --- builtin/exec_builtin.c | 4 +- examples/cc3000/telnetd_daemon.c | 10 +- examples/discover/discover_main.c | 2 +- examples/elf/elf_main.c | 10 +- examples/helloxx/helloxx_main.cxx | 2 +- examples/ltdc/dma2d.c | 340 +++++++++--------- examples/ltdc/ltdc_main.c | 248 ++++++------- examples/mtdpart/mtdpart_main.c | 2 +- examples/mtdrwb/mtdrwb_main.c | 2 +- examples/nxflat/nxflat_main.c | 10 +- examples/nxterm/nxterm_toolbar.c | 2 +- examples/pca9635/pca9635_main.c | 2 +- examples/posix_spawn/spawn_main.c | 10 +- examples/tcpecho/tcpecho_main.c | 10 +- examples/xmlrpc/xmlrpc_main.c | 14 +- fsutils/flash_eraseall/flash_eraseall.c | 4 +- graphics/tiff/tiff_initialize.c | 10 +- netutils/dhcpc/dhcpc.c | 26 +- netutils/dhcpd/dhcpd.c | 34 +- netutils/discover/discover.c | 34 +- netutils/esp8266/esp8266.c | 48 +-- netutils/ftpc/ftpc_chmod.c | 2 +- netutils/ftpc/ftpc_cmd.c | 14 +- netutils/ftpc/ftpc_connect.c | 18 +- netutils/ftpc/ftpc_getfile.c | 18 +- netutils/ftpc/ftpc_getreply.c | 6 +- netutils/ftpc/ftpc_idle.c | 4 +- netutils/ftpc/ftpc_listdir.c | 14 +- netutils/ftpc/ftpc_login.c | 10 +- netutils/ftpc/ftpc_putfile.c | 14 +- netutils/ftpc/ftpc_rpwd.c | 6 +- netutils/ftpc/ftpc_socket.c | 20 +- netutils/ftpc/ftpc_transfer.c | 14 +- netutils/ftpd/ftpd.c | 74 ++-- netutils/netlib/netlib_listenon.c | 8 +- netutils/netlib/netlib_server.c | 6 +- netutils/ntpclient/ntpclient.c | 12 +- netutils/ping/icmp_ping.c | 2 +- netutils/ping/icmpv6_ping.c | 2 +- netutils/telnetd/telnetd_daemon.c | 14 +- netutils/tftpc/tftpc_get.c | 6 +- netutils/tftpc/tftpc_packets.c | 12 +- netutils/tftpc/tftpc_put.c | 22 +- netutils/thttpd/fdwatch.c | 4 +- netutils/thttpd/libhttpd.c | 80 ++--- netutils/thttpd/thttpd.c | 36 +- netutils/thttpd/thttpd_alloc.c | 12 +- netutils/thttpd/thttpd_cgi.c | 4 +- netutils/webclient/webclient.c | 16 +- netutils/webserver/httpd.c | 28 +- nshlib/nsh_console.c | 2 +- nshlib/nsh_fscmds.c | 2 +- nshlib/nsh_netcmds.c | 26 +- nshlib/nsh_netinit.c | 20 +- nshlib/nsh_parse.c | 4 +- nshlib/nsh_romfsetc.c | 4 +- nshlib/nsh_telnetd.c | 4 +- platform/arduino-due/sam_cxxinitialize.c | 10 +- platform/cloudctrl/stm32_cxxinitialize.c | 10 +- platform/fire-stm32v2/stm32_cxxinitialize.c | 10 +- platform/mikroe-stm32f4/stm32_cxxinitialize.c | 10 +- platform/nucleo-144/stm32_cxxinitialize.c | 10 +- platform/nucleo-f303re/stm32_cxxinitialize.c | 10 +- platform/nucleo-f4x1re/stm32_cxxinitialize.c | 10 +- platform/nucleo-l476rg/stm32_cxxinitialize.c | 10 +- .../olimex-stm32-h405/stm32_cxxinitialize.c | 10 +- .../olimex-stm32-h407/stm32_cxxinitialize.c | 10 +- .../olimex-stm32-p207/stm32_cxxinitialize.c | 10 +- .../olimexino-stm32/stm32_cxxinitialize.c | 10 +- platform/pcduino-a10/a1x_cxxinitialize.c | 10 +- platform/sabre-6quad/imx_cxxinitialize.c | 10 +- platform/sam3u-ek/sam_cxxinitialized.c | 10 +- platform/sam4e-ek/sam_cxxinitialize.c | 10 +- platform/sam4l-xplained/sam_cxxinitialize.c | 10 +- .../sam4s-xplained-pro/sam_cxxinitialize.c | 10 +- platform/sam4s-xplained/sam_cxxinitialize.c | 10 +- platform/sama5d2-xult/sam_cxxinitialize.c | 10 +- platform/sama5d3-xplained/sam_cxxinitialize.c | 10 +- platform/sama5d3x-ek/sam_cxxinitialize.c | 10 +- platform/sama5d4-ek/sam_cxxinitialize.c | 10 +- platform/samd20-xplained/sam_cxxinitialize.c | 10 +- platform/samd21-xplained/sam_cxxinitialize.c | 10 +- platform/same70-xplained/sam_cxxinitialize.c | 10 +- platform/saml21-xplained/sam_cxxinitialize.c | 10 +- platform/samv71-xult/sam_cxxinitialize.c | 10 +- platform/shenzhou/stm32_cxxinitialize.c | 10 +- platform/spark/stm32_cxxinitialize.c | 10 +- platform/stm3220g-eval/stm32_cxxinitialize.c | 10 +- platform/stm3240g-eval/stm32_cxxinitialize.c | 10 +- .../stm32f3discovery/stm32_cxxinitialize.c | 10 +- .../stm32f429i-disco/stm32_cxxinitialize.c | 10 +- .../stm32f4discovery/stm32_cxxinitialize.c | 10 +- .../stm32f746g-disco/stm32_cxxinitialize.c | 10 +- .../stm32l476vg-disco/stm32_cxxinitialize.c | 10 +- .../stm32ldiscovery/stm32_cxxinitialize.c | 10 +- platform/teensy-lc/kl_cxxinitialize.c | 10 +- .../viewtool-stm32f107/stm32_cxxinitialize.c | 10 +- system/i2c/i2c_main.c | 2 +- system/nxplayer/nxplayer.c | 48 +-- system/prun/prun.c | 4 +- system/ubloxmodem/ubloxmodem_main.c | 8 +- 101 files changed, 913 insertions(+), 913 deletions(-) diff --git a/builtin/exec_builtin.c b/builtin/exec_builtin.c index 9570cebc3..f12316d45 100644 --- a/builtin/exec_builtin.c +++ b/builtin/exec_builtin.c @@ -205,7 +205,7 @@ int exec_builtin(FAR const char *appname, FAR char * const *argv, redirfile, O_WRONLY, 0644); if (ret != 0) { - sdbg("ERROR: posix_spawn_file_actions_addopen failed: %d\n", ret); + serr("ERROR: posix_spawn_file_actions_addopen failed: %d\n", ret); goto errout_with_actions; } } @@ -217,7 +217,7 @@ int exec_builtin(FAR const char *appname, FAR char * const *argv, (FAR char * const *)NULL); if (ret != 0) { - sdbg("ERROR: task_spawn failed: %d\n", ret); + serr("ERROR: task_spawn failed: %d\n", ret); goto errout_with_actions; } diff --git a/examples/cc3000/telnetd_daemon.c b/examples/cc3000/telnetd_daemon.c index 9245b5ebf..64d93cc29 100644 --- a/examples/cc3000/telnetd_daemon.c +++ b/examples/cc3000/telnetd_daemon.c @@ -125,7 +125,7 @@ static int telnetd_daemon(int argc, char *argv[]) if (listensd < 0) { int errval = errno; - ndbg("socket failure: %d\n", errval); + nerr("socket failure: %d\n", errval); return -errval; } @@ -135,7 +135,7 @@ static int telnetd_daemon(int argc, char *argv[]) optval = 1; if (setsockopt(listensd, SOL_SOCKET, SO_REUSEADDR, (void*)&optval, sizeof(int)) < 0) { - ndbg("setsockopt SO_REUSEADDR failure: %d\n", errno); + nerr("setsockopt SO_REUSEADDR failure: %d\n", errno); goto errout_with_socket; } #endif @@ -148,7 +148,7 @@ static int telnetd_daemon(int argc, char *argv[]) if (bind(listensd, (struct sockaddr*)&myaddr, sizeof(struct sockaddr_in)) < 0) { - ndbg("bind failure: %d\n", errno); + nerr("bind failure: %d\n", errno); goto errout_with_socket; } @@ -156,7 +156,7 @@ static int telnetd_daemon(int argc, char *argv[]) if (listen(listensd, 5) < 0) { - ndbg("listen failure %d\n", errno); + nerr("listen failure %d\n", errno); goto errout_with_socket; } @@ -325,7 +325,7 @@ int telnetd_start(FAR struct telnetd_config_s *config) { int errval = errno; free(daemon); - ndbg("Failed to start the telnet daemon: %d\n", errval); + nerr("Failed to start the telnet daemon: %d\n", errval); return -errval; } diff --git a/examples/discover/discover_main.c b/examples/discover/discover_main.c index 1b7e9991a..5272b681a 100644 --- a/examples/discover/discover_main.c +++ b/examples/discover/discover_main.c @@ -178,7 +178,7 @@ int discover_main(int argc, char *argv[]) if (discover_start(NULL) < 0) { - ndbg("Could not start discover daemon.\n"); + nerr("Could not start discover daemon.\n"); return ERROR; } diff --git a/examples/elf/elf_main.c b/examples/elf/elf_main.c index 5543ba575..7e5ff2074 100644 --- a/examples/elf/elf_main.c +++ b/examples/elf/elf_main.c @@ -100,22 +100,22 @@ # define CONFIG_EXAMPLES_ELF_DEVPATH "/dev/ram0" #endif -/* If CONFIG_DEBUG_FEATURES is enabled, use dbg instead of printf so that the +/* If CONFIG_DEBUG_FEATURES is enabled, use info/err instead of printf so that the * output will be synchronous with the debug output. */ #ifdef CONFIG_CPP_HAVE_VARARGS # ifdef CONFIG_DEBUG_FEATURES -# define message(format, ...) dbg(format, ##__VA_ARGS__) -# define errmsg(format, ...) dbg(format, ##__VA_ARGS__) +# define message(format, ...) info(format, ##__VA_ARGS__) +# define errmsg(format, ...) err(format, ##__VA_ARGS__) # else # define message(format, ...) printf(format, ##__VA_ARGS__) # define errmsg(format, ...) fprintf(stderr, format, ##__VA_ARGS__) # endif #else # ifdef CONFIG_DEBUG_FEATURES -# define message dbg -# define errmsg dbg +# define message info +# define errmsg err # else # define message printf # define errmsg printf diff --git a/examples/helloxx/helloxx_main.cxx b/examples/helloxx/helloxx_main.cxx index 5d01480b8..95dcfdcda 100644 --- a/examples/helloxx/helloxx_main.cxx +++ b/examples/helloxx/helloxx_main.cxx @@ -63,7 +63,7 @@ #endif #ifdef CONFIG_DEBUG_CXX -# define cxxdbg dbg +# define cxxdbg err # define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info diff --git a/examples/ltdc/dma2d.c b/examples/ltdc/dma2d.c index 1970f1c73..3afafc46b 100644 --- a/examples/ltdc/dma2d.c +++ b/examples/ltdc/dma2d.c @@ -92,7 +92,7 @@ static FAR struct dma2d_surface *ltdc_create_dma2d_surface(uint16_t xres, if (!sur->dma2d) { - dbg("up_dma2dcreatelayer failed\n"); + err("up_dma2dcreatelayer failed\n"); free(sur); sur = NULL; } @@ -102,7 +102,7 @@ static FAR struct dma2d_surface *ltdc_create_dma2d_surface(uint16_t xres, if (ret != OK) { - dbg("getvideoinfo() failed\n"); + err("getvideoinfo() failed\n"); } else { @@ -110,7 +110,7 @@ static FAR struct dma2d_surface *ltdc_create_dma2d_surface(uint16_t xres, if (ret != OK) { - dbg("getplaneinfo() failed\n"); + err("getplaneinfo() failed\n"); } } @@ -123,7 +123,7 @@ static FAR struct dma2d_surface *ltdc_create_dma2d_surface(uint16_t xres, { int lid; sur->dma2d->getlid(sur->dma2d, &lid); - dbg("dma2d layer %d is created with: " + info("dma2d layer %d is created with: " "layer = %p, xres = %d, yres = %d, fb start address = %p, " "fb size = %d, fmt = %d, bpp = %d\n", lid, sur->dma2d, sur->vinfo.xres, sur->vinfo.yres, @@ -411,7 +411,7 @@ static void ltdc_dma2d_interface(void) #endif FAR struct dma2d_layer_s *dma2d = active->dma2d; - dbg("Perform simple dma2d interface test\n"); + info("Perform simple dma2d interface test\n"); /* test setalpha */ @@ -419,7 +419,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - dbg("setalpha() failed\n"); + err("setalpha() failed\n"); _exit(1); } @@ -429,7 +429,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK || alpha != 127) { - dbg("getalpha() failed\n"); + err("getalpha() failed\n"); _exit(1); } @@ -439,7 +439,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - dbg("setblendmode() failed\n"); + err("setblendmode() failed\n"); _exit(1); } @@ -449,7 +449,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK || blendmode != DMA2D_BLEND_ALPHA) { - dbg("getblendmode() failed\n"); + err("getblendmode() failed\n"); _exit(1); } @@ -475,20 +475,20 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - dbg("ltdc getclut() failed\n"); + err("ltdc getclut() failed\n"); _exit(1); } for (i = 0; i < LTDC_EXAMPLE_NCOLORS; i++) { #ifdef CONFIG_FB_TRANSPARENCY - dbg("ltdc color %d, %02x:%02x:%02x:%02x\n", i, + info("ltdc color %d, %02x:%02x:%02x:%02x\n", i, cmapltdc->transp[i], cmapltdc->red[i], cmapltdc->green[i], cmapltdc->blue[i]); #else - dbg("ltdc color %d, %02x:%02x:%02x\n", i, + info("ltdc color %d, %02x:%02x:%02x\n", i, cmapltdc->red[i], cmapltdc->green[i], cmapltdc->blue[i]); @@ -499,7 +499,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - dbg("getclut() failed\n"); + err("getclut() failed\n"); _exit(1); } @@ -509,13 +509,13 @@ static void ltdc_dma2d_interface(void) #ifdef CONFIG_FB_TRANSPARENCY memset(cmap->transp, 0, 256); #endif - dbg("set color lookup table to black\n"); + info("set color lookup table to black\n"); ret = dma2d->setclut(dma2d, cmap); if (ret != OK) { - dbg("setclut() failed\n"); + err("setclut() failed\n"); _exit(1); } @@ -523,7 +523,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - dbg("getclut() failed\n"); + err("getclut() failed\n"); _exit(1); } @@ -538,7 +538,7 @@ static void ltdc_dma2d_interface(void) memcmp(cmap->red, cmap->green, 256)) #endif { - dbg("unexpected clut content\n"); + err("unexpected clut content\n"); _exit(1); } @@ -548,7 +548,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - dbg("ltdc getclut() failed\n"); + err("ltdc getclut() failed\n"); _exit(1); } @@ -563,7 +563,7 @@ static void ltdc_dma2d_interface(void) memcmp(cmap->red, cmap->green, 256)) #endif { - dbg("unexpected clut content\n"); + err("unexpected clut content\n"); _exit(1); } @@ -575,7 +575,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - dbg("ltdc setclut() failed\n"); + err("ltdc setclut() failed\n"); _exit(1); } @@ -585,7 +585,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - dbg("getclut() failed\n"); + err("getclut() failed\n"); _exit(1); } @@ -600,12 +600,12 @@ static void ltdc_dma2d_interface(void) memcmp(cmap->blue, cmapltdc->blue, LTDC_EXAMPLE_NCOLORS)) #endif { - dbg("clut of ltdc layer and related dma2d layer are different\n"); + err("clut of ltdc layer and related dma2d layer are different\n"); _exit(1); } else { - dbg("ok, changing the clut by the ltdc layer also changed the clut of " + info("ok, changing the clut by the ltdc layer also changed the clut of " "the dma2d layer as expected.\n"); } @@ -617,11 +617,11 @@ static void ltdc_dma2d_interface(void) if (ret == OK) { - dbg("setclut() failed, expected error if first color exceeds 256\n"); + err("setclut() failed, expected error if first color exceeds 256\n"); } else { - dbg("setclut() Ok, unsupported cmap detected\n"); + err("setclut() Ok, unsupported cmap detected\n"); } /* Check expected getclut error */ @@ -630,11 +630,11 @@ static void ltdc_dma2d_interface(void) if (ret == OK) { - dbg("getclut() failed, expected error if first color exceeds 256\n"); + err("getclut() failed, expected error if first color exceeds 256\n"); } else { - dbg("getclut() Ok, unsupported cmap detected\n"); + err("getclut() Ok, unsupported cmap detected\n"); } cmap->first = 0; @@ -645,7 +645,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - dbg("ltdc setclut() failed\n"); + err("ltdc setclut() failed\n"); _exit(1); } @@ -672,7 +672,7 @@ static void ltdc_dma2d_fillarea(void) #ifdef CONFIG_STM32_DMA2D_L8 if (active->vinfo.fmt == FB_FMT_RGB8) { - dbg("skipped, output to layer with CLUT pixel format not supported\n"); + err("skipped, output to layer with CLUT pixel format not supported\n"); return; } #endif @@ -684,7 +684,7 @@ static void ltdc_dma2d_fillarea(void) area.xres = active->vinfo.xres; area.yres = active->vinfo.yres; - dbg("check if the ltdc driver recognized when positioning overflows the whole" + info("check if the ltdc driver recognized when positioning overflows the whole" " layer buffer\n"); if (active->layer->fillarea(active->layer, &area, 0) != OK) @@ -702,14 +702,14 @@ static void ltdc_dma2d_fillarea(void) if (ret == OK) { - dbg("ok, driver detects wrong positioning\n"); + err("ok, driver detects wrong positioning\n"); } else { - dbg("fail, wrong positioning can overflow layer buffer\n"); + err("fail, wrong positioning can overflow layer buffer\n"); } - dbg("check if the dma2d driver recognized when positioning overflows the" + info("check if the dma2d driver recognized when positioning overflows the" " whole layer buffer\n"); if (active->dma2d->fillarea(active->dma2d, &area, 0) != OK) @@ -727,31 +727,31 @@ static void ltdc_dma2d_fillarea(void) if (ret == OK) { - dbg("ok, driver detects wrong positioning\n"); + err("ok, driver detects wrong positioning\n"); } else { - dbg("fail, wrong positioning can overflow layer buffer\n"); + err("fail, wrong positioning can overflow layer buffer\n"); } /* Flip with non blend */ - dbg("Perform fillarea test\n"); + info("Perform fillarea test\n"); - dbg("Ensure that the active layer is opaque\n"); + info("Ensure that the active layer is opaque\n"); active->layer->setalpha(active->layer, 0xff); - dbg("Disable blend mode for the active layer\n"); + info("Disable blend mode for the active layer\n"); active->layer->setblendmode(active->layer, LTDC_BLEND_NONE); - dbg("Set the active layer to fullscreen black\n"); + info("Set the active layer to fullscreen black\n"); ltdc_drawcolor(&active->vinfo, active->pinfo.fbmem, active->vinfo.xres, active->vinfo.yres, ltdc_color(&active->vinfo, LTDC_BLACK)); - dbg("Flip the top layer to the active visible layer\n"); + info("Flip the top layer to the active visible layer\n"); active->layer->update(active->layer, LTDC_UPDATE_ACTIVATE|LTDC_SYNC_VBLANK); - dbg("Draw a red rectangle in top left quarter of the screen\n"); + info("Draw a red rectangle in top left quarter of the screen\n"); area.xpos = 0; area.ypos = 0; @@ -763,12 +763,12 @@ static void ltdc_dma2d_fillarea(void) usleep(1000000); - dbg("Set the active layer to fullscreen black\n"); + info("Set the active layer to fullscreen black\n"); ltdc_drawcolor(&active->vinfo, active->pinfo.fbmem, active->vinfo.xres, active->vinfo.yres, ltdc_color(&active->vinfo, LTDC_BLACK)); - dbg("Draw a green rectangle in top right quarter of the screen\n"); + info("Draw a green rectangle in top right quarter of the screen\n"); area.xpos = active->vinfo.xres/2; area.ypos = 0; @@ -778,12 +778,12 @@ static void ltdc_dma2d_fillarea(void) usleep(1000000); - dbg("Set the active layer to fullscreen black\n"); + info("Set the active layer to fullscreen black\n"); ltdc_drawcolor(&active->vinfo, active->pinfo.fbmem, active->vinfo.xres, active->vinfo.yres, ltdc_color(&active->vinfo, LTDC_BLACK)); - dbg("Draw a white rectangle in bottom left quarter of the screen\n"); + info("Draw a white rectangle in bottom left quarter of the screen\n"); area.xpos = 0; area.ypos = active->vinfo.yres/2; @@ -791,11 +791,11 @@ static void ltdc_dma2d_fillarea(void) active->layer->fillarea(active->layer, &area, ltdc_color(&active->vinfo, LTDC_WHITE)); - dbg("Draw a blue rectangle in bottom right quarter of the screen\n"); + info("Draw a blue rectangle in bottom right quarter of the screen\n"); usleep(1000000); - dbg("Set the active layer to fullscreen black\n"); + info("Set the active layer to fullscreen black\n"); ltdc_drawcolor(&active->vinfo, active->pinfo.fbmem, active->vinfo.xres, active->vinfo.yres, ltdc_color(&active->vinfo, LTDC_BLACK)); @@ -808,7 +808,7 @@ static void ltdc_dma2d_fillarea(void) usleep(1000000); - dbg("Set the active layer to fullscreen black\n"); + info("Set the active layer to fullscreen black\n"); ltdc_drawcolor(&active->vinfo, active->pinfo.fbmem, active->vinfo.xres, active->vinfo.yres, ltdc_color(&active->vinfo, LTDC_BLACK)); @@ -832,37 +832,37 @@ static void ltdc_dma2d_blitsimple(void) #ifdef CONFIG_STM32_DMA2D_L8 if (active->vinfo.fmt == FB_FMT_RGB8) { - dbg("skipped, output to layer with CLUT pixel format not supported\n"); + err("skipped, output to layer with CLUT pixel format not supported\n"); return; } #endif /* Flip with non blend */ - dbg("Perform simple blit operation\n"); + info("Perform simple blit operation\n"); - dbg("active->pinfo.fbmem = %p\n", active->pinfo.fbmem); - dbg("inactive->pinfo.fbmem = %p\n", inactive->pinfo.fbmem); + info("active->pinfo.fbmem = %p\n", active->pinfo.fbmem); + info("inactive->pinfo.fbmem = %p\n", inactive->pinfo.fbmem); - dbg("Ensure that both ltdc layer are opaque\n"); + info("Ensure that both ltdc layer are opaque\n"); active->layer->setalpha(active->layer, 0xff); inactive->layer->setalpha(inactive->layer, 0xff); - dbg("Disable blend mode for ltdc both layer\n"); + info("Disable blend mode for ltdc both layer\n"); active->layer->setblendmode(active->layer, LTDC_BLEND_NONE); inactive->layer->setblendmode(inactive->layer, LTDC_BLEND_NONE); /* Fullscreen blit */ - dbg("Set the active layer to fullscreen black\n"); + info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); - dbg("Flip the top layer to the active visible layer\n"); + info("Flip the top layer to the active visible layer\n"); inactive->layer->update(active->layer, LTDC_UPDATE_ACTIVATE|LTDC_SYNC_VBLANK); ltdc_simple_draw(&inactive->vinfo, &inactive->pinfo); - dbg("Blit the whole bottom layer to the top layer\n"); + info("Blit the whole bottom layer to the top layer\n"); area.xpos = 0; area.ypos = 0; area.xres = inactive->vinfo.xres; @@ -873,7 +873,7 @@ static void ltdc_dma2d_blitsimple(void) /* Top left to the middle blit */ - dbg("Set the active layer to fullscreen black\n"); + info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); area.xpos = 0; @@ -881,7 +881,7 @@ static void ltdc_dma2d_blitsimple(void) area.xres = inactive->vinfo.xres/2; area.yres = inactive->vinfo.yres/2; - dbg("Blit the top left red rectangle from the bottom layer with the" + info("Blit the top left red rectangle from the bottom layer with the" " top layer\n"); active->layer->blit(active->layer, active->vinfo.xres/4, @@ -891,7 +891,7 @@ static void ltdc_dma2d_blitsimple(void) /* Top right to the middle blit */ - dbg("Set the active layer to fullscreen black\n"); + info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); area.xpos = inactive->vinfo.xres/2; @@ -899,7 +899,7 @@ static void ltdc_dma2d_blitsimple(void) area.xres = inactive->vinfo.xres/2; area.yres = inactive->vinfo.yres/2; - dbg("Blit the top right green rectangle from the bottom layer with the" + info("Blit the top right green rectangle from the bottom layer with the" " top layer\n"); active->layer->blit(active->layer, active->vinfo.xres/4, @@ -909,7 +909,7 @@ static void ltdc_dma2d_blitsimple(void) /* Bottom left to the middle blit */ - dbg("Set the active layer to fullscreen black\n"); + info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); area.xpos = 0; @@ -917,7 +917,7 @@ static void ltdc_dma2d_blitsimple(void) area.xres = inactive->vinfo.xres/2; area.yres = inactive->vinfo.yres/2; - dbg("Blit the bottom left white rectangle from the bottom layer with the" + info("Blit the bottom left white rectangle from the bottom layer with the" " top layer\n"); active->layer->blit(active->layer, active->vinfo.xres/4, @@ -927,7 +927,7 @@ static void ltdc_dma2d_blitsimple(void) /* Bottom right to the middle blit */ - dbg("Set the active layer to fullscreen black\n"); + info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); area.xpos = inactive->vinfo.xres/2; @@ -935,7 +935,7 @@ static void ltdc_dma2d_blitsimple(void) area.xres = inactive->vinfo.xres/2; area.yres = inactive->vinfo.yres/2; - dbg("Blit the bottom right blue rectangle from the bottom layer with the" + info("Blit the bottom right blue rectangle from the bottom layer with the" " top layer\n"); active->layer->blit(active->layer, active->vinfo.xres/4, @@ -963,29 +963,29 @@ static void ltdc_dma2d_blitpositioning(void) #ifdef CONFIG_STM32_DMA2D_L8 if (active->vinfo.fmt == FB_FMT_RGB8) { - dbg("skipped, output to layer with CLUT pixel format not supported\n"); + err("skipped, output to layer with CLUT pixel format not supported\n"); return; } #endif /* Set layer in the middle of the screen */ - dbg("active->pinfo.fbmem = %p\n", active->pinfo.fbmem); - dbg("inactive->pinfo.fbmem = %p\n", inactive->pinfo.fbmem); + info("active->pinfo.fbmem = %p\n", active->pinfo.fbmem); + info("inactive->pinfo.fbmem = %p\n", inactive->pinfo.fbmem); - dbg("Ensure that both ltdc layer opaque\n"); + info("Ensure that both ltdc layer opaque\n"); active->layer->setalpha(active->layer, 0xff); inactive->layer->setalpha(inactive->layer, 0xff); - dbg("Disable blend mode for both ltdc layer\n"); + info("Disable blend mode for both ltdc layer\n"); active->layer->setblendmode(active->layer, LTDC_BLEND_NONE); inactive->layer->setblendmode(inactive->layer, LTDC_BLEND_NONE); /* Fullscreen blit */ - dbg("Set the active layer to fullscreen black\n"); + info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); - dbg("Flip the top layer to the active visible layer\n"); + info("Flip the top layer to the active visible layer\n"); inactive->layer->update(active->layer, LTDC_UPDATE_ACTIVATE|LTDC_SYNC_VBLANK); @@ -993,7 +993,7 @@ static void ltdc_dma2d_blitpositioning(void) ltdc_simple_draw(&inactive->vinfo, &inactive->pinfo); - dbg("Perform positioning test\n"); + info("Perform positioning test\n"); area.xres = inactive->vinfo.xres/2; area.yres = inactive->vinfo.yres/2; @@ -1073,14 +1073,14 @@ static void ltdc_dma2d_blitpositioning(void) usleep(5); } - dbg("Perform move test\n"); + info("Perform move test\n"); area.xpos = inactive->vinfo.xres/4; area.ypos = inactive->vinfo.yres/4; area.xres = inactive->vinfo.xres/2; area.yres = inactive->vinfo.yres/2; - dbg("Set the active layer to fullscreen black\n"); + info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); /* Move right */ @@ -1138,14 +1138,14 @@ static void ltdc_dma2d_blitpositioning(void) usleep(5); } - dbg("Perform reference positioning test\n"); + info("Perform reference positioning test\n"); area.xres = inactive->vinfo.xres/2; area.yres = inactive->vinfo.yres/2; area.xpos = inactive->vinfo.xres/4; area.ypos = inactive->vinfo.yres/4; - dbg("Set the active layer to fullscreen black\n"); + info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); /* Move right */ @@ -1227,35 +1227,35 @@ static void ltdc_dma2d_blendsimple(void) #ifdef CONFIG_STM32_DMA2D_L8 if (active->vinfo.fmt == FB_FMT_RGB8) { - dbg("skipped, output to layer with CLUT pixel format not supported\n"); + err("skipped, output to layer with CLUT pixel format not supported\n"); return; } #endif - dbg("Perform simple blend operation\n"); + info("Perform simple blend operation\n"); - dbg("active->pinfo.fbmem = %p\n", active->pinfo.fbmem); - dbg("inactive->pinfo.fbmem = %p\n", inactive->pinfo.fbmem); + info("active->pinfo.fbmem = %p\n", active->pinfo.fbmem); + info("inactive->pinfo.fbmem = %p\n", inactive->pinfo.fbmem); - dbg("Ensure that both ltdc layer are opaque\n"); + info("Ensure that both ltdc layer are opaque\n"); active->layer->setalpha(active->layer, 0xff); inactive->layer->setalpha(inactive->layer, 0xff); - dbg("Enable alpha blend mode for both dma2d layer\n"); + info("Enable alpha blend mode for both dma2d layer\n"); active->dma2d->setblendmode(active->dma2d, DMA2D_BLEND_ALPHA); inactive->dma2d->setblendmode(inactive->dma2d, DMA2D_BLEND_ALPHA); /* Fullscreen blend */ - dbg("Set the active layer to fullscreen black\n"); + info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); - dbg("Flip the top layer to the active visible layer\n"); + info("Flip the top layer to the active visible layer\n"); active->layer->update(active->layer, LTDC_UPDATE_ACTIVATE|LTDC_UPDATE_SIM|LTDC_SYNC_VBLANK); ltdc_simple_draw(&inactive->vinfo, &inactive->pinfo); - dbg("Blend the whole bottom layer to the top layer\n"); + info("Blend the whole bottom layer to the top layer\n"); area.xpos = 0; area.ypos = 0; @@ -1274,7 +1274,7 @@ static void ltdc_dma2d_blendsimple(void) /* Blend top left to the middle */ - dbg("Set the active layer to fullscreen black\n"); + info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); area.xpos = 0; @@ -1282,7 +1282,7 @@ static void ltdc_dma2d_blendsimple(void) area.xres = inactive->vinfo.xres/2; area.yres = inactive->vinfo.yres/2; - dbg("Blend the top left red rectangle from the bottom layer with the middle" + info("Blend the top left red rectangle from the bottom layer with the middle" " of the top layer\n"); for (alpha = 0; alpha < 255 ; alpha++) @@ -1297,7 +1297,7 @@ static void ltdc_dma2d_blendsimple(void) /* Top right to the middle blit */ - dbg("Set the active layer to fullscreen black\n"); + info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); area.xpos = inactive->vinfo.xres/2; @@ -1305,7 +1305,7 @@ static void ltdc_dma2d_blendsimple(void) area.xres = inactive->vinfo.xres/2; area.yres = inactive->vinfo.yres/2; - dbg("Blend the top right green rectangle from the bottom layer with the" + info("Blend the top right green rectangle from the bottom layer with the" " middle of the top layer\n"); for (alpha = 0; alpha < 255 ; alpha++) @@ -1320,7 +1320,7 @@ static void ltdc_dma2d_blendsimple(void) /* Bottom left to the middle blit */ - dbg("Set the active layer to fullscreen black\n"); + info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); area.xpos = 0; @@ -1328,7 +1328,7 @@ static void ltdc_dma2d_blendsimple(void) area.xres = inactive->vinfo.xres/2; area.yres = inactive->vinfo.yres/2; - dbg("Blit the bottom left white rectangle from the bottom layer with the" + info("Blit the bottom left white rectangle from the bottom layer with the" " middle of the top layer\n"); for (alpha = 0; alpha < 255 ; alpha++) @@ -1343,7 +1343,7 @@ static void ltdc_dma2d_blendsimple(void) /* Bottom right to the middle blit */ - dbg("Set the active layer to fullscreen black\n"); + info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); area.xpos = inactive->vinfo.xres/2; @@ -1351,7 +1351,7 @@ static void ltdc_dma2d_blendsimple(void) area.xres = inactive->vinfo.xres/2; area.yres = inactive->vinfo.yres/2; - dbg("Blit the bottom right blue rectangle from the bottom layer with the" + info("Blit the bottom right blue rectangle from the bottom layer with the" " middle of the top layer\n"); for (alpha = 0; alpha < 255 ; alpha++) @@ -1364,7 +1364,7 @@ static void ltdc_dma2d_blendsimple(void) usleep(5); } - dbg("Set the active layer to fullscreen black\n"); + info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); } #endif /* CONFIG_STM32_LTDC_L2 */ @@ -1390,7 +1390,7 @@ static void ltdc_dma2d_blitdynamiclayer(void) #ifdef CONFIG_STM32_DMA2D_L8 if (active->vinfo.fmt == FB_FMT_RGB8) { - dbg("skipped, output to layer with CLUT pixel format not supported\n"); + err("skipped, output to layer with CLUT pixel format not supported\n"); return; } #endif @@ -1404,7 +1404,7 @@ static void ltdc_dma2d_blitdynamiclayer(void) _exit(1); } - dbg("create background dma2d surface: %p\n", back); + err("create background dma2d surface: %p\n", back); fore = ltdc_create_dma2d_surface(active->vinfo.xres/2, active->vinfo.yres/2, active->vinfo.fmt); @@ -1415,7 +1415,7 @@ static void ltdc_dma2d_blitdynamiclayer(void) _exit(1); } - dbg("create foreground dma2d surface: %p\n", fore); + err("create foreground dma2d surface: %p\n", fore); /* Wrong positioning detection */ @@ -1424,7 +1424,7 @@ static void ltdc_dma2d_blitdynamiclayer(void) forearea.xres = fore->vinfo.xres; forearea.yres = fore->vinfo.yres; - dbg("check if the ltdc driver recognized when positioning overflows the whole" + err("check if the ltdc driver recognized when positioning overflows the whole" " layer buffer\n"); if (active->layer->blit(active->layer, @@ -1458,14 +1458,14 @@ static void ltdc_dma2d_blitdynamiclayer(void) if (ret == OK) { - dbg("ok, driver detects wrong positioning\n"); + err("ok, driver detects wrong positioning\n"); } else { - dbg("fail, wrong positioning can overflow layer buffer\n"); + err("fail, wrong positioning can overflow layer buffer\n"); } - dbg("check if the dma2d driver recognized when positioning overflows the" + info("check if the dma2d driver recognized when positioning overflows the" " whole layer buffer\n"); forearea.xpos = 0; @@ -1502,11 +1502,11 @@ static void ltdc_dma2d_blitdynamiclayer(void) if (ret == OK) { - dbg("ok, driver detects wrong positioning\n"); + err("ok, driver detects wrong positioning\n"); } else { - dbg("fail, wrong positioning can overflow layer buffer\n"); + err("fail, wrong positioning can overflow layer buffer\n"); } /* Initialize the dma2d fullscreen background layer */ @@ -1522,23 +1522,23 @@ static void ltdc_dma2d_blitdynamiclayer(void) /* Blit test */ - dbg("Perform simple dma2d blit operation\n"); + info("Perform simple dma2d blit operation\n"); - dbg("Ensure that the ltdc layer is opaque\n"); + info("Ensure that the ltdc layer is opaque\n"); active->layer->setalpha(active->layer, 0xff); - dbg("Disable blend mode for the ltdc layer\n"); + info("Disable blend mode for the ltdc layer\n"); active->layer->setblendmode(active->layer, LTDC_BLEND_NONE); - dbg("Set the active layer to fullscreen black\n"); + info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); - dbg("Flip the top layer to the active visible layer\n"); + info("Flip the top layer to the active visible layer\n"); active->layer->update(active->layer, LTDC_UPDATE_ACTIVATE|LTDC_SYNC_VBLANK); /* Top left to the middle blit */ - dbg("Set the active layer to fullscreen black\n"); + info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); area.xpos = 0; @@ -1546,11 +1546,11 @@ static void ltdc_dma2d_blitdynamiclayer(void) area.xres = active->vinfo.xres/2; area.yres = active->vinfo.yres/2; - dbg("Blit the top left red rectangle from the background layer to the" + info("Blit the top left red rectangle from the background layer to the" " foreground layer\n"); fore->dma2d->blit(fore->dma2d, 0, 0, back->dma2d, &area); - dbg("Blit the resulting dma2d layer to the middle of the screen\n"); + info("Blit the resulting dma2d layer to the middle of the screen\n"); active->layer->blit(active->layer, active->vinfo.xres/4, active->vinfo.yres/4, back->dma2d, &forearea); @@ -1558,7 +1558,7 @@ static void ltdc_dma2d_blitdynamiclayer(void) /* Top right to the middle blit */ - dbg("Set the active layer to fullscreen black\n"); + info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); area.xpos = active->vinfo.xres/2; @@ -1566,11 +1566,11 @@ static void ltdc_dma2d_blitdynamiclayer(void) area.xres = active->vinfo.xres/2; area.yres = active->vinfo.yres/2; - dbg("Blit the top right green rectangle from the background layer to the" + info("Blit the top right green rectangle from the background layer to the" " foreground layer\n"); fore->dma2d->blit(fore->dma2d, 0, 0, back->dma2d, &area); - dbg("Blit the resulting dma2d layer to the middle of the screen\n"); + info("Blit the resulting dma2d layer to the middle of the screen\n"); active->layer->blit(active->layer, active->vinfo.xres/4, active->vinfo.yres/4, fore->dma2d, &forearea); @@ -1578,7 +1578,7 @@ static void ltdc_dma2d_blitdynamiclayer(void) /* Bottom left to the middle blit */ - dbg("Set the active layer to fullscreen black\n"); + info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); area.xpos = 0; @@ -1586,11 +1586,11 @@ static void ltdc_dma2d_blitdynamiclayer(void) area.xres = active->vinfo.xres/2; area.yres = active->vinfo.yres/2; - dbg("Blit the bottom left white rectangle from the background layer to the" + info("Blit the bottom left white rectangle from the background layer to the" " foreground layer\n"); fore->dma2d->blit(fore->dma2d, 0, 0, back->dma2d, &area); - dbg("Blit the resulting dma2d layer to the middle of the screen\n"); + info("Blit the resulting dma2d layer to the middle of the screen\n"); active->layer->blit(active->layer, active->vinfo.xres/4, active->vinfo.yres/4, fore->dma2d, &forearea); @@ -1598,7 +1598,7 @@ static void ltdc_dma2d_blitdynamiclayer(void) /* Bottom right to the middle blit */ - dbg("Set the active layer to fullscreen black\n"); + info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); area.xpos = active->vinfo.xres/2; @@ -1606,11 +1606,11 @@ static void ltdc_dma2d_blitdynamiclayer(void) area.xres = active->vinfo.xres/2; area.yres = active->vinfo.yres/2; - dbg("Blit the bottom right blue rectangle from the background layer to the" + info("Blit the bottom right blue rectangle from the background layer to the" " foreground layer\n"); fore->dma2d->blit(fore->dma2d, 0, 0, back->dma2d, &area); - dbg("Blit the resulting dma2d layer to the middle of the screen\n"); + info("Blit the resulting dma2d layer to the middle of the screen\n"); active->layer->blit(active->layer, active->vinfo.xres/4, active->vinfo.yres/4, fore->dma2d, &forearea); @@ -1618,7 +1618,7 @@ static void ltdc_dma2d_blitdynamiclayer(void) /* Middle to the middle blit */ - dbg("Set the active layer to fullscreen black\n"); + info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); @@ -1627,11 +1627,11 @@ static void ltdc_dma2d_blitdynamiclayer(void) area.xres = active->vinfo.xres/2; area.yres = active->vinfo.yres/2; - dbg("Blit the bottom half rectangle from the background layers to the middle" + info("Blit the bottom half rectangle from the background layers to the middle" " of the foreground layer\n"); fore->dma2d->blit(fore->dma2d, 0, 0, back->dma2d, &area); - dbg("Blit the resulting dma2d layer to the middle of the screen\n"); + info("Blit the resulting dma2d layer to the middle of the screen\n"); active->layer->blit(active->layer, active->vinfo.xres/4, active->vinfo.yres/4, fore->dma2d, &forearea); @@ -1662,7 +1662,7 @@ static void ltdc_dma2d_blenddynamiclayer(void) #ifdef CONFIG_STM32_DMA2D_L8 if (active->vinfo.fmt == FB_FMT_RGB8) { - dbg("skipped, output to layer with CLUT pixel format not supported\n"); + err("skipped, output to layer with CLUT pixel format not supported\n"); return; } #endif @@ -1676,7 +1676,7 @@ static void ltdc_dma2d_blenddynamiclayer(void) _exit(1); } - dbg("create background dma2d surface: %p\n", back); + info("create background dma2d surface: %p\n", back); fore = ltdc_create_dma2d_surface(active->vinfo.xres/2, active->vinfo.yres/2, active->vinfo.fmt); @@ -1687,11 +1687,11 @@ static void ltdc_dma2d_blenddynamiclayer(void) _exit(1); } - dbg("create foreground dma2d surface: %p\n", fore); + info("create foreground dma2d surface: %p\n", fore); /* Wrong positioning detection */ - dbg("check if the ltdc driver recognized when positioning overflows the whole" + info("check if the ltdc driver recognized when positioning overflows the whole" " layer buffer\n"); area.xpos = 0; @@ -1746,14 +1746,14 @@ static void ltdc_dma2d_blenddynamiclayer(void) if (ret == OK) { - dbg("ok, driver detects wrong positioning\n"); + err("ok, driver detects wrong positioning\n"); } else { - dbg("fail, wrong positioning can overflow layer buffer\n"); + err("fail, wrong positioning can overflow layer buffer\n"); } - dbg("check if the dma2d driver recognized when positioning overflows the" + info("check if the dma2d driver recognized when positioning overflows the" " whole layer buffer\n"); area.xpos = 0; @@ -1806,11 +1806,11 @@ static void ltdc_dma2d_blenddynamiclayer(void) if (ret == OK) { - dbg("ok, driver detects wrong positioning\n"); + err("ok, driver detects wrong positioning\n"); } else { - dbg("fail, wrong positioning can overflow layer buffer\n"); + err("fail, wrong positioning can overflow layer buffer\n"); } /* Initialize the dma2d fullscreen background layer */ @@ -1819,26 +1819,26 @@ static void ltdc_dma2d_blenddynamiclayer(void) /* Blit test */ - dbg("Perform simple dma2d blend operation\n"); + info("Perform simple dma2d blend operation\n"); - dbg("Ensure that the ltdc layer is opaque\n"); + info("Ensure that the ltdc layer is opaque\n"); active->layer->setalpha(active->layer, 0xff); - dbg("Disable blend mode for the ltdc layer\n"); + info("Disable blend mode for the ltdc layer\n"); active->layer->setblendmode(active->layer, LTDC_BLEND_NONE); - dbg("Enable alpha blend mode for both dma2d layer\n"); + info("Enable alpha blend mode for both dma2d layer\n"); fore->dma2d->setblendmode(fore->dma2d, DMA2D_BLEND_ALPHA); back->dma2d->setblendmode(back->dma2d, DMA2D_BLEND_ALPHA); - dbg("Set the active layer to fullscreen black\n"); + info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); - dbg("Flip the top layer to the active visible layer\n"); + info("Flip the top layer to the active visible layer\n"); active->layer->update(active->layer, LTDC_UPDATE_ACTIVATE|LTDC_SYNC_VBLANK); /* Top left to the middle */ - dbg("Set the active layer to fullscreen black\n"); + info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); area.xpos = 0; @@ -1846,7 +1846,7 @@ static void ltdc_dma2d_blenddynamiclayer(void) area.xres = active->vinfo.xres/2; area.yres = active->vinfo.yres/2; - dbg("Blend the top left red rectangle from the background layer with the" + info("Blend the top left red rectangle from the background layer with the" " middle of the foreground layer\n"); for (alpha = 0; alpha < 255 ; alpha++) @@ -1863,7 +1863,7 @@ static void ltdc_dma2d_blenddynamiclayer(void) /* Top right to the middle blit */ - dbg("Set the active layer to fullscreen black\n"); + info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); area.xpos = active->vinfo.xres/2; @@ -1871,7 +1871,7 @@ static void ltdc_dma2d_blenddynamiclayer(void) area.xres = active->vinfo.xres/2; area.yres = active->vinfo.yres/2; - dbg("Blend the top right green rectangle from the background layer with the" + info("Blend the top right green rectangle from the background layer with the" " middle of the foreground layer\n"); for (alpha = 0; alpha < 255 ; alpha++) @@ -1888,7 +1888,7 @@ static void ltdc_dma2d_blenddynamiclayer(void) /* Bottom left to the middle blit */ - dbg("Set the active layer to fullscreen black\n"); + info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); area.xpos = 0; @@ -1896,7 +1896,7 @@ static void ltdc_dma2d_blenddynamiclayer(void) area.xres = active->vinfo.xres/2; area.yres = active->vinfo.yres/2; - dbg("Blend the bottom left white rectangle from the background layer with the" + info("Blend the bottom left white rectangle from the background layer with the" " middle of foreground layer\n"); for (alpha = 0; alpha < 255 ; alpha++) @@ -1913,7 +1913,7 @@ static void ltdc_dma2d_blenddynamiclayer(void) /* Bottom right to the middle blit */ - dbg("Set the active layer to fullscreen black\n"); + info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); area.xpos = active->vinfo.xres/2; @@ -1921,7 +1921,7 @@ static void ltdc_dma2d_blenddynamiclayer(void) area.xres = active->vinfo.xres/2; area.yres = active->vinfo.yres/2; - dbg("Blend the bottom right blue rectangle from the background layer with the" + info("Blend the bottom right blue rectangle from the background layer with the" " middle of the foreground layer\n"); for (alpha = 0; alpha < 255 ; alpha++) @@ -1938,7 +1938,7 @@ static void ltdc_dma2d_blenddynamiclayer(void) /* Middle to the middle blit */ - dbg("Set the active layer to fullscreen black\n"); + info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); @@ -1947,7 +1947,7 @@ static void ltdc_dma2d_blenddynamiclayer(void) area.xres = active->vinfo.xres/2; area.yres = active->vinfo.yres/2; - dbg("Blend the bottom half screen rectangle from the background layers middle" + info("Blend the bottom half screen rectangle from the background layers middle" " with the middle of the foreground layer\n"); for (alpha = 0; alpha < 255 ; alpha++) @@ -1987,7 +1987,7 @@ static void ltdc_dma2d_blitflippositioning(void) #ifdef CONFIG_STM32_DMA2D_L8 if (active->vinfo.fmt == FB_FMT_RGB8 || inactive->vinfo.fmt == FB_FMT_RGB8) { - dbg("skipped, output to layer with CLUT pixel format not supported\n"); + err("skipped, output to layer with CLUT pixel format not supported\n"); return; } #endif @@ -2002,7 +2002,7 @@ static void ltdc_dma2d_blitflippositioning(void) _exit(1); } - dbg("create foreground dma2d surface: %p\n", fore); + info("create foreground dma2d surface: %p\n", fore); back = ltdc_create_dma2d_surface(active->vinfo.xres/2, active->vinfo.yres/2, active->vinfo.fmt); @@ -2013,7 +2013,7 @@ static void ltdc_dma2d_blitflippositioning(void) _exit(1); } - dbg("create background dma2d surface: %p\n", back); + info("create background dma2d surface: %p\n", back); image = ltdc_create_dma2d_surface(active->vinfo.xres, active->vinfo.yres, active->vinfo.fmt); @@ -2025,26 +2025,26 @@ static void ltdc_dma2d_blitflippositioning(void) _exit(1); } - dbg("create the dma2d surface to store the image: %p\n", image); + info("create the dma2d surface to store the image: %p\n", image); - dbg("Enable alpha blending for both dma2d layer\n"); + info("Enable alpha blending for both dma2d layer\n"); fore->dma2d->setblendmode(fore->dma2d, DMA2D_BLEND_ALPHA); back->dma2d->setblendmode(back->dma2d, DMA2D_BLEND_ALPHA); - dbg("Ensure that both ltdc layer opaque\n"); + info("Ensure that both ltdc layer opaque\n"); active->layer->setalpha(active->layer, 0xff); inactive->layer->setalpha(inactive->layer, 0xff); - dbg("Disable blend mode for both ltdc layer\n"); + info("Disable blend mode for both ltdc layer\n"); active->layer->setblendmode(active->layer, LTDC_BLEND_NONE); inactive->layer->setblendmode(inactive->layer, LTDC_BLEND_NONE); /* Fullscreen blit */ - dbg("Set the active layer to fullscreen black\n"); + info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); - dbg("Flip the top layer to the active visible layer\n"); + info("Flip the top layer to the active visible layer\n"); inactive->layer->update(active->layer, LTDC_UPDATE_ACTIVATE|LTDC_SYNC_VBLANK); @@ -2052,7 +2052,7 @@ static void ltdc_dma2d_blitflippositioning(void) ltdc_simple_draw(&image->vinfo, &image->pinfo); - dbg("Perform positioning test\n"); + info("Perform positioning test\n"); area.xpos = inactive->vinfo.xres/4; area.ypos = inactive->vinfo.yres/4; @@ -2131,7 +2131,7 @@ static void ltdc_dma2d_blitflippositioning(void) ltdc_blendoutline(fore, back); - dbg("Perform move test\n"); + info("Perform move test\n"); area.xpos = inactive->vinfo.xres/4; area.ypos = inactive->vinfo.yres/4; @@ -2198,7 +2198,7 @@ static void ltdc_dma2d_blitflippositioning(void) } - dbg("Perform reference positioning test\n"); + info("Perform reference positioning test\n"); area.xpos = inactive->vinfo.xres/4; area.ypos = inactive->vinfo.yres/4; @@ -2289,7 +2289,7 @@ static void ltdc_screensaver(void) #ifdef CONFIG_STM32_DMA2D_L8 if (active->vinfo.fmt == FB_FMT_RGB8 || inactive->vinfo.fmt == FB_FMT_RGB8) { - dbg("skipped, output to layer with CLUT pixel format not supported\n"); + info("skipped, output to layer with CLUT pixel format not supported\n"); return; } #endif @@ -2305,7 +2305,7 @@ static void ltdc_screensaver(void) _exit(1); } - dbg("create a scratch dma2d layer: %p\n", scratch); + info("create a scratch dma2d layer: %p\n", scratch); rect1 = ltdc_create_dma2d_surface(active->vinfo.xres/4, active->vinfo.yres/4, @@ -2317,7 +2317,7 @@ static void ltdc_screensaver(void) _exit(1); } - dbg("create a dma2d layer for the rectangle 1: %p\n", rect1); + info("create a dma2d layer for the rectangle 1: %p\n", rect1); rect2 = ltdc_create_dma2d_surface(active->vinfo.xres/4, active->vinfo.yres/4, @@ -2330,7 +2330,7 @@ static void ltdc_screensaver(void) _exit(1); } - dbg("create a dma2d layer for rectangle 2: %p\n", rect2); + info("create a dma2d layer for rectangle 2: %p\n", rect2); image = ltdc_create_dma2d_surface(active->vinfo.xres, active->vinfo.yres, @@ -2344,19 +2344,19 @@ static void ltdc_screensaver(void) _exit(1); } - dbg("create a dma2d layer to store the background image: %p\n", image); + info("create a dma2d layer to store the background image: %p\n", image); - dbg("Enable alpha blending for the dma2d layer\n"); + info("Enable alpha blending for the dma2d layer\n"); scratch->dma2d->setblendmode(scratch->dma2d, DMA2D_BLEND_ALPHA); rect1->dma2d->setblendmode(rect1->dma2d, DMA2D_BLEND_ALPHA); rect2->dma2d->setblendmode(rect2->dma2d, DMA2D_BLEND_ALPHA); /* ltdc layer settings */ - dbg("Ensure that both ltdc layer opaque\n"); + info("Ensure that both ltdc layer opaque\n"); active->layer->setalpha(active->layer, 0xff); inactive->layer->setalpha(inactive->layer, 0xff); - dbg("Disable blend mode for both ltdc layer\n"); + info("Disable blend mode for both ltdc layer\n"); active->layer->setblendmode(active->layer, LTDC_BLEND_NONE); inactive->layer->setblendmode(inactive->layer, LTDC_BLEND_NONE); @@ -2364,7 +2364,7 @@ static void ltdc_screensaver(void) ltdc_simple_draw(&image->vinfo, &image->pinfo); - dbg("Perform screensaver\n"); + info("Perform screensaver\n"); area.xpos = image->vinfo.xres/4 + image->vinfo.xres / 8; area.ypos = image->vinfo.yres/4 + image->vinfo.yres / 8; diff --git a/examples/ltdc/ltdc_main.c b/examples/ltdc/ltdc_main.c index 4d0827cfa..5621331d3 100644 --- a/examples/ltdc/ltdc_main.c +++ b/examples/ltdc/ltdc_main.c @@ -96,23 +96,23 @@ static int ltdc_init_surface(int lid, uint32_t mode) if (!sur->layer) { - dbg("up_ltdcgetlayer() failed\n"); + err("up_ltdcgetlayer() failed\n"); return -1; } if (sur->layer->getvideoinfo(sur->layer, &sur->vinfo) != OK) { - dbg("getvideoinfo() failed\n"); + err("getvideoinfo() failed\n"); return -1; } if (sur->layer->getplaneinfo(sur->layer, 0, &sur->pinfo) != OK) { - dbg("getplaneinfo() failed\n"); + err("getplaneinfo() failed\n"); return -1; } - dbg("layer %d is configured with: xres = %d, yres = %d," + info("layer %d is configured with: xres = %d, yres = %d," "fb start address = %p, fb size = %d, fmt = %d, bpp = %d\n", lid, sur->vinfo.xres, sur->vinfo.yres, sur->pinfo.fbmem, sur->pinfo.fblen, sur->vinfo.fmt, sur->pinfo.bpp); @@ -133,7 +133,7 @@ static int ltdc_init_surface(int lid, uint32_t mode) if (sur->layer->getlid(sur->layer, &lid, LTDC_LAYER_DMA2D) != OK) { - dbg("getlid() failed\n"); + err("getlid() failed\n"); return -1; } @@ -141,7 +141,7 @@ static int ltdc_init_surface(int lid, uint32_t mode) if (sur->dma2d == NULL) { - dbg("up_dma2dgetlayer() failed\n"); + err("up_dma2dgetlayer() failed\n"); return -1; } #endif @@ -168,7 +168,7 @@ static void ltdc_setget_test(void) FAR struct ltdc_area_s area; FAR struct surface *sur = ltdc_get_surface(LTDC_LAYER_ACTIVE); - dbg("Perform set and get test\n"); + info("Perform set and get test\n"); /* setalpha */ @@ -176,14 +176,14 @@ static void ltdc_setget_test(void) if (ret != OK) { - dbg("setalpha() failed\n"); + err("setalpha() failed\n"); } ret = sur->layer->getalpha(sur->layer, &alpha); if (ret != OK || alpha != 0x7f) { - dbg("getalpha() failed\n"); + err("getalpha() failed\n"); } /* setcolor */ @@ -192,14 +192,14 @@ static void ltdc_setget_test(void) if (ret != OK) { - dbg("setcolor() failed\n"); + err("setcolor() failed\n"); } ret = sur->layer->getcolor(sur->layer, &color); if (ret != OK || color != 0x11223344) { - dbg("getcolor() failed\n"); + err("getcolor() failed\n"); } /* setcolorkey */ @@ -208,14 +208,14 @@ static void ltdc_setget_test(void) if (ret != OK) { - dbg("setcolorkey() failed\n"); + err("setcolorkey() failed\n"); } ret = sur->layer->getcolorkey(sur->layer, &color); if (ret != OK || color != 0x55667788) { - dbg("getcolorkey() failed\n"); + err("getcolorkey() failed\n"); } /* setblendmode */ @@ -224,14 +224,14 @@ static void ltdc_setget_test(void) if (ret != OK) { - dbg("setblendmode() failed\n"); + err("setblendmode() failed\n"); } ret = sur->layer->getblendmode(sur->layer, &mode); if (ret != OK || mode != LTDC_BLEND_NONE) { - dbg("getblendmode() failed\n"); + err("getblendmode() failed\n"); } /* setarea */ @@ -246,7 +246,7 @@ static void ltdc_setget_test(void) if (ret != OK) { - dbg("setarea() failed\n"); + err("setarea() failed\n"); } ret = sur->layer->getarea(sur->layer, &area, &xpos, &ypos); @@ -255,7 +255,7 @@ static void ltdc_setget_test(void) area.xpos != sur->vinfo.xres/4 || area.ypos != sur->vinfo.yres/4 || area.xres != sur->vinfo.xres/2 || area.yres != sur->vinfo.yres/2) { - dbg("getarea() failed\n"); + err("getarea() failed\n"); } #ifdef CONFIG_FB_CMAP @@ -275,7 +275,7 @@ static void ltdc_setget_test(void) if (ret != OK) { - dbg("setclut() failed\n"); + err("setclut() failed\n"); } /* Clear all colors to black */ @@ -291,7 +291,7 @@ static void ltdc_setget_test(void) if (ret != OK) { - dbg("getclut() failed\n"); + err("getclut() failed\n"); } #ifdef CONFIG_FB_TRANSPARENCY @@ -305,7 +305,7 @@ static void ltdc_setget_test(void) ltdc_cmpcolor(g_cmap.green, cmap->green, LTDC_EXAMPLE_NCOLORS)) #endif { - dbg("getclut() failed, unexpected cmap content\n"); + err("getclut() failed, unexpected cmap content\n"); } ltdc_deletecmap(cmap); @@ -318,7 +318,7 @@ static void ltdc_setget_test(void) if (ret != OK) { - dbg("setclut() failed\n"); + err("setclut() failed\n"); } } #endif @@ -363,22 +363,22 @@ static void ltdc_color_test(void) /* Default Color black */ - dbg("Set default color to black\n"); + info("Set default color to black\n"); sur->layer->setcolor(sur->layer, 0xff000000); - dbg("Update the layer\n"); + info("Update the layer\n"); sur->layer->update(sur->layer, LTDC_SYNC_VBLANK|LTDC_SYNC_WAIT); /* Set active layer to the upper half of the screen */ - dbg("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n", + info("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n", area.xpos, area.ypos, area.xres, area.yres); sur->layer->setarea(sur->layer, &area, area.xpos, area.ypos); - dbg("Update the layer, should be black outside the colorful rectangle\n"); + info("Update the layer, should be black outside the colorful rectangle\n"); sur->layer->update(sur->layer, LTDC_SYNC_VBLANK|LTDC_SYNC_WAIT); @@ -386,11 +386,11 @@ static void ltdc_color_test(void) /* Default Color red */ - dbg("Update the layer, should be red outside the colorful rectangle\n"); + info("Update the layer, should be red outside the colorful rectangle\n"); sur->layer->setcolor(sur->layer, 0xffff0000); - dbg("Update the layer\n"); + info("Update the layer\n"); sur->layer->update(sur->layer, LTDC_SYNC_VBLANK|LTDC_SYNC_WAIT); @@ -398,11 +398,11 @@ static void ltdc_color_test(void) /* Default Color green */ - dbg("Update the layer, should be green outside the colorful rectangle\n"); + info("Update the layer, should be green outside the colorful rectangle\n"); sur->layer->setcolor(sur->layer, 0xff00ff00); - dbg("Update the layer\n"); + info("Update the layer\n"); sur->layer->update(sur->layer, LTDC_SYNC_VBLANK|LTDC_SYNC_WAIT); @@ -410,11 +410,11 @@ static void ltdc_color_test(void) /* Default Color blue */ - dbg("Update the layer, should be blue outside the colorful rectangle\n"); + info("Update the layer, should be blue outside the colorful rectangle\n"); sur->layer->setcolor(sur->layer, 0xff0000ff); - dbg("Update the layer\n"); + info("Update the layer\n"); sur->layer->update(sur->layer, LTDC_SYNC_VBLANK|LTDC_SYNC_WAIT); @@ -427,18 +427,18 @@ static void ltdc_color_test(void) area.xres = sur->vinfo.xres; area.yres = sur->vinfo.yres; - dbg("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n", + info("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n", area.xpos, area.ypos, area.xres, area.yres); sur->layer->setarea(sur->layer, &area, area.xpos, area.ypos); /* Default Color black */ - dbg("Set default color to black\n"); + info("Set default color to black\n"); sur->layer->setcolor(sur->layer, 0); - dbg("Update the layer\n"); + info("Update the layer\n"); sur->layer->update(sur->layer, LTDC_SYNC_VBLANK|LTDC_SYNC_WAIT); @@ -468,7 +468,7 @@ static void ltdc_colorkey_test(void) /* Resize active layer */ - dbg("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n", + info("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n", area.xpos, area.ypos, area.xres, area.yres); sur->layer->setarea(sur->layer, &area, area.xpos, area.ypos); @@ -479,11 +479,11 @@ static void ltdc_colorkey_test(void) /* Color key white */ - dbg("Set colorkey to white\n"); + info("Set colorkey to white\n"); sur->layer->setcolorkey(sur->layer, 0xffffff); - dbg("Update the layer\n"); + info("Update the layer\n"); sur->layer->update(sur->layer, LTDC_SYNC_VBLANK|LTDC_SYNC_WAIT); @@ -491,11 +491,11 @@ static void ltdc_colorkey_test(void) /* Color key red */ - dbg("Set colorkey to red\n"); + info("Set colorkey to red\n"); sur->layer->setcolorkey(sur->layer, 0xff0000); - dbg("Update the layer\n"); + info("Update the layer\n"); sur->layer->update(sur->layer, LTDC_SYNC_VBLANK|LTDC_SYNC_WAIT); @@ -503,11 +503,11 @@ static void ltdc_colorkey_test(void) /* Color key green */ - dbg("Set colorkey to green\n"); + info("Set colorkey to green\n"); sur->layer->setcolorkey(sur->layer, 0xff00); - dbg("Update the layer\n"); + info("Update the layer\n"); sur->layer->update(sur->layer, LTDC_SYNC_VBLANK|LTDC_SYNC_WAIT); @@ -515,15 +515,15 @@ static void ltdc_colorkey_test(void) /* Color key red */ - dbg("Set colorkey to blue\n"); + info("Set colorkey to blue\n"); sur->layer->setcolorkey(sur->layer, 0xff); - dbg("Update the layer\n"); + info("Update the layer\n"); sur->layer->update(sur->layer, LTDC_SYNC_VBLANK|LTDC_SYNC_WAIT); - dbg("Disable colorkey\n"); + info("Disable colorkey\n"); usleep(1000000); @@ -536,7 +536,7 @@ static void ltdc_colorkey_test(void) area.xres = sur->vinfo.xres; area.yres = sur->vinfo.yres; - dbg("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n", + info("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n", area.xpos, area.ypos, area.xres, area.yres); sur->layer->setarea(sur->layer, &area, 0, 0); @@ -545,7 +545,7 @@ static void ltdc_colorkey_test(void) sur->layer->setblendmode(sur->layer, LTDC_BLEND_NONE); - dbg("Update the layer\n"); + info("Update the layer\n"); sur->layer->update(sur->layer, LTDC_SYNC_VBLANK|LTDC_SYNC_WAIT); @@ -568,7 +568,7 @@ static void ltdc_area_test(void) struct ltdc_area_s area; FAR struct surface *sur = ltdc_get_surface(LTDC_LAYER_ACTIVE); - dbg("Perform area test\n"); + info("Perform area test\n"); ltdc_simple_draw(&sur->vinfo, &sur->pinfo); @@ -581,12 +581,12 @@ static void ltdc_area_test(void) area.xres = sur->vinfo.xres/2; area.yres = sur->vinfo.yres/2; - dbg("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n", + info("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n", area.xpos, area.ypos, area.xres, area.yres); sur->layer->setarea(sur->layer, &area, area.xpos, area.ypos); - dbg("Update the layer, to show the upper left rectangle of the screen\n"); + info("Update the layer, to show the upper left rectangle of the screen\n"); sur->layer->update(sur->layer, LTDC_SYNC_VBLANK); @@ -599,12 +599,12 @@ static void ltdc_area_test(void) area.xres = sur->vinfo.xres/2; area.yres = sur->vinfo.yres/2; - dbg("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n", + info("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n", area.xpos, area.ypos, area.xres, area.yres); sur->layer->setarea(sur->layer, &area, area.xpos, area.ypos); - dbg("Update the layer, to show the upper right rectangle of the screen\n"); + info("Update the layer, to show the upper right rectangle of the screen\n"); sur->layer->update(sur->layer, LTDC_SYNC_VBLANK); @@ -617,12 +617,12 @@ static void ltdc_area_test(void) area.xres = sur->vinfo.xres/2; area.yres = sur->vinfo.yres/2; - dbg("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n", + info("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n", area.xpos, area.ypos, area.xres, area.yres); sur->layer->setarea(sur->layer, &area, area.xpos, area.ypos); - dbg("Update the layer, to show the lower left rectangle of the screen\n"); + info("Update the layer, to show the lower left rectangle of the screen\n"); sur->layer->update(sur->layer, LTDC_SYNC_VBLANK); @@ -635,12 +635,12 @@ static void ltdc_area_test(void) area.xres = sur->vinfo.xres/2; area.yres = sur->vinfo.yres/2; - dbg("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n", + info("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n", area.xpos, area.ypos, area.xres, area.yres); sur->layer->setarea(sur->layer, &area, area.xpos, area.ypos); - dbg("Update the layer, to show the lower right rectangle of the screen\n"); + info("Update the layer, to show the lower right rectangle of the screen\n"); sur->layer->update(sur->layer, LTDC_SYNC_VBLANK); @@ -648,7 +648,7 @@ static void ltdc_area_test(void) /* Perform layer positioning */ - dbg("Perform positioning test\n"); + info("Perform positioning test\n"); /* Set layer in the middle of the screen */ @@ -712,7 +712,7 @@ static void ltdc_area_test(void) /* Perform move */ - dbg("Perform move test\n"); + info("Perform move test\n"); /* Set layer in the middle of the screen */ @@ -786,7 +786,7 @@ static void ltdc_area_test(void) /* Perform Reference position */ - dbg("Perform reference positioning test\n"); + info("Perform reference positioning test\n"); /* Set layer in the middle of the screen */ @@ -862,12 +862,12 @@ static void ltdc_area_test(void) area.xres = sur->vinfo.xres; area.yres = sur->vinfo.yres; - dbg("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n", + info("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n", area.xpos, area.ypos, area.xres, area.yres); sur->layer->setarea(sur->layer, &area, area.xpos, area.ypos); - dbg("Update the layer to fullscreen\n"); + info("Update the layer to fullscreen\n"); sur->layer->update(sur->layer, LTDC_SYNC_VBLANK); @@ -893,7 +893,7 @@ static void ltdc_common_test(void) struct ltdc_area_s area; FAR struct surface *sur; - dbg("Set layer 2 to the active layer, blend with subjacent layer 1\n"); + info("Set layer 2 to the active layer, blend with subjacent layer 1\n"); sur = ltdc_get_surface(LTDC_LAYER_TOP); @@ -905,7 +905,7 @@ static void ltdc_common_test(void) /* Perform area test */ - dbg("Perform area test\n"); + info("Perform area test\n"); /* Set layer in the middle of the screen */ @@ -1026,7 +1026,7 @@ static void ltdc_common_test(void) /* Perform positioning test */ - dbg("Perform positioning test\n"); + info("Perform positioning test\n"); /* Set layer in the middle of the screen */ @@ -1145,7 +1145,7 @@ static void ltdc_common_test(void) /* Perform Reference position */ - dbg("Perform reference positioning test\n"); + info("Perform reference positioning test\n"); /* Set layer in the middle of the screen */ @@ -1271,7 +1271,7 @@ static void ltdc_common_test(void) area.xres = sur->vinfo.xres; area.yres = sur->vinfo.yres; - dbg("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n", + info("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n", area.xpos, area.ypos, area.xres, area.yres); sur->layer->setarea(sur->layer, &area, area.xpos, area.ypos); @@ -1281,7 +1281,7 @@ static void ltdc_common_test(void) sur->layer->setcolorkey(sur->layer, 0); sur->layer->setblendmode(sur->layer, LTDC_BLEND_NONE); - dbg("Update the layer to fullscreen\n"); + info("Update the layer to fullscreen\n"); sur->layer->update(sur->layer, LTDC_SYNC_VBLANK); @@ -1306,16 +1306,16 @@ static void ltdc_alpha_blend_test(void) /* Ensure operation on layer 2 */ - dbg("Set layer 2 to the active layer, blend with subjacent layer 1\n"); + info("Set layer 2 to the active layer, blend with subjacent layer 1\n"); top = ltdc_get_surface(LTDC_LAYER_TOP); bottom = ltdc_get_surface(LTDC_LAYER_BOTTOM); - dbg("top = %p, bottom = %p\n", top->pinfo.fbmem, bottom->pinfo.fbmem); + info("top = %p, bottom = %p\n", top->pinfo.fbmem, bottom->pinfo.fbmem); ltdc_simple_draw(&top->vinfo, &top->pinfo); - dbg("Fill layer1 with color black\n"); + info("Fill layer1 with color black\n"); ltdc_drawcolor(&bottom->vinfo, bottom->pinfo.fbmem, bottom->vinfo.xres, bottom->vinfo.yres, @@ -1326,26 +1326,26 @@ static void ltdc_alpha_blend_test(void) area.xres = top->vinfo.xres/2; area.yres = top->vinfo.yres/2; - dbg("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n", + info("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n", area.xpos, area.ypos, area.xres, area.yres); top->layer->setarea(top->layer, &area, area.xpos, area.ypos); - dbg("Set alpha blending with bottom layer1\n"); + info("Set alpha blending with bottom layer1\n"); top->layer->setblendmode(top->layer, LTDC_BLEND_ALPHA); - dbg("Disable blending for bottom layer1 to make the layer color visible\n"); + info("Disable blending for bottom layer1 to make the layer color visible\n"); bottom->layer->setblendmode(bottom->layer, LTDC_BLEND_NONE); bottom->layer->setalpha(bottom->layer, 0xff); - dbg("Fill bottom layer1 with color black\n"); + info("Fill bottom layer1 with color black\n"); ltdc_drawcolor(&bottom->vinfo, bottom->pinfo.fbmem, bottom->vinfo.xres, bottom->vinfo.yres, ltdc_color(&bottom->vinfo, LTDC_BLACK)); - dbg("Blend in black subjacent layer\n"); + info("Blend in black subjacent layer\n"); for (i = 255; i >= 0; i--) { @@ -1353,13 +1353,13 @@ static void ltdc_alpha_blend_test(void) top->layer->update(top->layer, LTDC_UPDATE_SIM|LTDC_SYNC_VBLANK); } - dbg("Fill bottom layer1 with color red\n"); + info("Fill bottom layer1 with color red\n"); ltdc_drawcolor(&bottom->vinfo, bottom->pinfo.fbmem, bottom->vinfo.xres, bottom->vinfo.yres, ltdc_color(&bottom->vinfo, LTDC_RED)); - dbg("Blend in red subjacent layer\n"); + info("Blend in red subjacent layer\n"); for (i = 255; i >= 0; i--) { @@ -1367,13 +1367,13 @@ static void ltdc_alpha_blend_test(void) top->layer->update(top->layer, LTDC_UPDATE_SIM|LTDC_SYNC_VBLANK); } - dbg("Fill bottom layer1 with color green\n"); + info("Fill bottom layer1 with color green\n"); ltdc_drawcolor(&bottom->vinfo, bottom->pinfo.fbmem, bottom->vinfo.xres, bottom->vinfo.yres, ltdc_color(&bottom->vinfo, LTDC_GREEN)); - dbg("Blend in green subjacent layer\n"); + info("Blend in green subjacent layer\n"); for (i = 255; i >= 0; i--) { @@ -1381,13 +1381,13 @@ static void ltdc_alpha_blend_test(void) top->layer->update(top->layer, LTDC_UPDATE_SIM|LTDC_SYNC_VBLANK); } - dbg("Fill bottom layer1 with color blue\n"); + info("Fill bottom layer1 with color blue\n"); ltdc_drawcolor(&bottom->vinfo, bottom->pinfo.fbmem, bottom->vinfo.xres, bottom->vinfo.yres, ltdc_color(&bottom->vinfo, LTDC_BLUE)); - dbg("Blend in blue subjacent layer\n"); + info("Blend in blue subjacent layer\n"); for (i = 255; i >= 0; i--) { @@ -1395,13 +1395,13 @@ static void ltdc_alpha_blend_test(void) top->layer->update(top->layer, LTDC_UPDATE_SIM|LTDC_SYNC_VBLANK); } - dbg("Fill bottom layer1 with color white\n"); + info("Fill bottom layer1 with color white\n"); ltdc_drawcolor(&bottom->vinfo, bottom->pinfo.fbmem, bottom->vinfo.xres, bottom->vinfo.yres, ltdc_color(&bottom->vinfo, LTDC_WHITE)); - dbg("Blend in white subjacent layer\n"); + info("Blend in white subjacent layer\n"); for (i = 255; i >= 0; i--) { @@ -1437,32 +1437,32 @@ static void ltdc_flip_test(void) /* Flip with non blend */ - dbg("Perform flip test without blending\n"); + info("Perform flip test without blending\n"); - dbg("active->pinfo.fbmem = %p\n", active->pinfo.fbmem); - dbg("inactive->pinfo.fbmem = %p\n", inactive->pinfo.fbmem); + info("active->pinfo.fbmem = %p\n", active->pinfo.fbmem); + info("inactive->pinfo.fbmem = %p\n", inactive->pinfo.fbmem); - dbg("Ensure that both layer opaque\n"); + info("Ensure that both layer opaque\n"); active->layer->setalpha(active->layer, 0xff); inactive->layer->setalpha(inactive->layer, 0xff); active->layer->setblendmode(active->layer, LTDC_BLEND_NONE); inactive->layer->setblendmode(inactive->layer, LTDC_BLEND_NONE); - dbg("Set the active layer to fullscreen black\n"); + info("Set the active layer to fullscreen black\n"); ltdc_drawcolor(&active->vinfo, active->pinfo.fbmem, active->vinfo.xres, active->vinfo.yres, ltdc_color(&active->vinfo, LTDC_BLACK)); usleep(1000000); - dbg("Set invisible layer to fullscreen blue\n"); + info("Set invisible layer to fullscreen blue\n"); ltdc_drawcolor(&inactive->vinfo, inactive->pinfo.fbmem, inactive->vinfo.xres, inactive->vinfo.yres, ltdc_color(&inactive->vinfo, LTDC_BLUE)); usleep(1000000); - dbg("Flip layer to see the blue fullscreen\n"); + info("Flip layer to see the blue fullscreen\n"); inactive->layer->update(inactive->layer, LTDC_UPDATE_FLIP|LTDC_SYNC_VBLANK); @@ -1470,41 +1470,41 @@ static void ltdc_flip_test(void) /* Active layer is now inactive */ - dbg("Set invisible layer to fullscreen green\n"); + info("Set invisible layer to fullscreen green\n"); ltdc_drawcolor(&active->vinfo, active->pinfo.fbmem, active->vinfo.xres, active->vinfo.yres, ltdc_color(&active->vinfo, LTDC_GREEN)); usleep(1000000); - dbg("Flip layer to see the green fullscreen\n"); + info("Flip layer to see the green fullscreen\n"); inactive->layer->update(inactive->layer, LTDC_UPDATE_FLIP|LTDC_SYNC_VBLANK); usleep(1000000); - dbg("Set invisible layer to fullscreen red\n"); + info("Set invisible layer to fullscreen red\n"); ltdc_drawcolor(&inactive->vinfo, inactive->pinfo.fbmem, inactive->vinfo.xres, inactive->vinfo.yres, ltdc_color(&inactive->vinfo, LTDC_RED)); usleep(1000000); - dbg("Flip layer to see the red fullscreen\n"); + info("Flip layer to see the red fullscreen\n"); inactive->layer->update(inactive->layer, LTDC_UPDATE_FLIP|LTDC_SYNC_VBLANK); usleep(1000000); /* Flip with alpha blend */ - dbg("Perform flip test with alpha blending\n"); + info("Perform flip test with alpha blending\n"); /* Set the bottom layer to the current active layer */ active = ltdc_get_surface(LTDC_LAYER_BOTTOM); inactive = ltdc_get_surface(LTDC_LAYER_TOP); - dbg("Ensure that both layer fullscreen black\n"); + info("Ensure that both layer fullscreen black\n"); ltdc_drawcolor(&active->vinfo, active->pinfo.fbmem, active->vinfo.xres, active->vinfo.yres, ltdc_color(&active->vinfo, LTDC_BLACK)); @@ -1512,15 +1512,15 @@ static void ltdc_flip_test(void) inactive->vinfo.xres, inactive->vinfo.yres, ltdc_color(&inactive->vinfo, LTDC_BLACK)); - dbg("Ensure that both layer semitransparent\n"); + info("Ensure that both layer semitransparent\n"); active->layer->setalpha(active->layer, 0x7f); inactive->layer->setalpha(inactive->layer, 0x7f); active->layer->setblendmode(active->layer, LTDC_BLEND_ALPHA); inactive->layer->setblendmode(inactive->layer, LTDC_BLEND_ALPHA); - dbg("Enter in the flip mode sequence\n"); - dbg("Set the bottom layer to the active layer\n"); - dbg("Also update both layer simultaneous\n"); + info("Enter in the flip mode sequence\n"); + info("Set the bottom layer to the active layer\n"); + info("Also update both layer simultaneous\n"); active->layer->update(active->layer,LTDC_UPDATE_ACTIVATE| LTDC_UPDATE_SIM| LTDC_UPDATE_FLIP| @@ -1528,28 +1528,28 @@ static void ltdc_flip_test(void) usleep(1000000); - dbg("Set invisible layer to fullscreen blue\n"); + info("Set invisible layer to fullscreen blue\n"); ltdc_drawcolor(&inactive->vinfo, inactive->pinfo.fbmem, inactive->vinfo.xres, inactive->vinfo.yres, ltdc_color(&inactive->vinfo, LTDC_BLUE)); usleep(1000000); - dbg("Flip layer to see the blue fullscreen\n"); + info("Flip layer to see the blue fullscreen\n"); inactive->layer->update(active->layer, LTDC_UPDATE_FLIP|LTDC_SYNC_VBLANK); usleep(1000000); /* Active layer is top now */ - dbg("Set invisible layer to fullscreen green\n"); + info("Set invisible layer to fullscreen green\n"); ltdc_drawcolor(&active->vinfo, active->pinfo.fbmem, active->vinfo.xres, active->vinfo.yres, ltdc_color(&active->vinfo, LTDC_GREEN)); usleep(1000000); - dbg("Flip layer to see the green fullscreen\n"); + info("Flip layer to see the green fullscreen\n"); inactive->layer->update(active->layer, LTDC_UPDATE_FLIP|LTDC_SYNC_VBLANK); @@ -1557,32 +1557,32 @@ static void ltdc_flip_test(void) /* Active layer is bottom now */ - dbg("Set invisible layer to fullscreen red\n"); + info("Set invisible layer to fullscreen red\n"); ltdc_drawcolor(&inactive->vinfo, inactive->pinfo.fbmem, inactive->vinfo.xres, inactive->vinfo.yres, ltdc_color(&inactive->vinfo, LTDC_RED)); usleep(1000000); - dbg("Flip layer to see the red fullscreen\n"); + info("Flip layer to see the red fullscreen\n"); inactive->layer->update(active->layer, LTDC_UPDATE_FLIP|LTDC_SYNC_VBLANK); usleep(1000000); /* Active layer is top now */ - dbg("Set bottom layer back to fullscreen black\n"); + info("Set bottom layer back to fullscreen black\n"); ltdc_drawcolor(&active->vinfo, active->pinfo.fbmem, active->vinfo.xres, active->vinfo.yres, ltdc_color(&active->vinfo, LTDC_BLACK)); - dbg("Set bottom layer to alpha %d and disable blend mode\n", 0xff); + info("Set bottom layer to alpha %d and disable blend mode\n", 0xff); inactive->layer->setalpha(active->layer, 0xff); inactive->layer->setblendmode(active->layer, LTDC_BLEND_NONE); usleep(1000000); - dbg("Flip layer to see the black fullscreen\n"); + info("Flip layer to see the black fullscreen\n"); inactive->layer->update(active->layer, LTDC_UPDATE_FLIP|LTDC_SYNC_VBLANK); @@ -1596,16 +1596,16 @@ static void ltdc_flip_test(void) /* Restore settings */ - dbg("Finally set the top layer back to fullscreen black\n"); + info("Finally set the top layer back to fullscreen black\n"); ltdc_drawcolor(&inactive->vinfo, inactive->pinfo.fbmem, inactive->vinfo.xres, inactive->vinfo.yres, ltdc_color(&inactive->vinfo, LTDC_BLACK)); - dbg("Set top layer to alpha %d and disable blend mode\n", 0xff); + info("Set top layer to alpha %d and disable blend mode\n", 0xff); inactive->layer->setalpha(inactive->layer, 0xff); inactive->layer->setblendmode(inactive->layer, LTDC_BLEND_NONE); - dbg("Flip to the top layer\n"); + info("Flip to the top layer\n"); inactive->layer->update(inactive->layer, LTDC_UPDATE_ACTIVATE|LTDC_SYNC_VBLANK); @@ -1728,7 +1728,7 @@ FAR struct fb_cmap_s * ltdc_createcmap(uint16_t ncolors) if (!clut) { - dbg("malloc() failed\n"); + err("malloc() failed\n"); free(cmap); return NULL;; } @@ -1805,7 +1805,7 @@ uint32_t ltdc_color(FAR struct fb_videoinfo_s *vinfo, uint8_t color) break; #endif default: - dbg("Unsupported pixel format %d\n", vinfo->fmt); + err("Unsupported pixel format %d\n", vinfo->fmt); value = 0; break; } @@ -1828,8 +1828,8 @@ void ltdc_simple_draw(FAR struct fb_videoinfo_s *vinfo, uint16_t xres = vinfo->xres; uint16_t yres = vinfo->yres; - dbg("draw a red and green rectangle in the upper half\n"); - dbg("draw a white and blue rectangle in the lower half\n"); + info("draw a red and green rectangle in the upper half\n"); + info("draw a white and blue rectangle in the lower half\n"); #if defined(CONFIG_STM32_LTDC_L1_L8) || defined(CONFIG_STM32_LTDC_L2_L8) if (vinfo->fmt == FB_FMT_RGB8) @@ -1982,7 +1982,7 @@ void ltdc_drawcolor(FAR struct fb_videoinfo_s *vinfo, void *buffer, /* draw a blue rectangle */ - dbg("draw a full screen rectangle with color %08x\n", color); + info("draw a full screen rectangle with color %08x\n", color); #if defined(CONFIG_STM32_LTDC_L1_L8) || defined(CONFIG_STM32_LTDC_L2_L8) if (vinfo->fmt == FB_FMT_RGB8) @@ -2059,13 +2059,13 @@ struct surface * ltdc_get_surface(uint32_t mode) if (ret != OK) { - dbg("getlid() failed\n"); + err("getlid() failed\n"); _exit(1); } if (lid < 0 || lid > 1) { - dbg("invalid layer id %d\n", lid); + err("invalid layer id %d\n", lid); _exit(1); } @@ -2086,7 +2086,7 @@ int ltdc_main(int argc, char *argv[]) if (up_fbinitialize(0) < 0) { - dbg("up_fbinitialize() failed\n"); + err("up_fbinitialize() failed\n"); return -1; } @@ -2094,23 +2094,23 @@ int ltdc_main(int argc, char *argv[]) if (!fbtable) { - dbg("up_fbgetvplane() failed\n"); + err("up_fbgetvplane() failed\n"); return -1; } if (fbtable->getvideoinfo(fbtable, &vinfo)<0) { - dbg("getvideoinfo failed\n"); + err("getvideoinfo failed\n"); return -1; } if (fbtable->getplaneinfo(fbtable, 0, &pinfo)<0) { - dbg("getplaneinfo failed\n"); + err("getplaneinfo failed\n"); return -1; } - dbg("fb is configured with: xres = %d, yres = %d, \ + info("fb is configured with: xres = %d, yres = %d, \ fb start address = %p, fb size = %d, fmt = %d, bpp = %d\n", vinfo.xres, vinfo.yres, pinfo.fbmem, pinfo.fblen, vinfo.fmt, pinfo.bpp); @@ -2122,7 +2122,7 @@ int ltdc_main(int argc, char *argv[]) { if (fbtable->putcmap(fbtable, &g_cmap) != OK) { - dbg("putcmap() failed\n"); + err("putcmap() failed\n"); return -1; } } diff --git a/examples/mtdpart/mtdpart_main.c b/examples/mtdpart/mtdpart_main.c index b600875e4..27429ca91 100644 --- a/examples/mtdpart/mtdpart_main.c +++ b/examples/mtdpart/mtdpart_main.c @@ -214,7 +214,7 @@ int mtdpart_main(int argc, char *argv[]) ret = master->ioctl(master, MTDIOC_GEOMETRY, (unsigned long)((uintptr_t)&geo)); if (ret < 0) { - fdbg("ERROR: mtd->ioctl failed: %d\n", ret); + ferr("ERROR: mtd->ioctl failed: %d\n", ret); exit(3); } diff --git a/examples/mtdrwb/mtdrwb_main.c b/examples/mtdrwb/mtdrwb_main.c index 1980f6220..e0a11a644 100644 --- a/examples/mtdrwb/mtdrwb_main.c +++ b/examples/mtdrwb/mtdrwb_main.c @@ -220,7 +220,7 @@ int mtdrwb_main(int argc, char *argv[]) ret = mtdrwb->ioctl(mtdrwb, MTDIOC_GEOMETRY, (unsigned long)((uintptr_t)&geo)); if (ret < 0) { - fdbg("ERROR: mtdrwb->ioctl failed: %d\n", ret); + ferr("ERROR: mtdrwb->ioctl failed: %d\n", ret); exit(5); } diff --git a/examples/nxflat/nxflat_main.c b/examples/nxflat/nxflat_main.c index 0c75ba10f..be4081041 100644 --- a/examples/nxflat/nxflat_main.c +++ b/examples/nxflat/nxflat_main.c @@ -96,22 +96,22 @@ #define ROMFSDEV "/dev/ram0" #define MOUNTPT "/mnt/romfs" -/* If CONFIG_DEBUG_FEATURES is enabled, use dbg instead of printf so that the +/* If CONFIG_DEBUG_FEATURES is enabled, use info/err instead of printf so that the * output will be synchronous with the debug output. */ #ifdef CONFIG_CPP_HAVE_VARARGS # ifdef CONFIG_DEBUG_FEATURES -# define message(format, ...) dbg(format, ##__VA_ARGS__) -# define errmsg(format, ...) dbg(format, ##__VA_ARGS__) +# define message(format, ...) info(format, ##__VA_ARGS__) +# define errmsg(format, ...) err(format, ##__VA_ARGS__) # else # define message(format, ...) printf(format, ##__VA_ARGS__) # define errmsg(format, ...) fprintf(stderr, format, ##__VA_ARGS__) # endif #else # ifdef CONFIG_DEBUG_FEATURES -# define message dbg -# define errmsg dbg +# define message info +# define errmsg err # else # define message printf # define errmsg printf diff --git a/examples/nxterm/nxterm_toolbar.c b/examples/nxterm/nxterm_toolbar.c index cfa9a6706..c927c88c9 100644 --- a/examples/nxterm/nxterm_toolbar.c +++ b/examples/nxterm/nxterm_toolbar.c @@ -125,7 +125,7 @@ static void nxtool_redraw(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect, ret = nxtk_filltoolbar(hwnd, rect, color); if (ret < 0) { - gdbg("nxtk_filltoolbar failed: %d\n", errno); + gerr("nxtk_filltoolbar failed: %d\n", errno); } } diff --git a/examples/pca9635/pca9635_main.c b/examples/pca9635/pca9635_main.c index 664a22a8b..7584fdb0e 100644 --- a/examples/pca9635/pca9635_main.c +++ b/examples/pca9635/pca9635_main.c @@ -98,7 +98,7 @@ int pca9635_main(int argc, char *argv[]) ret = ioctl(fd, PWMIOC_SETLED_BRIGHTNESS, (unsigned long)&ledbright); if (ret < 0) { - dbg("ERROR: ioctl(PWMIOC_SETLED_BRIGHTNESS) failed: %d\n", errno); + err("ERROR: ioctl(PWMIOC_SETLED_BRIGHTNESS) failed: %d\n", errno); } } diff --git a/examples/posix_spawn/spawn_main.c b/examples/posix_spawn/spawn_main.c index 1480f21bf..577a4793c 100644 --- a/examples/posix_spawn/spawn_main.c +++ b/examples/posix_spawn/spawn_main.c @@ -103,22 +103,22 @@ # define CONFIG_EXAMPLES_ELF_DEVPATH "/dev/ram0" #endif -/* If CONFIG_DEBUG_FEATURES is enabled, use dbg instead of printf so that the +/* If CONFIG_DEBUG_FEATURES is enabled, use info/err instead of printf so that the * output will be synchronous with the debug output. */ #ifdef CONFIG_CPP_HAVE_VARARGS # ifdef CONFIG_DEBUG_FEATURES -# define message(format, ...) dbg(format, ##__VA_ARGS__) -# define errmsg(format, ...) dbg(format, ##__VA_ARGS__) +# define message(format, ...) info(format, ##__VA_ARGS__) +# define errmsg(format, ...) err(format, ##__VA_ARGS__) # else # define message(format, ...) printf(format, ##__VA_ARGS__) # define errmsg(format, ...) fprintf(stderr, format, ##__VA_ARGS__) # endif #else # ifdef CONFIG_DEBUG_FEATURES -# define message dbg -# define errmsg dbg +# define message info +# define errmsg err # else # define message printf # define errmsg printf diff --git a/examples/tcpecho/tcpecho_main.c b/examples/tcpecho/tcpecho_main.c index 49f2e2bad..1b43650ed 100644 --- a/examples/tcpecho/tcpecho_main.c +++ b/examples/tcpecho/tcpecho_main.c @@ -224,7 +224,7 @@ static int tcpecho_server(void) return ERROR; } - ndbg("start listening on port: %d\n", CONFIG_EXAMPLES_TCPECHO_PORT); + nerr("start listening on port: %d\n", CONFIG_EXAMPLES_TCPECHO_PORT); ret = listen(listenfd, CONFIG_EXAMPLES_TCPECHO_BACKLOG); if (ret < 0) @@ -253,7 +253,7 @@ static int tcpecho_server(void) clilen = sizeof(cliaddr); connfd = accept(listenfd, (struct sockaddr*)&cliaddr, &clilen); - ndbg("new client: %s\n", inet_ntoa(cliaddr.sin_addr)); + nerr("new client: %s\n", inet_ntoa(cliaddr.sin_addr)); for (i = 1; i < CONFIG_EXAMPLES_TCPECHO_NCONN; i++) { @@ -299,7 +299,7 @@ static int tcpecho_server(void) { /* connection reset by client */ - ndbg("client[%d] aborted connection\n", i); + nerr("client[%d] aborted connection\n", i); close(sockfd); client[i].fd = -1; @@ -315,7 +315,7 @@ static int tcpecho_server(void) { /* connection closed by client */ - ndbg("client[%d] closed connection\n", i); + nerr("client[%d] closed connection\n", i); close(sockfd); client[i].fd = -1; @@ -324,7 +324,7 @@ static int tcpecho_server(void) { if (strcmp(buf, "exit\r\n") == 0) { - ndbg("client[%d] closed connection\n", i); + nerr("client[%d] closed connection\n", i); close(sockfd); client[i].fd = -1; } diff --git a/examples/xmlrpc/xmlrpc_main.c b/examples/xmlrpc/xmlrpc_main.c index 5d9d92056..9ce8cff91 100644 --- a/examples/xmlrpc/xmlrpc_main.c +++ b/examples/xmlrpc/xmlrpc_main.c @@ -193,16 +193,16 @@ static void xmlrpc_handler(int fd) tv.tv_sec = 1; tv.tv_usec = 0; - ndbg("[%d] select...\n", fd); + nerr("[%d] select...\n", fd); ret = select(fd + 1, &rfds, NULL, NULL, &tv); - ndbg("[%d] data ready\n", fd); + nerr("[%d] data ready\n", fd); if (ret > 0) { if (FD_ISSET(fd, &rfds)) { len = recv(fd, &buffer[max], 1024, 0); - ndbg("[%d] %d bytes received\n", fd, len); + nerr("[%d] %d bytes received\n", fd, len); if (len > 0) { @@ -225,7 +225,7 @@ static void xmlrpc_handler(int fd) { /* Timeout... */ - ndbg("[%d] timeout\n", fd); + nerr("[%d] timeout\n", fd); ret = -1; break; } @@ -378,7 +378,7 @@ int xmlrpc_main(int argc, char *argv[]) if (xmlrpc_netinit() < 0) { - ndbg("Could not initialize the network interface\n"); + nerr("Could not initialize the network interface\n"); return ERROR; } @@ -407,11 +407,11 @@ int xmlrpc_main(int argc, char *argv[]) { break; } - ndbg("Connection accepted: %d\n", connfd); + nerr("Connection accepted: %d\n", connfd); xmlrpc_handler(connfd); close(connfd); - ndbg("[%d] connection closed\n", connfd); + nerr("[%d] connection closed\n", connfd); } close(listenfd); diff --git a/fsutils/flash_eraseall/flash_eraseall.c b/fsutils/flash_eraseall/flash_eraseall.c index 9deb0570b..9bec822ff 100644 --- a/fsutils/flash_eraseall/flash_eraseall.c +++ b/fsutils/flash_eraseall/flash_eraseall.c @@ -73,7 +73,7 @@ int flash_eraseall(FAR const char *driver) if (fd < 0) { errcode = errno; - fdbg("ERROR: Failed to open '%s': %d\n", driver, errcode); + ferr("ERROR: Failed to open '%s': %d\n", driver, errcode); ret = -errcode; } else @@ -84,7 +84,7 @@ int flash_eraseall(FAR const char *driver) if (ret < 0) { errcode = errno; - fdbg("ERROR: MTD ioctl(%04x) failed: %d\n", MTDIOC_BULKERASE, errcode); + ferr("ERROR: MTD ioctl(%04x) failed: %d\n", MTDIOC_BULKERASE, errcode); ret = -errcode; } diff --git a/graphics/tiff/tiff_initialize.c b/graphics/tiff/tiff_initialize.c index f3757ae8a..a5ad3f6af 100644 --- a/graphics/tiff/tiff_initialize.c +++ b/graphics/tiff/tiff_initialize.c @@ -415,7 +415,7 @@ static int tiff_datetime(FAR char *timbuf, unsigned int buflen) ret = clock_gettime(CLOCK_REALTIME, &ts); if (ret < 0) { - gdbg("clock_gettime failed: %d\n", errno); + gerr("clock_gettime failed: %d\n", errno); return ERROR; } @@ -463,21 +463,21 @@ int tiff_initialize(FAR struct tiff_info_s *info) info->outfd = open(info->outfile, O_RDWR|O_CREAT|O_TRUNC, 0666); if (info->outfd < 0) { - gdbg("Failed to open %s for reading/writing: %d\n", info->outfile, errno); + gerr("Failed to open %s for reading/writing: %d\n", info->outfile, errno); goto errout; } info->tmp1fd = open(info->tmpfile1, O_RDWR|O_CREAT|O_TRUNC, 0666); if (info->tmp1fd < 0) { - gdbg("Failed to open %s for reading/writing: %d\n", info->tmpfile1, errno); + gerr("Failed to open %s for reading/writing: %d\n", info->tmpfile1, errno); goto errout; } info->tmp2fd = open(info->tmpfile2, O_RDWR|O_CREAT|O_TRUNC, 0666); if (info->tmp2fd < 0) { - gdbg("Failed to open %s for reading/writing: %d\n", info->tmpfile2, errno); + gerr("Failed to open %s for reading/writing: %d\n", info->tmpfile2, errno); goto errout; } @@ -519,7 +519,7 @@ int tiff_initialize(FAR struct tiff_info_s *info) break; default: - gdbg("Unsupported color format: %d\n", info->colorfmt); + gerr("Unsupported color format: %d\n", info->colorfmt); return -EINVAL; } diff --git a/netutils/dhcpc/dhcpc.c b/netutils/dhcpc/dhcpc.c index 5ce8c0209..b8c0c280f 100644 --- a/netutils/dhcpc/dhcpc.c +++ b/netutils/dhcpc/dhcpc.c @@ -353,7 +353,7 @@ void *dhcpc_open(const void *macaddr, int maclen) struct timeval tv; int ret; - ndbg("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", + nerr("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", ((uint8_t*)macaddr)[0], ((uint8_t*)macaddr)[1], ((uint8_t*)macaddr)[2], ((uint8_t*)macaddr)[3], ((uint8_t*)macaddr)[4], ((uint8_t*)macaddr)[5]); @@ -469,7 +469,7 @@ int dhcpc_request(void *handle, struct dhcpc_state *presult) { /* Send the DISCOVER command */ - ndbg("Broadcast DISCOVER\n"); + nerr("Broadcast DISCOVER\n"); if (dhcpc_sendmsg(pdhcpc, presult, DHCPDISCOVER) < 0) { return ERROR; @@ -487,7 +487,7 @@ int dhcpc_request(void *handle, struct dhcpc_state *presult) * by a new OFFER. */ - ndbg("Received OFFER from %08x\n", ntohl(presult->serverid.s_addr)); + nerr("Received OFFER from %08x\n", ntohl(presult->serverid.s_addr)); pdhcpc->ipaddr.s_addr = presult->ipaddr.s_addr; pdhcpc->serverid.s_addr = presult->serverid.s_addr; @@ -522,7 +522,7 @@ int dhcpc_request(void *handle, struct dhcpc_state *presult) { /* Send the REQUEST message to obtain the lease that was offered to us. */ - ndbg("Send REQUEST\n"); + nerr("Send REQUEST\n"); if (dhcpc_sendmsg(pdhcpc, presult, DHCPREQUEST) < 0) { return ERROR; @@ -544,7 +544,7 @@ int dhcpc_request(void *handle, struct dhcpc_state *presult) if (msgtype == DHCPACK) { - ndbg("Received ACK\n"); + nerr("Received ACK\n"); state = STATE_HAVE_LEASE; } @@ -554,7 +554,7 @@ int dhcpc_request(void *handle, struct dhcpc_state *presult) else if (msgtype == DHCPNAK) { - ndbg("Received NAK\n"); + nerr("Received NAK\n"); break; } @@ -565,7 +565,7 @@ int dhcpc_request(void *handle, struct dhcpc_state *presult) else if (msgtype == DHCPOFFER) { - ndbg("Received another OFFER, send DECLINE\n"); + nerr("Received another OFFER, send DECLINE\n"); (void)dhcpc_sendmsg(pdhcpc, presult, DHCPDECLINE); } @@ -573,7 +573,7 @@ int dhcpc_request(void *handle, struct dhcpc_state *presult) else { - ndbg("Ignoring msgtype=%d\n", msgtype); + nerr("Ignoring msgtype=%d\n", msgtype); } } @@ -595,26 +595,26 @@ int dhcpc_request(void *handle, struct dhcpc_state *presult) } while (state != STATE_HAVE_LEASE); - ndbg("Got IP address %d.%d.%d.%d\n", + nerr("Got IP address %d.%d.%d.%d\n", (presult->ipaddr.s_addr ) & 0xff, (presult->ipaddr.s_addr >> 8 ) & 0xff, (presult->ipaddr.s_addr >> 16 ) & 0xff, (presult->ipaddr.s_addr >> 24 ) & 0xff); - ndbg("Got netmask %d.%d.%d.%d\n", + nerr("Got netmask %d.%d.%d.%d\n", (presult->netmask.s_addr ) & 0xff, (presult->netmask.s_addr >> 8 ) & 0xff, (presult->netmask.s_addr >> 16 ) & 0xff, (presult->netmask.s_addr >> 24 ) & 0xff); - ndbg("Got DNS server %d.%d.%d.%d\n", + nerr("Got DNS server %d.%d.%d.%d\n", (presult->dnsaddr.s_addr ) & 0xff, (presult->dnsaddr.s_addr >> 8 ) & 0xff, (presult->dnsaddr.s_addr >> 16 ) & 0xff, (presult->dnsaddr.s_addr >> 24 ) & 0xff); - ndbg("Got default router %d.%d.%d.%d\n", + nerr("Got default router %d.%d.%d.%d\n", (presult->default_router.s_addr ) & 0xff, (presult->default_router.s_addr >> 8 ) & 0xff, (presult->default_router.s_addr >> 16 ) & 0xff, (presult->default_router.s_addr >> 24 ) & 0xff); - ndbg("Lease expires in %d seconds\n", presult->lease_time); + nerr("Lease expires in %d seconds\n", presult->lease_time); return OK; } diff --git a/netutils/dhcpd/dhcpd.c b/netutils/dhcpd/dhcpd.c index ab9dc631d..3dd3fbf27 100644 --- a/netutils/dhcpd/dhcpd.c +++ b/netutils/dhcpd/dhcpd.c @@ -46,14 +46,14 @@ # define CONFIG_CPP_HAVE_WARNING 1 # define FAR -# define ndbg(...) printf(__VA_ARGS__) +# define nerr(...) printf(__VA_ARGS__) # define ninfo(...) printf(__VA_ARGS__) # define ERROR (-1) # define OK (0) #else # include /* NuttX configuration */ -# include /* For ndbg, info */ +# include /* For nerr, info */ # include /* For CONFIG_CPP_HAVE_WARNING */ # include /* Advertised DHCPD APIs */ #endif @@ -495,7 +495,7 @@ static inline bool dhcpd_parseoptions(void) { /* Bad magic number... skip g_state.ds_outpacket */ - ndbg("Bad magic: %d,%d,%d,%d\n", ptr[0], ptr[1], ptr[2], ptr[3]); + nerr("Bad magic: %d,%d,%d,%d\n", ptr[0], ptr[1], ptr[2], ptr[3]); return false; } @@ -798,7 +798,7 @@ static inline int dhcpd_socket(void) sockfd = socket(PF_INET, SOCK_DGRAM, 0); if (sockfd < 0) { - ndbg("socket failed: %d\n", errno); + nerr("socket failed: %d\n", errno); return ERROR; } @@ -809,7 +809,7 @@ static inline int dhcpd_socket(void) ret = setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, (void*)&optval, sizeof(int)); if (ret < 0) { - ndbg("setsockopt SO_REUSEADDR failed: %d\n", errno); + nerr("setsockopt SO_REUSEADDR failed: %d\n", errno); close(sockfd); return ERROR; } @@ -820,7 +820,7 @@ static inline int dhcpd_socket(void) ret = setsockopt(sockfd, SOL_SOCKET, SO_BROADCAST, (void*)&optval, sizeof(int)); if (ret < 0) { - ndbg("setsockopt SO_BROADCAST failed: %d\n", errno); + nerr("setsockopt SO_BROADCAST failed: %d\n", errno); close(sockfd); return ERROR; } @@ -847,7 +847,7 @@ static inline int dhcpd_openresponder(void) sockfd = dhcpd_socket(); if (sockfd < 0) { - ndbg("socket failed: %d\n", errno); + nerr("socket failed: %d\n", errno); return ERROR; } @@ -860,7 +860,7 @@ static inline int dhcpd_openresponder(void) ret = bind(sockfd, (struct sockaddr *)&addr, sizeof(struct sockaddr_in)); if (ret < 0) { - ndbg("bind failed, port=%d addr=%08lx: %d\n", + nerr("bind failed, port=%d addr=%08lx: %d\n", addr.sin_port, (long)addr.sin_addr.s_addr, errno); close(sockfd); return ERROR; @@ -1159,7 +1159,7 @@ static inline int dhcpd_discover(void) { /* Nope... return failure */ - ndbg("Failed to get IP address\n"); + nerr("Failed to get IP address\n"); return ERROR; } @@ -1167,7 +1167,7 @@ static inline int dhcpd_discover(void) if (!dhcpd_setlease(g_state.ds_inpacket.chaddr, ipaddr, CONFIG_NETUTILS_DHCPD_OFFERTIME)) { - ndbg("Failed to set lease\n"); + nerr("Failed to set lease\n"); return ERROR; } @@ -1380,7 +1380,7 @@ static inline int dhcpd_openlistener(void) sockfd = dhcpd_socket(); if (sockfd < 0) { - ndbg("socket failed: %d\n", errno); + nerr("socket failed: %d\n", errno); return ERROR; } @@ -1390,7 +1390,7 @@ static inline int dhcpd_openlistener(void) ret = ioctl(sockfd, SIOCGIFADDR, (unsigned long)&req); if (ret < 0) { - ndbg("setsockopt SIOCGIFADDR failed: %d\n", errno); + nerr("setsockopt SIOCGIFADDR failed: %d\n", errno); close(sockfd); return ERROR; } @@ -1409,7 +1409,7 @@ static inline int dhcpd_openlistener(void) ret = bind(sockfd, (struct sockaddr *)&addr, sizeof(struct sockaddr_in)); if (ret < 0) { - ndbg("bind failed, port=%d addr=%08lx: %d\n", + nerr("bind failed, port=%d addr=%08lx: %d\n", addr.sin_port, (long)addr.sin_addr.s_addr, errno); close(sockfd); return ERROR; @@ -1449,7 +1449,7 @@ int dhcpd_run(void) sockfd = dhcpd_openlistener(); if (sockfd < 0) { - ndbg("Failed to create socket\n"); + nerr("Failed to create socket\n"); break; } } @@ -1461,7 +1461,7 @@ int dhcpd_run(void) { /* On errors (other EINTR), close the socket and try again */ - ndbg("recv failed: %d\n", errno); + nerr("recv failed: %d\n", errno); if (errno != EINTR) { close(sockfd); @@ -1476,7 +1476,7 @@ int dhcpd_run(void) { /* Failed to parse the message options */ - ndbg("No msg type\n"); + nerr("No msg type\n"); continue; } @@ -1512,7 +1512,7 @@ int dhcpd_run(void) case DHCPINFORM: /* Not supported */ default: - ndbg("Unsupported message type: %d\n", g_state.ds_optmsgtype); + nerr("Unsupported message type: %d\n", g_state.ds_optmsgtype); break; } } diff --git a/netutils/discover/discover.c b/netutils/discover/discover.c index 4ccd43ae3..1502b830d 100644 --- a/netutils/discover/discover.c +++ b/netutils/discover/discover.c @@ -196,7 +196,7 @@ static int discover_daemon(int argc, char *argv[]) sockfd = discover_openlistener(); if (sockfd < 0) { - ndbg("Failed to create socket\n"); + nerr("Failed to create socket\n"); break; } } @@ -210,7 +210,7 @@ static int discover_daemon(int argc, char *argv[]) { /* On errors (other EINTR), close the socket and try again */ - ndbg("recv failed: %d\n", errno); + nerr("recv failed: %d\n", errno); if (errno != EINTR) { close(sockfd); @@ -224,7 +224,7 @@ static int discover_daemon(int argc, char *argv[]) continue; } - ndbg("Received discover from %08lx'\n", srcaddr.sin_addr.s_addr); + nerr("Received discover from %08lx'\n", srcaddr.sin_addr.s_addr); discover_respond(&srcaddr.sin_addr.s_addr); } @@ -239,13 +239,13 @@ static inline int discover_parse(request_t packet) if (packet[0] != DISCOVER_PROTO_ID) { - ndbg("Wrong protocol id: %d\n", packet[0]); + nerr("Wrong protocol id: %d\n", packet[0]); return ERROR; } if (packet[1] != DISCOVER_REQUEST) { - ndbg("Wrong command: %d\n", packet[1]); + nerr("Wrong command: %d\n", packet[1]); return ERROR; } @@ -256,7 +256,7 @@ static inline int discover_parse(request_t packet) if ((chk & 0xff) != packet[3]) { - ndbg("Checksum does not match: %d\n", packet[3]); + nerr("Checksum does not match: %d\n", packet[3]); return ERROR; } else @@ -276,7 +276,7 @@ static inline int discover_respond(in_addr_t *ipaddr) sockfd = discover_openresponder(); if (sockfd < 0) { - ndbg("discover_openresponder failed\n"); + nerr("discover_openresponder failed\n"); return ERROR; } @@ -291,7 +291,7 @@ static inline int discover_respond(in_addr_t *ipaddr) (struct sockaddr *)&addr, sizeof(struct sockaddr_in)); if (ret < 0) { - ndbg("Could not send discovery response: %d\n", errno); + nerr("Could not send discovery response: %d\n", errno); } close(sockfd); @@ -311,7 +311,7 @@ static inline int discover_socket() sockfd = socket(PF_INET, SOCK_DGRAM, 0); if (sockfd < 0) { - ndbg("socket failed: %d\n", errno); + nerr("socket failed: %d\n", errno); return ERROR; } @@ -322,7 +322,7 @@ static inline int discover_socket() ret = setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, (void*)&optval, sizeof(int)); if (ret < 0) { - ndbg("setsockopt SO_REUSEADDR failed: %d\n", errno); + nerr("setsockopt SO_REUSEADDR failed: %d\n", errno); close(sockfd); return ERROR; } @@ -333,7 +333,7 @@ static inline int discover_socket() ret = setsockopt(sockfd, SOL_SOCKET, SO_BROADCAST, (void*)&optval, sizeof(int)); if (ret < 0) { - ndbg("setsockopt SO_BROADCAST failed: %d\n", errno); + nerr("setsockopt SO_BROADCAST failed: %d\n", errno); close(sockfd); return ERROR; } @@ -354,7 +354,7 @@ static inline int discover_openlistener() sockfd = discover_socket(); if (sockfd < 0) { - ndbg("socket failed: %d\n", errno); + nerr("socket failed: %d\n", errno); return ERROR; } @@ -364,7 +364,7 @@ static inline int discover_openlistener() ret = ioctl(sockfd, SIOCGIFADDR, (unsigned long)&req); if (ret < 0) { - ndbg("setsockopt SIOCGIFADDR failed: %d\n", errno); + nerr("setsockopt SIOCGIFADDR failed: %d\n", errno); close(sockfd); return ERROR; } @@ -382,7 +382,7 @@ static inline int discover_openlistener() ret = bind(sockfd, (struct sockaddr *)&addr, sizeof(struct sockaddr_in)); if (ret < 0) { - ndbg("bind failed, port=%d addr=%08lx: %d\n", + nerr("bind failed, port=%d addr=%08lx: %d\n", addr.sin_port, (long)addr.sin_addr.s_addr, errno); close(sockfd); return ERROR; @@ -402,7 +402,7 @@ static inline int discover_openresponder(void) sockfd = discover_socket(); if (sockfd < 0) { - ndbg("socket failed: %d\n", errno); + nerr("socket failed: %d\n", errno); return ERROR; } @@ -415,7 +415,7 @@ static inline int discover_openresponder(void) ret = bind(sockfd, (struct sockaddr *)&addr, sizeof(struct sockaddr_in)); if (ret < 0) { - ndbg("bind failed, port=%d addr=%08lx: %d\n", + nerr("bind failed, port=%d addr=%08lx: %d\n", addr.sin_port, (long)addr.sin_addr.s_addr, errno); close(sockfd); return ERROR; @@ -457,7 +457,7 @@ int discover_start(struct discover_info_s *info) if (pid < 0) { int errval = errno; - ndbg("Failed to start the discover daemon: %d\n", errval); + nerr("Failed to start the discover daemon: %d\n", errval); return -errval; } diff --git a/netutils/esp8266/esp8266.c b/netutils/esp8266/esp8266.c index 3eb6aa5e1..9b9976f95 100644 --- a/netutils/esp8266/esp8266.c +++ b/netutils/esp8266/esp8266.c @@ -182,20 +182,20 @@ static int lesp_set_baudrate(int baudrate) if (ioctl(g_lesp_state.fd,TCGETS,(unsigned long)&term) < 0) { - ndbg("TCGETS failed.\n"); + nerr("TCGETS failed.\n"); return -1; } if ((cfsetispeed(&term, baudrate) < 0) || (cfsetospeed(&term, baudrate) < 0)) { - ndbg("Connot set baudrate %0x08X\n",baudrate); + nerr("Connot set baudrate %0x08X\n",baudrate); return -1; } if (ioctl(g_lesp_state.fd,TCSETS,(unsigned long)&term) < 0) { - ndbg("TCSETS failed.\n"); + nerr("TCSETS failed.\n"); return -1; } @@ -233,7 +233,7 @@ static lesp_socket_t *get_sock(int sockfd) if ((g_lesp_state.sockets[sockfd].flags & FLAGS_SOCK_USED) == 0) { - ndbg("Connection id %d not Created!\n", sockfd); + nerr("Connection id %d not Created!\n", sockfd); return NULL; } @@ -271,12 +271,12 @@ static int lesp_low_level_read(uint8_t* buf, int size) if (ret < 0) { int errcode = errno; - ndbg("worker read Error %d (errno %d)\n", ret, errcode); + nerr("worker read Error %d (errno %d)\n", ret, errcode); UNUSED(errcode); } else if ((fds[0].revents & POLLERR) && (fds[0].revents & POLLHUP)) { - ndbg("worker poll read Error %d\n", ret); + nerr("worker poll read Error %d\n", ret); ret = -1; } else if (fds[0].revents & POLLIN) @@ -790,7 +790,7 @@ static void *lesp_worker(void *args) if (ret < 0) { - ndbg("worker read data Error %d\n", ret); + nerr("worker read data Error %d\n", ret); } else if (ret > 0) { @@ -850,7 +850,7 @@ static inline int lesp_create_worker(int priority) if (ret < 0) { - ndbg("Cannot Set scheduler parameter thread (%d)\n", ret); + nerr("Cannot Set scheduler parameter thread (%d)\n", ret); } else { @@ -862,7 +862,7 @@ static inline int lesp_create_worker(int priority) } else { - ndbg("Cannot Get/Set scheduler parameter thread (%d)\n", ret); + nerr("Cannot Get/Set scheduler parameter thread (%d)\n", ret); } g_lesp_state.worker.running = true; @@ -871,13 +871,13 @@ static inline int lesp_create_worker(int priority) (ret < 0)?NULL:&thread_attr, lesp_worker, NULL); if (ret < 0) { - ndbg("Cannot Create thread return (%d)\n", ret); + nerr("Cannot Create thread return (%d)\n", ret); g_lesp_state.worker.running = false; } if (pthread_attr_destroy(&thread_attr) < 0) { - ndbg("Cannot destroy thread attribute (%d)\n", ret); + nerr("Cannot destroy thread attribute (%d)\n", ret); } } @@ -919,14 +919,14 @@ int lesp_initialize(void) if (g_lesp_state.fd < 0) { - ndbg("Cannot open %s\n", CONFIG_NETUTILS_ESP8266_DEV_PATH); + nerr("Cannot open %s\n", CONFIG_NETUTILS_ESP8266_DEV_PATH); ret = -1; } #ifdef CONFIG_SERIAL_TERMIOS if (ret >= 0 && lesp_set_baudrate(CONFIG_NETUTILS_ESP8266_BAUDRATE) < 0) { - ndbg("Cannot set baud rate %d\n", CONFIG_NETUTILS_ESP8266_BAUDRATE); + nerr("Cannot set baud rate %d\n", CONFIG_NETUTILS_ESP8266_BAUDRATE); ret = -1; } #endif @@ -1020,7 +1020,7 @@ int lesp_ap_connect(const char* ssid_name, const char* ap_key, int timeout_s) if (! g_lesp_state.is_initialized) { - ndbg("ESP8266 not initialized; can't run manual connect\n"); + nerr("ESP8266 not initialized; can't run manual connect\n"); ret = -1; } else @@ -1167,7 +1167,7 @@ int lesp_list_access_points(lesp_cb_t cb) ret = lesp_parse_cwlap_ans_line(g_lesp_state.bufans,&ap); if (ret < 0) { - ndbg("Line badly formed."); + nerr("Line badly formed."); } cb(&ap); @@ -1210,7 +1210,7 @@ int lesp_socket(int domain, int type, int protocol) if ((domain != PF_INET) && (type != SOCK_STREAM) && (IPPROTO_TCP)) { - ndbg("Not Implemented!\n"); + nerr("Not Implemented!\n"); return -1; } @@ -1272,7 +1272,7 @@ int lesp_closesocket(int sockfd) int lesp_bind(int sockfd, FAR const struct sockaddr *addr, socklen_t addrlen) { - ndbg("Not implemented %s\n", __func__); + nerr("Not implemented %s\n", __func__); return -1; } @@ -1322,13 +1322,13 @@ int lesp_connect(int sockfd, FAR const struct sockaddr *addr, socklen_t addrlen) int lesp_listen(int sockfd, int backlog) { - ndbg("Not implemented %s\n", __func__); + nerr("Not implemented %s\n", __func__); return -1; } int lesp_accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen) { - ndbg("Not implemented %s\n", __func__); + nerr("Not implemented %s\n", __func__); return -1; } @@ -1385,7 +1385,7 @@ ssize_t lesp_send(int sockfd, FAR const uint8_t *buf, size_t len, int flags) if (ret < 0) { - ndbg("Cannot send in socket %d, %d bytes\n", sockfd, len); + nerr("Cannot send in socket %d, %d bytes\n", sockfd, len); return -1; } @@ -1475,28 +1475,28 @@ ssize_t lesp_recv(int sockfd, FAR uint8_t *buf, size_t len, int flags) int lesp_setsockopt(int sockfd, int level, int option, FAR const void *value, socklen_t value_len) { - ndbg("Not implemented %s\n", __func__); + nerr("Not implemented %s\n", __func__); return -1; } int lesp_getsockopt(int sockfd, int level, int option, FAR void *value, FAR socklen_t *value_len) { - ndbg("Not implemented %s\n", __func__); + nerr("Not implemented %s\n", __func__); return -1; } int lesp_gethostbyname(char *hostname, uint16_t usNameLen, unsigned long *out_ip_addr) { - ndbg("Not implemented %s\n", __func__); + nerr("Not implemented %s\n", __func__); return -1; } int lesp_mdnsadvertiser(uint16_t mdnsEnabled, char *deviceServiceName, uint16_t deviceServiceNameLength) { - ndbg("Not implemented %s\n", __func__); + nerr("Not implemented %s\n", __func__); return -1; } diff --git a/netutils/ftpc/ftpc_chmod.c b/netutils/ftpc/ftpc_chmod.c index ea84c66de..183c6dced 100644 --- a/netutils/ftpc/ftpc_chmod.c +++ b/netutils/ftpc/ftpc_chmod.c @@ -99,7 +99,7 @@ int ftpc_chmod(SESSION handle, FAR const char *path, FAR const char *mode) } else { - ndbg("Server does not support SITE CHMOD\n"); + nerr("Server does not support SITE CHMOD\n"); } return ERROR; diff --git a/netutils/ftpc/ftpc_cmd.c b/netutils/ftpc/ftpc_cmd.c index 11fc90152..5a99b4662 100644 --- a/netutils/ftpc/ftpc_cmd.c +++ b/netutils/ftpc/ftpc_cmd.c @@ -136,7 +136,7 @@ int ftpc_cmd(struct ftpc_session_s *session, const char *cmd, ...) if (!ftpc_sockconnected(&session->cmd)) { - ndbg("Cmd channel si not connected\n"); + nerr("Cmd channel si not connected\n"); goto errout; } @@ -164,7 +164,7 @@ int ftpc_cmd(struct ftpc_session_s *session, const char *cmd, ...) if (ret < 0) { - ndbg("Error sending cmd %s: %d\n", cmd, errno); + nerr("Error sending cmd %s: %d\n", cmd, errno); goto errout; } @@ -173,7 +173,7 @@ int ftpc_cmd(struct ftpc_session_s *session, const char *cmd, ...) ret = fptc_getreply(session); if (ret < 0) { - ndbg("Error getting reply: %d\n", errno); + nerr("Error getting reply: %d\n", errno); goto errout; } @@ -183,7 +183,7 @@ int ftpc_cmd(struct ftpc_session_s *session, const char *cmd, ...) { /* Server is closing the control connection. */ - ndbg("Server closed control connection\n"); + nerr("Server closed control connection\n"); /* If we were previously logged in and this is not a QUIT commnad * then attempt to automatically reconnect to the server. @@ -196,7 +196,7 @@ int ftpc_cmd(struct ftpc_session_s *session, const char *cmd, ...) if (reconnect) { - ndbg("Reconnect failed\n"); + nerr("Reconnect failed\n"); goto errout; } else @@ -205,12 +205,12 @@ int ftpc_cmd(struct ftpc_session_s *session, const char *cmd, ...) * continue the loop and try to send the command again. */ - ndbg("Reconnecting...\n"); + nerr("Reconnecting...\n"); reconnect = true; ret = ftpc_restore(); if (ret < 0) { - ndbg("Failed to restore the connection"); + nerr("Failed to restore the connection"); goto errout; } continue; diff --git a/netutils/ftpc/ftpc_connect.c b/netutils/ftpc/ftpc_connect.c index 95abcc1f3..ab8b9b479 100644 --- a/netutils/ftpc/ftpc_connect.c +++ b/netutils/ftpc/ftpc_connect.c @@ -93,7 +93,7 @@ SESSION ftpc_connect(FAR struct ftpc_connect_s *server) session = (struct ftpc_session_s *)zalloc(sizeof(struct ftpc_session_s)); if (!session) { - ndbg("Failed to allocate a session\n"); + nerr("Failed to allocate a session\n"); set_errno(ENOMEM); goto errout; } @@ -136,7 +136,7 @@ SESSION ftpc_connect(FAR struct ftpc_connect_s *server) ret = ftpc_reconnect(session); if (ret != OK) { - ndbg("ftpc_reconnect() failed: %d\n", errno); + nerr("ftpc_reconnect() failed: %d\n", errno); goto errout_with_alloc; } @@ -175,7 +175,7 @@ int ftpc_reconnect(FAR struct ftpc_session_s *session) ret = wd_start(session->wdog, session->conntimeo, ftpc_timeout, 1, session); if (ret != OK) { - ndbg("wd_start() failed\n"); + nerr("wd_start() failed\n"); goto errout; } @@ -184,7 +184,7 @@ int ftpc_reconnect(FAR struct ftpc_session_s *session) ret = ftpc_sockinit(&session->cmd); if (ret != OK) { - ndbg("ftpc_sockinit() failed: %d\n", errno); + nerr("ftpc_sockinit() failed: %d\n", errno); goto errout; } @@ -192,7 +192,7 @@ int ftpc_reconnect(FAR struct ftpc_session_s *session) #ifdef CONFIG_DEBUG_FEATURES tmp = inet_ntoa(session->addr); - ndbg("Connecting to server address %s:%d\n", tmp, ntohs(session->port)); + nerr("Connecting to server address %s:%d\n", tmp, ntohs(session->port)); #endif addr.sin_family = AF_INET; @@ -202,7 +202,7 @@ int ftpc_reconnect(FAR struct ftpc_session_s *session) ret = ftpc_sockconnect(&session->cmd, &addr); if (ret != OK) { - ndbg("ftpc_sockconnect() failed: %d\n", errno); + nerr("ftpc_sockconnect() failed: %d\n", errno); goto errout_with_socket; } @@ -237,11 +237,11 @@ int ftpc_reconnect(FAR struct ftpc_session_s *session) } #ifdef CONFIG_DEBUG_FEATURES - ndbg("Connected\n"); + nerr("Connected\n"); tmp = inet_ntoa(addr.sin_addr); - ndbg(" Remote address: %s:%d\n", tmp, ntohs(addr.sin_port)); + nerr(" Remote address: %s:%d\n", tmp, ntohs(addr.sin_port)); tmp = inet_ntoa(session->cmd.laddr.sin_addr); - ndbg(" Local address: %s:%d\n", tmp, ntohs(session->cmd.laddr.sin_port)); + nerr(" Local address: %s:%d\n", tmp, ntohs(session->cmd.laddr.sin_port)); #endif return OK; diff --git a/netutils/ftpc/ftpc_getfile.c b/netutils/ftpc/ftpc_getfile.c index a7c398adf..ddca40baa 100644 --- a/netutils/ftpc/ftpc_getfile.c +++ b/netutils/ftpc/ftpc_getfile.c @@ -111,7 +111,7 @@ static int ftpc_recvinit(struct ftpc_session_s *session, FAR const char *path, ret = ftpc_cmd(session, "REST %ld", offset); if (ret < 0) { - ndbg("REST command failed: %d\n", errno); + nerr("REST command failed: %d\n", errno); return ERROR; } @@ -143,7 +143,7 @@ static int ftpc_recvinit(struct ftpc_session_s *session, FAR const char *path, ret = ftpc_cmd(session, "RETR %s", path); if (ret < 0) { - ndbg("RETR command failed: %d\n", errno); + nerr("RETR command failed: %d\n", errno); return ERROR; } @@ -157,7 +157,7 @@ static int ftpc_recvinit(struct ftpc_session_s *session, FAR const char *path, ret = ftpc_sockaccept(&session->data); if (ret != OK) { - ndbg("Data connection not accepted\n"); + nerr("Data connection not accepted\n"); } } @@ -262,7 +262,7 @@ int ftpc_getfile(SESSION handle, FAR const char *rname, FAR const char *lname, abslpath = ftpc_abslpath(session, lname); if (!abslpath) { - ndbg("ftpc_abslpath(%s) failed: %d\n", errno); + nerr("ftpc_abslpath(%s) failed: %d\n", errno); goto errout; } @@ -275,7 +275,7 @@ int ftpc_getfile(SESSION handle, FAR const char *rname, FAR const char *lname, if (S_ISDIR(statbuf.st_mode)) { - ndbg("'%s' is a directory\n", abslpath); + nerr("'%s' is a directory\n", abslpath); goto errout_with_abspath; } } @@ -285,7 +285,7 @@ int ftpc_getfile(SESSION handle, FAR const char *rname, FAR const char *lname, #ifdef S_IWRITE if (!(statbuf.st_mode & S_IWRITE)) { - ndbg("'%s' permission denied\n", abslpath); + nerr("'%s' permission denied\n", abslpath); goto errout_with_abspath; } #endif @@ -308,14 +308,14 @@ int ftpc_getfile(SESSION handle, FAR const char *rname, FAR const char *lname, ret = ftpc_recvinit(session, rname, xfrmode, offset); if (ret != OK) { - ndbg("ftpc_recvinit failed\n"); + nerr("ftpc_recvinit failed\n"); goto errout_with_abspath; } loutstream = fopen(abslpath, (offset > 0 || (how == FTPC_GET_APPEND)) ? "a" : "w"); if (!loutstream) { - ndbg("fopen failed: %d\n", errno); + nerr("fopen failed: %d\n", errno); goto errout_with_abspath; } @@ -326,7 +326,7 @@ int ftpc_getfile(SESSION handle, FAR const char *rname, FAR const char *lname, ret = fseek(loutstream, offset, SEEK_SET); if (ret != OK) { - ndbg("fseek failed: %d\n", errno); + nerr("fseek failed: %d\n", errno); goto errout_with_outstream; } } diff --git a/netutils/ftpc/ftpc_getreply.c b/netutils/ftpc/ftpc_getreply.c index fc0f0bce5..e538d1a97 100644 --- a/netutils/ftpc/ftpc_getreply.c +++ b/netutils/ftpc/ftpc_getreply.c @@ -82,7 +82,7 @@ static int ftpc_gets(struct ftpc_session_s *session) if (!ftpc_sockconnected(&session->cmd)) { - ndbg("Cmd channel disconnected\n"); + nerr("Cmd channel disconnected\n"); return ERROR; } @@ -98,7 +98,7 @@ static int ftpc_gets(struct ftpc_session_s *session) if (ch == EOF) { - ndbg("EOF: Server closed command stream\n"); + nerr("EOF: Server closed command stream\n"); ftpc_reset(session); return ERROR; } @@ -189,7 +189,7 @@ static int ftpc_gets(struct ftpc_session_s *session) } else { - ndbg("Reply truncated\n"); + nerr("Reply truncated\n"); } } diff --git a/netutils/ftpc/ftpc_idle.c b/netutils/ftpc/ftpc_idle.c index 7334f195d..879049b2e 100644 --- a/netutils/ftpc/ftpc_idle.c +++ b/netutils/ftpc/ftpc_idle.c @@ -91,7 +91,7 @@ int ftpc_idle(SESSION handle, unsigned int idletime) if (!FTPC_HAS_IDLE(session)) { - ndbg("Server does not support SITE IDLE\n"); + nerr("Server does not support SITE IDLE\n"); return ERROR; } @@ -114,7 +114,7 @@ int ftpc_idle(SESSION handle, unsigned int idletime) { /* Server does not support SITE IDLE */ - ndbg("Server does not support SITE IDLE\n"); + nerr("Server does not support SITE IDLE\n"); FTPC_CLR_IDLE(session); } diff --git a/netutils/ftpc/ftpc_listdir.c b/netutils/ftpc/ftpc_listdir.c index 6177bdd16..6a0129757 100644 --- a/netutils/ftpc/ftpc_listdir.c +++ b/netutils/ftpc/ftpc_listdir.c @@ -170,7 +170,7 @@ static int ftpc_recvdir(FAR struct ftpc_session_s *session, if (!ftpc_connected(session)) { - ndbg("Not connected to server\n"); + nerr("Not connected to server\n"); return ERROR; } @@ -209,7 +209,7 @@ static int ftpc_recvdir(FAR struct ftpc_session_s *session, ret = ftpc_sockaccept(&session->data); if (ret != OK) { - ndbg("ftpc_sockaccept() failed: %d\n", errno); + nerr("ftpc_sockaccept() failed: %d\n", errno); return ERROR; } } @@ -297,7 +297,7 @@ FAR struct ftpc_dirlist_s *ftpc_listdir(SESSION handle, filestream = fopen(tmpfname, "w+"); if (!filestream) { - ndbg("Failed to create %s: %d\n", tmpfname, errno); + nerr("Failed to create %s: %d\n", tmpfname, errno); free(absrpath); free(tmpfname); return NULL; @@ -312,7 +312,7 @@ FAR struct ftpc_dirlist_s *ftpc_listdir(SESSION handle, ret = ftpc_cmd(session, "CWD %s", absrpath); if (ret != OK) { - ndbg("CWD to %s failed\n", absrpath); + nerr("CWD to %s failed\n", absrpath); } } @@ -329,7 +329,7 @@ FAR struct ftpc_dirlist_s *ftpc_listdir(SESSION handle, int tmpret = ftpc_cmd(session, "CWD %s", session->currdir); if (tmpret != OK) { - ndbg("CWD back to to %s failed\n", session->currdir); + nerr("CWD back to to %s failed\n", session->currdir); } } @@ -346,7 +346,7 @@ FAR struct ftpc_dirlist_s *ftpc_listdir(SESSION handle, ftpc_nlstparse(filestream, ftpc_dircount, &nnames); if (!nnames) { - ndbg("Nothing found in directory\n"); + nerr("Nothing found in directory\n"); goto errout; } ninfo("nnames: %d\n", nnames); @@ -357,7 +357,7 @@ FAR struct ftpc_dirlist_s *ftpc_listdir(SESSION handle, dirlist = (struct ftpc_dirlist_s *)malloc(allocsize); if (!dirlist) { - ndbg("Failed to allocate dirlist\n"); + nerr("Failed to allocate dirlist\n"); goto errout; } diff --git a/netutils/ftpc/ftpc_login.c b/netutils/ftpc/ftpc_login.c index 4af7c21cb..94743421e 100644 --- a/netutils/ftpc/ftpc_login.c +++ b/netutils/ftpc/ftpc_login.c @@ -89,7 +89,7 @@ int ftpc_login(SESSION handle, FAR struct ftpc_login_s *login) if (!ftpc_connected(session)) { - ndbg("Not connected\n"); + nerr("Not connected\n"); errcode = ENOTCONN; goto errout_with_err; } @@ -98,7 +98,7 @@ int ftpc_login(SESSION handle, FAR struct ftpc_login_s *login) if (ftpc_loggedin(session)) { - ndbg("Already logged in\n"); + nerr("Already logged in\n"); errcode = EINVAL; goto errout_with_err; } @@ -123,7 +123,7 @@ int ftpc_login(SESSION handle, FAR struct ftpc_login_s *login) ret = ftpc_relogin(session); if (ret != OK) { - ndbg("login failed: %d\n", errno); + nerr("login failed: %d\n", errno); goto errout; } @@ -167,7 +167,7 @@ int ftpc_relogin(FAR struct ftpc_session_s *session) ret = ftpc_cmd(session, "USER %s", session->uname); if (ret != OK) { - ndbg("USER %s cmd failed: %d\n", session->uname, errno); + nerr("USER %s cmd failed: %d\n", session->uname, errno); return ERROR; } @@ -189,7 +189,7 @@ int ftpc_relogin(FAR struct ftpc_session_s *session) ret = ftpc_cmd(session, "PASS %s", session->pwd); if (ret != OK) { - ndbg("PASS %s cmd failed: %d\n", session->pwd, errno); + nerr("PASS %s cmd failed: %d\n", session->pwd, errno); return ret; } diff --git a/netutils/ftpc/ftpc_putfile.c b/netutils/ftpc/ftpc_putfile.c index 0f9da8363..f4fc55355 100644 --- a/netutils/ftpc/ftpc_putfile.c +++ b/netutils/ftpc/ftpc_putfile.c @@ -334,7 +334,7 @@ static int ftpc_sendfile(struct ftpc_session_s *session, const char *path, ret = ftpc_sockaccept(&session->data); if (ret != OK) { - ndbg("Data connection not accepted\n"); + nerr("Data connection not accepted\n"); return ERROR; } } @@ -400,7 +400,7 @@ int ftp_putfile(SESSION handle, const char *lname, const char *rname, abslpath = ftpc_abslpath(session, lname); if (!abslpath) { - ndbg("ftpc_abslpath(%s) failed: %d\n", errno); + nerr("ftpc_abslpath(%s) failed: %d\n", errno); goto errout; } @@ -409,7 +409,7 @@ int ftp_putfile(SESSION handle, const char *lname, const char *rname, ret = stat(abslpath, &statbuf); if (ret != OK) { - ndbg("stat(%s) failed: %d\n", errno); + nerr("stat(%s) failed: %d\n", errno); goto errout_with_abspath; } @@ -417,7 +417,7 @@ int ftp_putfile(SESSION handle, const char *lname, const char *rname, if (S_ISDIR(statbuf.st_mode)) { - ndbg("%s is a directory\n", abslpath); + nerr("%s is a directory\n", abslpath); goto errout_with_abspath; } @@ -426,7 +426,7 @@ int ftp_putfile(SESSION handle, const char *lname, const char *rname, finstream = fopen(abslpath, "r"); if (!finstream) { - ndbg("fopen() failed: %d\n", errno); + nerr("fopen() failed: %d\n", errno); goto errout_with_abspath; } @@ -442,7 +442,7 @@ int ftp_putfile(SESSION handle, const char *lname, const char *rname, session->offset = ftpc_filesize(session, rname); if (session->offset == (off_t)ERROR) { - ndbg("Failed to get size of remote file: %s\n", rname); + nerr("Failed to get size of remote file: %s\n", rname); goto errout_with_instream; } else @@ -454,7 +454,7 @@ int ftp_putfile(SESSION handle, const char *lname, const char *rname, ret = fseek(finstream, session->offset, SEEK_SET); if (ret != OK) { - ndbg("fseek failed: %d\n", errno); + nerr("fseek failed: %d\n", errno); goto errout_with_instream; } } diff --git a/netutils/ftpc/ftpc_rpwd.c b/netutils/ftpc/ftpc_rpwd.c index 1f87f5f14..0ce16e3d1 100644 --- a/netutils/ftpc/ftpc_rpwd.c +++ b/netutils/ftpc/ftpc_rpwd.c @@ -100,7 +100,7 @@ FAR char *ftpc_rpwd(SESSION handle) start = strchr(session->reply, '\"'); if (!start) { - ndbg("Opening quote not found\n"); + nerr("Opening quote not found\n"); return NULL; } start++; @@ -108,7 +108,7 @@ FAR char *ftpc_rpwd(SESSION handle) end = strchr(start, '\"'); if (!end) { - ndbg("Closing quote not found\n"); + nerr("Closing quote not found\n"); return NULL; } @@ -124,7 +124,7 @@ FAR char *ftpc_rpwd(SESSION handle) pwd = (char *)malloc(len + 1); if (!pwd) { - ndbg("Failed to allocate string\n"); + nerr("Failed to allocate string\n"); return NULL; } diff --git a/netutils/ftpc/ftpc_socket.c b/netutils/ftpc/ftpc_socket.c index b2e76b44b..633493f9b 100644 --- a/netutils/ftpc/ftpc_socket.c +++ b/netutils/ftpc/ftpc_socket.c @@ -92,7 +92,7 @@ int ftpc_sockinit(FAR struct ftpc_socket_s *sock) sock->sd = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP); if (sock->sd < 0) { - ndbg("socket() failed: %d\n", errno); + nerr("socket() failed: %d\n", errno); goto errout; } @@ -103,7 +103,7 @@ int ftpc_sockinit(FAR struct ftpc_socket_s *sock) sock->instream = fdopen(sock->sd, "r"); if (!sock->instream) { - ndbg("fdopen() failed: %d\n", errno); + nerr("fdopen() failed: %d\n", errno); goto errout_with_sd; } @@ -114,7 +114,7 @@ int ftpc_sockinit(FAR struct ftpc_socket_s *sock) sock->outstream = fdopen(sock->sd, "w"); if (!sock->outstream) { - ndbg("fdopen() failed: %d\n", errno); + nerr("fdopen() failed: %d\n", errno); goto errout_with_instream; } @@ -173,7 +173,7 @@ int ftpc_sockconnect(struct ftpc_socket_s *sock, struct sockaddr_in *addr) ret = connect(sock->sd, (struct sockaddr *)addr, sizeof(struct sockaddr)); if (ret < 0) { - ndbg("connect() failed: %d\n", errno); + nerr("connect() failed: %d\n", errno); return ERROR; } @@ -182,7 +182,7 @@ int ftpc_sockconnect(struct ftpc_socket_s *sock, struct sockaddr_in *addr) ret = ftpc_sockgetsockname(sock, &sock->laddr); if (ret < 0) { - ndbg("ftpc_sockgetsockname() failed: %d\n", errno); + nerr("ftpc_sockgetsockname() failed: %d\n", errno); return ERROR; } @@ -250,7 +250,7 @@ int ftpc_sockaccept(FAR struct ftpc_socket_s *sock) sock->sd = accept(sock->sd, &addr, &addrlen); if (sock->sd == -1) { - ndbg("accept() failed: %d\n", errno); + nerr("accept() failed: %d\n", errno); return ERROR; } @@ -263,7 +263,7 @@ int ftpc_sockaccept(FAR struct ftpc_socket_s *sock) sock->instream = fdopen(sock->sd, "r"); if (!sock->instream) { - ndbg("fdopen() failed: %d\n", errno); + nerr("fdopen() failed: %d\n", errno); goto errout_with_sd; } @@ -272,7 +272,7 @@ int ftpc_sockaccept(FAR struct ftpc_socket_s *sock) sock->outstream = fdopen(sock->sd, "w"); if (!sock->outstream) { - ndbg("fdopen() failed: %d\n", errno); + nerr("fdopen() failed: %d\n", errno); goto errout_with_instream; } @@ -310,7 +310,7 @@ int ftpc_socklisten(struct ftpc_socket_s *sock) ret = bind(sock->sd, (struct sockaddr *)&sock->laddr, addrlen); if (ret < 0) { - ndbg("bind() failed: %d\n", errno); + nerr("bind() failed: %d\n", errno); return ERROR; } @@ -363,7 +363,7 @@ int ftpc_sockgetsockname(FAR struct ftpc_socket_s *sock, ret = getsockname(sock->sd, (FAR struct sockaddr *)addr, &len); if (ret < 0) { - ndbg("getsockname failed: %d\n", errno); + nerr("getsockname failed: %d\n", errno); return ERROR; } return OK; diff --git a/netutils/ftpc/ftpc_transfer.c b/netutils/ftpc/ftpc_transfer.c index 6fba83977..0834f00ac 100644 --- a/netutils/ftpc/ftpc_transfer.c +++ b/netutils/ftpc/ftpc_transfer.c @@ -111,7 +111,7 @@ static int ftp_pasvmode(struct ftpc_session_s *session, if (!FTPC_HAS_PASV(session)) { - ndbg("Host doesn't support passive mode\n"); + nerr("Host doesn't support passive mode\n"); return ERROR; } @@ -143,7 +143,7 @@ static int ftp_pasvmode(struct ftpc_session_s *session, &tmpap[3], &tmpap[4], &tmpap[5]); if (nscan != 6) { - ndbg("Error parsing PASV reply: '%s'\n", session->reply); + nerr("Error parsing PASV reply: '%s'\n", session->reply); return ERROR; } @@ -255,7 +255,7 @@ int ftpc_xfrinit(FAR struct ftpc_session_s *session) if (!ftpc_connected(session)) { - ndbg("Not connected\n"); + nerr("Not connected\n"); goto errout; } @@ -264,7 +264,7 @@ int ftpc_xfrinit(FAR struct ftpc_session_s *session) ret = ftpc_sockinit(&session->data); if (ret != OK) { - ndbg("ftpc_sockinit() failed: %d\n", errno); + nerr("ftpc_sockinit() failed: %d\n", errno); goto errout; } @@ -281,7 +281,7 @@ int ftpc_xfrinit(FAR struct ftpc_session_s *session) ret = ftp_pasvmode(session, addrport); if (ret != OK) { - ndbg("ftp_pasvmode() failed: %d\n", errno); + nerr("ftp_pasvmode() failed: %d\n", errno); goto errout_with_data; } @@ -296,7 +296,7 @@ int ftpc_xfrinit(FAR struct ftpc_session_s *session) ret = ftpc_sockconnect(&session->data, &addr); if (ret < 0) { - ndbg("ftpc_sockconnect() failed: %d\n", errno); + nerr("ftpc_sockconnect() failed: %d\n", errno); goto errout_with_data; } } @@ -316,7 +316,7 @@ int ftpc_xfrinit(FAR struct ftpc_session_s *session) paddr[3], pport[0], pport[1]); if (ret < 0) { - ndbg("ftpc_cmd() failed: %d\n", errno); + nerr("ftpc_cmd() failed: %d\n", errno); goto errout_with_data; } } diff --git a/netutils/ftpd/ftpd.c b/netutils/ftpd/ftpd.c index d14f6a435..a15871487 100644 --- a/netutils/ftpd/ftpd.c +++ b/netutils/ftpd/ftpd.c @@ -304,7 +304,7 @@ static FAR struct ftpd_account_s *ftpd_account_new(FAR const char *user, ret = (struct ftpd_account_s *)zalloc(allocsize); if (!ret) { - ndbg("Failed to allocate account\n"); + nerr("Failed to allocate account\n"); return NULL; } @@ -875,7 +875,7 @@ static int ftpd_accept(int sd, FAR void *addr, FAR socklen_t *addrlen, #ifdef CONFIG_DEBUG_NET if (ret != -ETIMEDOUT) { - ndbg("ftpd_rxpoll() failed: %d\n", ret); + nerr("ftpd_rxpoll() failed: %d\n", ret); } #endif return ret; @@ -888,7 +888,7 @@ static int ftpd_accept(int sd, FAR void *addr, FAR socklen_t *addrlen, if (acceptsd < 0) { int errval = errno; - ndbg("accept() failed: %d\n", errval); + nerr("accept() failed: %d\n", errval); return -errval; } @@ -926,7 +926,7 @@ static ssize_t ftpd_recv(int sd, FAR void *data, size_t size, int timeout) { int errval = errno; - ndbg("recv() failed: %d\n", errval); + nerr("recv() failed: %d\n", errval); return -errval; } @@ -959,7 +959,7 @@ static ssize_t ftpd_send(int sd, FAR const void *data, size_t size, int timeout) if (ret < 0) { ssize_t errval = errno; - ndbg("send() failed: %d\n", errval); + nerr("send() failed: %d\n", errval); return -errval; } @@ -1020,7 +1020,7 @@ static int ftpd_dataopen(FAR struct ftpd_session_s *session) if (session->data.sd < 0) { int errval = errno; - ndbg("socket() failed: %d\n", errval); + nerr("socket() failed: %d\n", errval); (void)ftpd_response(session->cmd.sd, session->txtimeout, g_respfmt1, 451, ' ', "Socket error !"); return -errval; @@ -1032,7 +1032,7 @@ static int ftpd_dataopen(FAR struct ftpd_session_s *session) if (ret < 0) { int errval = errno; - ndbg("connect() failed: %d\n", errval); + nerr("connect() failed: %d\n", errval); (void)ftpd_response(session->cmd.sd, session->txtimeout, g_respfmt1, 451, ' ', "Connect error !"); (void)ftpd_dataclose(session); @@ -1060,7 +1060,7 @@ static int ftpd_dataopen(FAR struct ftpd_session_s *session) &session->data.addrlen, -1); if (sd < 0) { - ndbg("ftpd_accept() failed: %d\n", sd); + nerr("ftpd_accept() failed: %d\n", sd); (void)ftpd_response(session->cmd.sd, session->txtimeout, g_respfmt1, 451, ' ', "Accept error !"); (void)ftpd_dataclose(session); @@ -1121,7 +1121,7 @@ static FAR struct ftpd_server_s *ftpd_openserver(int port) server = (FAR struct ftpd_server_s *)zalloc(sizeof(struct ftpd_server_s)); if (!server) { - ndbg("Failed to allocate server\n"); + nerr("Failed to allocate server\n"); return NULL; } @@ -1660,7 +1660,7 @@ static off_t ftpd_offsatoi(FAR const char *filename, off_t offset) if (!outstream) { int errval = errno; - ndbg("Failed to open %s: %d\n", filename, errval); + nerr("Failed to open %s: %d\n", filename, errval); return -errval; } @@ -1820,7 +1820,7 @@ static int ftpd_stream(FAR struct ftpd_session_s *session, int cmdtype) seekpos = ftpd_offsatoi(path, session->restartpos); if (seekpos < 0) { - ndbg("ftpd_offsatoi failed: %d\n", seekpos); + nerr("ftpd_offsatoi failed: %d\n", seekpos); errval = -seekpos; } } @@ -1829,7 +1829,7 @@ static int ftpd_stream(FAR struct ftpd_session_s *session, int cmdtype) seekpos = session->restartpos; if (seekpos < 0) { - ndbg("Bad restartpos: %d\n", seekpos); + nerr("Bad restartpos: %d\n", seekpos); errval = EINVAL; } } @@ -1842,7 +1842,7 @@ static int ftpd_stream(FAR struct ftpd_session_s *session, int cmdtype) if (seekoffs < 0) { errval = errno; - ndbg("lseek failed: %d\n", errval); + nerr("lseek failed: %d\n", errval); } } @@ -1867,7 +1867,7 @@ static int ftpd_stream(FAR struct ftpd_session_s *session, int cmdtype) g_respfmt1, 150, ' ', "Opening data connection"); if (ret < 0) { - ndbg("ftpd_response failed: %d\n", ret); + nerr("ftpd_response failed: %d\n", ret); goto errout_with_session; } @@ -1916,7 +1916,7 @@ static int ftpd_stream(FAR struct ftpd_session_s *session, int cmdtype) if (rdbytes < 0) { - ndbg("Read failed: rdbytes=%d errval=%d\n", rdbytes, errval); + nerr("Read failed: rdbytes=%d errval=%d\n", rdbytes, errval); (void)ftpd_response(session->cmd.sd, session->txtimeout, g_respfmt1, 550, ' ', "Data read error !"); ret = -errval; @@ -1971,7 +1971,7 @@ static int ftpd_stream(FAR struct ftpd_session_s *session, int cmdtype) if (wrbytes < 0) { errval = -wrbytes; - ndbg("ftpd_send failed: %d\n", errval); + nerr("ftpd_send failed: %d\n", errval); } } else @@ -1982,7 +1982,7 @@ static int ftpd_stream(FAR struct ftpd_session_s *session, int cmdtype) if (wrbytes < 0) { errval = errno; - ndbg("write() failed: %d\n", errval); + nerr("write() failed: %d\n", errval); } } @@ -1994,7 +1994,7 @@ static int ftpd_stream(FAR struct ftpd_session_s *session, int cmdtype) if (wrbytes != ((ssize_t)buflen)) { - ndbg("Write failed: wrbytes=%d errval=%d\n", wrbytes, errval); + nerr("Write failed: wrbytes=%d errval=%d\n", wrbytes, errval); (void)ftpd_response(session->cmd.sd, session->txtimeout, g_respfmt1, 550, ' ', "Data send error !"); ret = -errval; @@ -2332,7 +2332,7 @@ static int fptd_listscan(FAR struct ftpd_session_s *session, FAR char *path, if (!dir) { int errval = errno; - ndbg("dir() failed\n", errval); + nerr("dir() failed\n", errval); return -errval; } @@ -2684,7 +2684,7 @@ static int ftpd_command_port(FAR struct ftpd_session_s *session) "Illegal PORT command"); if (ret < 0) { - ndbg("ftpd_response failed: %d\n", ret); + nerr("ftpd_response failed: %d\n", ret); return ret; } } @@ -2863,7 +2863,7 @@ static int ftpd_command_eprt(FAR struct ftpd_session_s *session) else #endif { - ndbg("Unrecognized family: %d\n", family); + nerr("Unrecognized family: %d\n", family); family = AF_UNSPEC; } @@ -3132,7 +3132,7 @@ static int ftpd_command_pasv(FAR struct ftpd_session_s *session) else #endif { - ndbg("Unsupported family\n"); + nerr("Unsupported family\n"); } session->data.addr.in4.sin_port = 0; @@ -3890,7 +3890,7 @@ static int ftpd_startworker(pthread_startroutine_t handler, FAR void *arg, ret = pthread_attr_init(&attr); if (ret != 0) { - ndbg("pthread_attr_init() failed: %d\n", ret); + nerr("pthread_attr_init() failed: %d\n", ret); goto errout; } @@ -3899,7 +3899,7 @@ static int ftpd_startworker(pthread_startroutine_t handler, FAR void *arg, ret = pthread_attr_setstacksize(&attr, stacksize); if (ret != 0) { - ndbg("pthread_attr_setstacksize() failed: %d\n", ret); + nerr("pthread_attr_setstacksize() failed: %d\n", ret); goto errout_with_attr; } @@ -3908,7 +3908,7 @@ static int ftpd_startworker(pthread_startroutine_t handler, FAR void *arg, ret = pthread_create(&threadid, &attr, handler, arg); if (ret != 0) { - ndbg("pthread_create() failed: %d\n", ret); + nerr("pthread_create() failed: %d\n", ret); goto errout_with_attr; } @@ -3917,7 +3917,7 @@ static int ftpd_startworker(pthread_startroutine_t handler, FAR void *arg, ret = pthread_detach(threadid); if (ret != 0) { - ndbg("pthread_detach() failed: %d\n", ret); + nerr("pthread_detach() failed: %d\n", ret); } errout_with_attr: @@ -4035,7 +4035,7 @@ static FAR void *ftpd_worker(FAR void *arg) g_respfmt1, 220, ' ', CONFIG_FTPD_SERVERID); if (ret < 0) { - ndbg("ftpd_response() failed: %d\n", ret); + nerr("ftpd_response() failed: %d\n", ret); ftpd_freesession(session); return NULL; } @@ -4126,7 +4126,7 @@ static FAR void *ftpd_worker(FAR void *arg) ret = ftpd_command(session); if (ret < 0) { - ndbg("Disconnected by the command handler: %d\n", ret); + nerr("Disconnected by the command handler: %d\n", ret); break; } } @@ -4203,7 +4203,7 @@ int ftpd_adduser(FTPD_SESSION handle, uint8_t accountflags, newaccount = ftpd_account_new(user, accountflags); if (!newaccount) { - ndbg("Failed to allocte memory to the account\n"); + nerr("Failed to allocte memory to the account\n"); ret = -ENOMEM; goto errout; } @@ -4211,14 +4211,14 @@ int ftpd_adduser(FTPD_SESSION handle, uint8_t accountflags, ret = ftpd_account_setpassword(newaccount, passwd); if (ret < 0) { - ndbg("ftpd_account_setpassword failed: %d\n", ret); + nerr("ftpd_account_setpassword failed: %d\n", ret); goto errout_with_account; } ret = ftpd_account_sethome(newaccount, home); if (ret < 0) { - ndbg("ftpd_account_sethome failed: %d\n", ret); + nerr("ftpd_account_sethome failed: %d\n", ret); goto errout_with_account; } @@ -4226,7 +4226,7 @@ int ftpd_adduser(FTPD_SESSION handle, uint8_t accountflags, ret = ftpd_account_add(server, newaccount); if (ret < 0) { - ndbg("ftpd_account_add failed: %d\n", ret); + nerr("ftpd_account_add failed: %d\n", ret); goto errout_with_account; } @@ -4276,7 +4276,7 @@ int ftpd_session(FTPD_SESSION handle, int timeout) session = (FAR struct ftpd_session_s *)zalloc(sizeof(struct ftpd_session_s)); if (!session) { - ndbg("Failed to allocate session\n"); + nerr("Failed to allocate session\n"); ret = -ENOMEM; goto errout; } @@ -4312,7 +4312,7 @@ int ftpd_session(FTPD_SESSION handle, int timeout) session->cmd.buffer = (FAR char *)malloc(session->cmd.buflen); if (!session->cmd.buffer) { - ndbg("Failed to allocate command buffer\n"); + nerr("Failed to allocate command buffer\n"); ret = -ENOMEM; goto errout_with_session; } @@ -4322,7 +4322,7 @@ int ftpd_session(FTPD_SESSION handle, int timeout) session->data.buffer = (FAR char *)malloc(session->data.buflen); if (!session->data.buffer) { - ndbg("Failed to allocate data buffer\n"); + nerr("Failed to allocate data buffer\n"); ret = -ENOMEM; goto errout_with_session; } @@ -4338,7 +4338,7 @@ int ftpd_session(FTPD_SESSION handle, int timeout) #ifdef CONFIG_DEBUG_NET if (session->cmd.sd != -ETIMEDOUT) { - ndbg("ftpd_accept() failed: %d\n", session->cmd.sd); + nerr("ftpd_accept() failed: %d\n", session->cmd.sd); } #endif ret = session->cmd.sd; @@ -4351,7 +4351,7 @@ int ftpd_session(FTPD_SESSION handle, int timeout) CONFIG_FTPD_WORKERSTACKSIZE); if (ret < 0) { - ndbg("ftpd_startworker() failed: %d\n", ret); + nerr("ftpd_startworker() failed: %d\n", ret); goto errout_with_session; } diff --git a/netutils/netlib/netlib_listenon.c b/netutils/netlib/netlib_listenon.c index c46fa672e..84b4ebd27 100644 --- a/netutils/netlib/netlib_listenon.c +++ b/netutils/netlib/netlib_listenon.c @@ -87,7 +87,7 @@ int netlib_listenon(uint16_t portno) listensd = socket(PF_INET, SOCK_STREAM, 0); if (listensd < 0) { - ndbg("socket failure: %d\n", errno); + nerr("socket failure: %d\n", errno); return ERROR; } @@ -97,7 +97,7 @@ int netlib_listenon(uint16_t portno) optval = 1; if (setsockopt(listensd, SOL_SOCKET, SO_REUSEADDR, (void*)&optval, sizeof(int)) < 0) { - ndbg("setsockopt SO_REUSEADDR failure: %d\n", errno); + nerr("setsockopt SO_REUSEADDR failure: %d\n", errno); goto errout_with_socket; } #endif @@ -110,7 +110,7 @@ int netlib_listenon(uint16_t portno) if (bind(listensd, (struct sockaddr*)&myaddr, sizeof(struct sockaddr_in)) < 0) { - ndbg("bind failure: %d\n", errno); + nerr("bind failure: %d\n", errno); goto errout_with_socket; } @@ -118,7 +118,7 @@ int netlib_listenon(uint16_t portno) if (listen(listensd, 5) < 0) { - ndbg("listen failure %d\n", errno); + nerr("listen failure %d\n", errno); goto errout_with_socket; } diff --git a/netutils/netlib/netlib_server.c b/netutils/netlib/netlib_server.c index 42ed151dc..24f2be852 100644 --- a/netutils/netlib/netlib_server.c +++ b/netutils/netlib/netlib_server.c @@ -109,7 +109,7 @@ void netlib_server(uint16_t portno, pthread_startroutine_t handler, int stacksiz acceptsd = accept(listensd, (struct sockaddr*)&myaddr, &addrlen); if (acceptsd < 0) { - ndbg("accept failure: %d\n", errno); + nerr("accept failure: %d\n", errno); break; } @@ -127,7 +127,7 @@ void netlib_server(uint16_t portno, pthread_startroutine_t handler, int stacksiz if (ret < 0) { close(acceptsd); - ndbg("setsockopt SO_LINGER failure: %d\n", errno); + nerr("setsockopt SO_LINGER failure: %d\n", errno); break; } #endif @@ -145,7 +145,7 @@ void netlib_server(uint16_t portno, pthread_startroutine_t handler, int stacksiz /* Close the connection */ close(acceptsd); - ndbg("pthread_create failed\n"); + nerr("pthread_create failed\n"); if (ret == EAGAIN) { diff --git a/netutils/ntpclient/ntpclient.c b/netutils/ntpclient/ntpclient.c index 5562cd615..faff41741 100644 --- a/netutils/ntpclient/ntpclient.c +++ b/netutils/ntpclient/ntpclient.c @@ -310,7 +310,7 @@ static int ntpc_daemon(int argc, char **argv) sd = socket(AF_INET, SOCK_DGRAM, 0); if (sd < 0) { - ndbg("ERROR: socket failed: %d\n", errno); + nerr("ERROR: socket failed: %d\n", errno); g_ntpc_daemon.state = NTP_STOPPED; sem_post(&g_ntpc_daemon.interlock); @@ -325,7 +325,7 @@ static int ntpc_daemon(int argc, char **argv) ret = setsockopt(sd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(struct timeval)); if (ret < 0) { - ndbg("ERROR: setsockopt failed: %d\n", errno); + nerr("ERROR: setsockopt failed: %d\n", errno); g_ntpc_daemon.state = NTP_STOPPED; sem_post(&g_ntpc_daemon.interlock); @@ -388,7 +388,7 @@ static int ntpc_daemon(int argc, char **argv) int errval = errno; if (errval != EINTR) { - ndbg("ERROR: sendto() failed: %d\n", errval); + nerr("ERROR: sendto() failed: %d\n", errval); exitcode = EXIT_FAILURE; break; } @@ -441,7 +441,7 @@ static int ntpc_daemon(int argc, char **argv) /* Then declare the failure */ - ndbg("ERROR: recvfrom() failed: %d\n", errval); + nerr("ERROR: recvfrom() failed: %d\n", errval); exitcode = EXIT_FAILURE; break; } @@ -517,7 +517,7 @@ int ntpc_start(void) DEBUGASSERT(errval > 0); g_ntpc_daemon.state = NTP_STOPPED; - ndbg("ERROR: Failed to start the NTP daemon\n", errval); + nerr("ERROR: Failed to start the NTP daemon\n", errval); sched_unlock(); return -errval; } @@ -573,7 +573,7 @@ int ntpc_stop(void) if (ret < 0) { - ndbg("ERROR: kill pid %d failed: %d\n", + nerr("ERROR: kill pid %d failed: %d\n", g_ntpc_daemon.pid, errno); break; } diff --git a/netutils/ping/icmp_ping.c b/netutils/ping/icmp_ping.c index 92667bfa6..d11947458 100644 --- a/netutils/ping/icmp_ping.c +++ b/netutils/ping/icmp_ping.c @@ -264,7 +264,7 @@ int ipv4_ping(FAR struct sockaddr_in *raddr, int errcode = errno; DEBUGASSERT(errno > 0); - ndbg("ERROR: recv failed: %d\n", errcode); + nerr("ERROR: recv failed: %d\n", errcode); ret = -errcode; break; } diff --git a/netutils/ping/icmpv6_ping.c b/netutils/ping/icmpv6_ping.c index 4c0136ad7..abad366b9 100644 --- a/netutils/ping/icmpv6_ping.c +++ b/netutils/ping/icmpv6_ping.c @@ -262,7 +262,7 @@ int ipv6_ping(FAR struct sockaddr_in6 *raddr, int errcode = errno; DEBUGASSERT(errno > 0); - ndbg("ERROR: recv failed: %d\n", errcode); + nerr("ERROR: recv failed: %d\n", errcode); ret = -errcode; break; } diff --git a/netutils/telnetd/telnetd_daemon.c b/netutils/telnetd/telnetd_daemon.c index 3356981ff..9b386c63f 100644 --- a/netutils/telnetd/telnetd_daemon.c +++ b/netutils/telnetd/telnetd_daemon.c @@ -169,7 +169,7 @@ static int telnetd_daemon(int argc, char *argv[]) if (sigaction(SIGCHLD, &sa, NULL) < 0) { int errval = errno; - ndbg("ERROR: sigaction failed: %d\n", errval); + nerr("ERROR: sigaction failed: %d\n", errval); return -errval; } @@ -180,7 +180,7 @@ static int telnetd_daemon(int argc, char *argv[]) if (sigprocmask(SIG_BLOCK, &blockset, NULL) < 0) { int errval = errno; - ndbg("ERROR: sigprocmask failed: %d\n", errval); + nerr("ERROR: sigprocmask failed: %d\n", errval); return -errval; } #endif /* CONFIG_SCHED_HAVE_PARENT */ @@ -191,7 +191,7 @@ static int telnetd_daemon(int argc, char *argv[]) if (listensd < 0) { int errval = errno; - ndbg("ERROR: socket failure: %d\n", errval); + nerr("ERROR: socket failure: %d\n", errval); return -errval; } @@ -201,7 +201,7 @@ static int telnetd_daemon(int argc, char *argv[]) optval = 1; if (setsockopt(listensd, SOL_SOCKET, SO_REUSEADDR, (void*)&optval, sizeof(int)) < 0) { - ndbg("ERROR: setsockopt SO_REUSEADDR failure: %d\n", errno); + nerr("ERROR: setsockopt SO_REUSEADDR failure: %d\n", errno); goto errout_with_socket; } #endif @@ -214,7 +214,7 @@ static int telnetd_daemon(int argc, char *argv[]) if (bind(listensd, (struct sockaddr*)&myaddr, sizeof(struct sockaddr_in)) < 0) { - ndbg("ERROR: bind failure: %d\n", errno); + nerr("ERROR: bind failure: %d\n", errno); goto errout_with_socket; } @@ -222,7 +222,7 @@ static int telnetd_daemon(int argc, char *argv[]) if (listen(listensd, 5) < 0) { - ndbg("ERROR: listen failure %d\n", errno); + nerr("ERROR: listen failure %d\n", errno); goto errout_with_socket; } @@ -413,7 +413,7 @@ int telnetd_start(FAR struct telnetd_config_s *config) { int errval = errno; free(daemon); - ndbg("ERROR: Failed to start the telnet daemon: %d\n", errval); + nerr("ERROR: Failed to start the telnet daemon: %d\n", errval); return -errval; } diff --git a/netutils/tftpc/tftpc_get.c b/netutils/tftpc/tftpc_get.c index 2b7ae8fa3..4ad5eeb58 100644 --- a/netutils/tftpc/tftpc_get.c +++ b/netutils/tftpc/tftpc_get.c @@ -93,7 +93,7 @@ static inline ssize_t tftp_write(int fd, const uint8_t *buf, size_t len) if (nbyteswritten < 0) { - ndbg("write failed: %d\n", errno); + nerr("write failed: %d\n", errno); return ERROR; } @@ -168,7 +168,7 @@ int tftpget(FAR const char *remote, FAR const char *local, in_addr_t addr, packet = (FAR uint8_t*)zalloc(TFTP_IOBUFSIZE); if (!packet) { - ndbg("packet memory allocation failure\n"); + nerr("packet memory allocation failure\n"); set_errno(ENOMEM); goto errout; } @@ -178,7 +178,7 @@ int tftpget(FAR const char *remote, FAR const char *local, in_addr_t addr, fd = open(local, O_WRONLY|O_CREAT|O_TRUNC, 0666); if (fd < 0) { - ndbg("open failed: %d\n", errno); + nerr("open failed: %d\n", errno); goto errout_with_packet; } diff --git a/netutils/tftpc/tftpc_packets.c b/netutils/tftpc/tftpc_packets.c index ea8a760f3..d4cb5cfc8 100644 --- a/netutils/tftpc/tftpc_packets.c +++ b/netutils/tftpc/tftpc_packets.c @@ -104,7 +104,7 @@ int tftp_sockinit(struct sockaddr_in *server, in_addr_t addr) sd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); if (sd < 0) { - ndbg("socket failed: %d\n", errno); + nerr("socket failed: %d\n", errno); return ERROR; } @@ -115,7 +115,7 @@ int tftp_sockinit(struct sockaddr_in *server, in_addr_t addr) ret = setsockopt(sd, SOL_SOCKET, SO_RCVTIMEO, &timeo, sizeof(struct timeval)); if (ret < 0) { - ndbg("setsockopt failed: %d\n", errno); + nerr("setsockopt failed: %d\n", errno); } /* Initialize the server address structure */ @@ -216,7 +216,7 @@ int tftp_parseerrpacket(const uint8_t *buffer) if (opcode == TFTP_ERR) { - ndbg("ERR message: %s (%d)\n", errmsg, errcode); + nerr("ERR message: %s (%d)\n", errmsg, errcode); return OK; } return ERROR; @@ -261,7 +261,7 @@ ssize_t tftp_recvfrom(int sd, void *buf, size_t len, struct sockaddr_in *from) if (errno == EAGAIN) { - ndbg("recvfrom timed out\n"); + nerr("recvfrom timed out\n"); return ERROR; } @@ -269,7 +269,7 @@ ssize_t tftp_recvfrom(int sd, void *buf, size_t len, struct sockaddr_in *from) else if (errno != EINTR) { - ndbg("recvfrom failed: %d\n", errno); + nerr("recvfrom failed: %d\n", errno); return ERROR; } } @@ -313,7 +313,7 @@ ssize_t tftp_sendto(int sd, const void *buf, size_t len, struct sockaddr_in *to) if (errno != EINTR) { - ndbg("sendto failed: %d\n", errno); + nerr("sendto failed: %d\n", errno); return ERROR; } } diff --git a/netutils/tftpc/tftpc_put.c b/netutils/tftpc/tftpc_put.c index 097d64ecf..4611b8d66 100644 --- a/netutils/tftpc/tftpc_put.c +++ b/netutils/tftpc/tftpc_put.c @@ -95,7 +95,7 @@ static inline ssize_t tftp_read(int fd, uint8_t *buf, size_t buflen) if (nbytesread < 0) { - ndbg("read failed: %d\n", errno); + nerr("read failed: %d\n", errno); return ERROR; } @@ -156,7 +156,7 @@ int tftp_mkdatapacket(int fd, off_t offset, uint8_t *packet, uint16_t blockno) tmp = lseek(fd, offset, SEEK_SET); if (tmp == (off_t)-1) { - ndbg("lseek failed: %d\n", errno); + nerr("lseek failed: %d\n", errno); return ERROR; } @@ -218,15 +218,15 @@ static int tftp_rcvack(int sd, uint8_t *packet, struct sockaddr_in *server, if (nbytes == 0) { - ndbg("Connection lost: %d bytes\n", nbytes); + nerr("Connection lost: %d bytes\n", nbytes); } else if (nbytes > 0) { - ndbg("Short packet: %d bytes\n", nbytes); + nerr("Short packet: %d bytes\n", nbytes); } else { - ndbg("Recveid failure\n"); + nerr("Recveid failure\n"); } /* Break out to bump up the retry count */ @@ -300,7 +300,7 @@ static int tftp_rcvack(int sd, uint8_t *packet, struct sockaddr_in *server, /* We have tried TFTP_RETRIES times */ - ndbg("Timeout, Waiting for ACK\n"); + nerr("Timeout, Waiting for ACK\n"); return ERROR; /* Will never get here */ } @@ -340,7 +340,7 @@ int tftpput(const char *local, const char *remote, in_addr_t addr, bool binary) packet = (uint8_t*)zalloc(TFTP_IOBUFSIZE); if (!packet) { - ndbg("packet memory allocation failure\n"); + nerr("packet memory allocation failure\n"); set_errno(ENOMEM); goto errout; } @@ -350,7 +350,7 @@ int tftpput(const char *local, const char *remote, in_addr_t addr, bool binary) fd = open(local, O_RDONLY); if (fd < 0) { - ndbg("open failed: %d\n", errno); + nerr("open failed: %d\n", errno); goto errout_with_packet; } @@ -386,7 +386,7 @@ int tftpput(const char *local, const char *remote, in_addr_t addr, bool binary) break; } - ndbg("Re-sending request\n"); + nerr("Re-sending request\n"); /* We are going to loop and re-send the request packet. Check the * retry count so that we do not loop forever. @@ -394,7 +394,7 @@ int tftpput(const char *local, const char *remote, in_addr_t addr, bool binary) if (++retry > TFTP_RETRIES) { - ndbg("Retry count exceeded\n"); + nerr("Retry count exceeded\n"); set_errno(ETIMEDOUT); goto errout_with_sd; } @@ -461,7 +461,7 @@ int tftpput(const char *local, const char *remote, in_addr_t addr, bool binary) if (++retry > TFTP_RETRIES) { - ndbg("Retry count exceeded\n"); + nerr("Retry count exceeded\n"); set_errno(ETIMEDOUT); goto errout_with_sd; } diff --git a/netutils/thttpd/fdwatch.c b/netutils/thttpd/fdwatch.c index 1d300aa87..43b08f2cd 100644 --- a/netutils/thttpd/fdwatch.c +++ b/netutils/thttpd/fdwatch.c @@ -63,12 +63,12 @@ #ifdef CONFIG_THTTPD_FDWATCH_DEBUG # ifdef CONFIG_CPP_HAVE_VARARGS -# define fwdbg(format, ...) ndbg(format, ##__VA_ARGS__) +# define fwdbg(format, ...) nerr(format, ##__VA_ARGS__) # define fwllerr(format, ...) nllerr(format, ##__VA_ARGS__) # define fwinfo(format, ...) ninfo(format, ##__VA_ARGS__) # define fwllinfo(format, ...) nllinfo(format, ##__VA_ARGS__) # else -# define fwdbg ndbg +# define fwdbg nerr # define fwllerr nllerr # define fwinfo ninfo # define fwllinfo nllinfo diff --git a/netutils/thttpd/libhttpd.c b/netutils/thttpd/libhttpd.c index 6eefa1090..2157a6828 100644 --- a/netutils/thttpd/libhttpd.c +++ b/netutils/thttpd/libhttpd.c @@ -224,7 +224,7 @@ static int initialize_listen_socket(httpd_sockaddr *saP) #ifdef CONFIG_DEBUG_FEATURES_FEATURES if (!sockaddr_check(saP)) { - ndbg("unknown sockaddr family on listen socket\n"); + nerr("unknown sockaddr family on listen socket\n"); return -1; } #endif @@ -235,7 +235,7 @@ static int initialize_listen_socket(httpd_sockaddr *saP) listen_fd = socket(saP->sin_family, SOCK_STREAM, 0); if (listen_fd < 0) { - ndbg("socket failed: %d\n", errno); + nerr("socket failed: %d\n", errno); return -1; } @@ -244,14 +244,14 @@ static int initialize_listen_socket(httpd_sockaddr *saP) on = 1; if (setsockopt(listen_fd, SOL_SOCKET, SO_REUSEADDR, (char *)&on, sizeof(on)) < 0) { - ndbg("setsockopt(SO_REUSEADDR) failed: %d\n", errno); + nerr("setsockopt(SO_REUSEADDR) failed: %d\n", errno); } /* Bind to it. */ if (bind(listen_fd, (struct sockaddr*)saP, sockaddr_len(saP)) < 0) { - ndbg("bind to %s failed: %d\n", httpd_ntoa(saP), errno); + nerr("bind to %s failed: %d\n", httpd_ntoa(saP), errno); (void)close(listen_fd); return -1; } @@ -261,14 +261,14 @@ static int initialize_listen_socket(httpd_sockaddr *saP) flags = fcntl(listen_fd, F_GETFL, 0); if (flags == -1) { - ndbg("fcntl(F_GETFL) failed: %d\n", errno); + nerr("fcntl(F_GETFL) failed: %d\n", errno); (void)close(listen_fd); return -1; } if (fcntl(listen_fd, F_SETFL, flags | O_NDELAY) < 0) { - ndbg("fcntl(O_NDELAY) failed: %d\n", errno); + nerr("fcntl(O_NDELAY) failed: %d\n", errno); (void)close(listen_fd); return -1; } @@ -277,7 +277,7 @@ static int initialize_listen_socket(httpd_sockaddr *saP) if (listen(listen_fd, CONFIG_THTTPD_LISTEN_BACKLOG) < 0) { - ndbg("listen failed: %d\n", errno); + nerr("listen failed: %d\n", errno); (void)close(listen_fd); return -1; } @@ -297,7 +297,7 @@ static void add_response(httpd_conn *hc, const char *str) if (resplen > CONFIG_THTTPD_IOBUFFERSIZE) { - ndbg("resplen(%d) > buffer size(%d)\n", resplen, CONFIG_THTTPD_IOBUFFERSIZE); + nerr("resplen(%d) > buffer size(%d)\n", resplen, CONFIG_THTTPD_IOBUFFERSIZE); resplen = CONFIG_THTTPD_IOBUFFERSIZE; len = resplen - hc->buflen; } @@ -776,7 +776,7 @@ static int auth_check2(httpd_conn *hc, char *dirname) { /* The file exists but we can't open it? Disallow access. */ - ndbg("%s auth file %s could not be opened: %d\n", + nerr("%s auth file %s could not be opened: %d\n", httpd_ntoa(&hc->client_addr), authpath, errno); httpd_send_err(hc, 403, err403title, "", @@ -1009,7 +1009,7 @@ static int vhost_map(httpd_conn *hc) sz = sizeof(sa); if (getsockname(hc->conn_fd, &sa.sa, &sz) < 0) { - ndbg("getsockname: %d\n", errno); + nerr("getsockname: %d\n", errno); return 0; } hc->vhostname = httpd_ntoa(&sa); @@ -1588,7 +1588,7 @@ static void ls_child(int argc, char **argv) fp = fdopen(hc->conn_fd, "w"); if (fp == NULL) { - ndbg("fdopen: %d\n", errno); + nerr("fdopen: %d\n", errno); INTERNALERROR("fdopen"); httpd_send_err(hc, 500, err500title, "", err500form, hc->encodedurl); httpd_write_response(hc); @@ -1630,7 +1630,7 @@ static void ls_child(int argc, char **argv) if (!names || !nameptrs) { - ndbg("out of memory reallocating directory names\n"); + nerr("out of memory reallocating directory names\n"); exit(1); } @@ -1817,7 +1817,7 @@ static int ls(httpd_conn *hc) dirp = opendir(hc->expnfilename); if (dirp == NULL) { - ndbg("opendir %s: %d\n", hc->expnfilename, errno); + nerr("opendir %s: %d\n", hc->expnfilename, errno); httpd_send_err(hc, 404, err404title, "", err404form, hc->encodedurl); return -1; } @@ -1851,7 +1851,7 @@ static int ls(httpd_conn *hc) (main_t)ls_child, (FAR char * const *)argv); if (child < 0) { - ndbg("task_create: %d\n", errno); + nerr("task_create: %d\n", errno); closedir(dirp); INTERNALERROR("task_create"); httpd_send_err(hc, 500, err500title, "", err500form, hc->encodedurl); @@ -1859,7 +1859,7 @@ static int ls(httpd_conn *hc) } closedir(dirp); - ndbg("spawned indexing task %d for directory '%s'\n", child, hc->expnfilename); + nerr("spawned indexing task %d for directory '%s'\n", child, hc->expnfilename); /* Schedule a kill for the child task, in case it runs too long */ @@ -1867,7 +1867,7 @@ static int ls(httpd_conn *hc) client_data.i = child; if (tmr_create(NULL, cgi_kill, client_data, CONFIG_THTTPD_CGI_TIMELIMIT * 1000L, 0) == NULL) { - ndbg("tmr_create(cgi_kill ls) failed\n"); + nerr("tmr_create(cgi_kill ls) failed\n"); exit(1); } #endif @@ -1918,7 +1918,7 @@ static int check_referer(httpd_conn *hc) cp = ""; } - ndbg("%s non-local referer \"%s%s\" \"%s\"\n", + nerr("%s non-local referer \"%s%s\" \"%s\"\n", httpd_ntoa(&hc->client_addr), cp, hc->encodedurl, hc->referer); httpd_send_err(hc, 403, err403title, "", ERROR_FORM(err403form, @@ -2092,7 +2092,7 @@ FAR httpd_server *httpd_initialize(FAR httpd_sockaddr *sa) hs = (FAR httpd_server *)zalloc(sizeof(httpd_server)); if (!hs) { - ndbg("out of memory allocating an httpd_server\n"); + nerr("out of memory allocating an httpd_server\n"); return NULL; } @@ -2105,7 +2105,7 @@ FAR httpd_server *httpd_initialize(FAR httpd_sockaddr *sa) if (!hs->hostname) { - ndbg("out of memory copying hostname\n"); + nerr("out of memory copying hostname\n"); return NULL; } @@ -2116,7 +2116,7 @@ FAR httpd_server *httpd_initialize(FAR httpd_sockaddr *sa) hs->listen_fd = initialize_listen_socket(sa); if (hs->listen_fd == -1) { - ndbg("Failed to create listen socket\n"); + nerr("Failed to create listen socket\n"); free_httpd_server(hs); return NULL; } @@ -2125,7 +2125,7 @@ FAR httpd_server *httpd_initialize(FAR httpd_sockaddr *sa) /* Done initializing. */ - ndbg("%s starting on port %d\n", CONFIG_THTTPD_SERVER_SOFTWARE, (int)CONFIG_THTTPD_PORT); + nerr("%s starting on port %d\n", CONFIG_THTTPD_SERVER_SOFTWARE, (int)CONFIG_THTTPD_PORT); return hs; } @@ -2204,7 +2204,7 @@ void httpd_send_err(httpd_conn *hc, int status, const char *title, const char *e /* Try virtual host error page. */ - ndbg("title: \"%s\" form: \"%s\"\n", title, form); + nerr("title: \"%s\" form: \"%s\"\n", title, form); #ifdef CONFIG_THTTPD_VHOST if (hc->hostdir[0] != '\0') @@ -2303,14 +2303,14 @@ int httpd_get_conn(httpd_server *hs, int listen_fd, httpd_conn *hc) return GC_NO_MORE; } - ndbg("accept failed: %d\n", errno); + nerr("accept failed: %d\n", errno); return GC_FAIL; } #ifdef CONFIG_DEBUG_FEATURES_FEATURES if (!sockaddr_check(&sa)) { - ndbg("unknown sockaddr family\n"); + nerr("unknown sockaddr family\n"); close(hc->conn_fd); hc->conn_fd = -1; return GC_FAIL; @@ -2788,7 +2788,7 @@ int httpd_parse_request(httpd_conn *hc) { if (strlen(hc->accept) > CONFIG_THTTPD_MAXREALLOC) { - ndbg("%s way too much Accept: data\n", + nerr("%s way too much Accept: data\n", httpd_ntoa(&hc->client_addr)); continue; } @@ -2809,7 +2809,7 @@ int httpd_parse_request(httpd_conn *hc) { if (strlen(hc->accepte) > CONFIG_THTTPD_MAXREALLOC) { - ndbg("%s way too much Accept-Encoding: data\n", + nerr("%s way too much Accept-Encoding: data\n", httpd_ntoa(&hc->client_addr)); continue; } @@ -2833,7 +2833,7 @@ int httpd_parse_request(httpd_conn *hc) cp = &buf[18]; hc->if_modified_since = tdate_parse(cp); if (hc->if_modified_since == (time_t) - 1) - ndbg("unparsable time: %s\n", cp); + nerr("unparsable time: %s\n", cp); } else if (strncasecmp(buf, "Cookie:", 7) == 0) { @@ -2878,7 +2878,7 @@ int httpd_parse_request(httpd_conn *hc) hc->range_if = tdate_parse(cp); if (hc->range_if == (time_t) - 1) { - ndbg("unparsable time: %s\n", cp); + nerr("unparsable time: %s\n", cp); } } else if (strncasecmp(buf, "Content-Type:", 13) == 0) @@ -2940,7 +2940,7 @@ int httpd_parse_request(httpd_conn *hc) ; /* ignore */ else { - ndbg("unknown request header: %s\n", buf); + nerr("unknown request header: %s\n", buf); } #endif /* LOG_UNKNOWN_HEADERS */ } @@ -3058,7 +3058,7 @@ int httpd_parse_request(httpd_conn *hc) #endif else { - ndbg("%s URL \"%s\" goes outside the web tree\n", + nerr("%s URL \"%s\" goes outside the web tree\n", httpd_ntoa(&hc->client_addr), hc->encodedurl); httpd_send_err(hc, 403, err403title, "", ERROR_FORM(err403form, @@ -3152,7 +3152,7 @@ int httpd_start_request(httpd_conn *hc, struct timeval *nowP) if (!(hc->sb.st_mode & (S_IROTH | S_IXOTH))) { - ndbg("%s URL \"%s\" resolves to a non world-readable file\n", + nerr("%s URL \"%s\" resolves to a non world-readable file\n", httpd_ntoa(&hc->client_addr), hc->encodedurl); httpd_send_err(hc, 403, err403title, "", ERROR_FORM(err403form, @@ -3218,7 +3218,7 @@ int httpd_start_request(httpd_conn *hc, struct timeval *nowP) if (!(hc->sb.st_mode & S_IROTH)) { - ndbg("%s URL \"%s\" tried to index a non-readable directory\n", + nerr("%s URL \"%s\" tried to index a non-readable directory\n", httpd_ntoa(&hc->client_addr), hc->encodedurl); httpd_send_err(hc, 403, err403title, "", ERROR_FORM(err403form, @@ -3248,7 +3248,7 @@ int httpd_start_request(httpd_conn *hc, struct timeval *nowP) #else /* CONFIG_THTTPD_GENERATE_INDICES */ /* Indexing is disabled */ - ndbg("%s URL \"%s\" tried to index a directory with indexing disabled\n", + nerr("%s URL \"%s\" tried to index a directory with indexing disabled\n", httpd_ntoa(&hc->client_addr), hc->encodedurl); httpd_send_err(hc, 403, err403title, "", ERROR_FORM(err403form, @@ -3279,7 +3279,7 @@ int httpd_start_request(httpd_conn *hc, struct timeval *nowP) if (!(hc->sb.st_mode & (S_IROTH | S_IXOTH))) { - ndbg("%s URL \"%s\" resolves to a non-world-readable index file\n", + nerr("%s URL \"%s\" resolves to a non-world-readable index file\n", httpd_ntoa(&hc->client_addr), hc->encodedurl); httpd_send_err(hc, 403, err403title, "", ERROR_FORM(err403form, @@ -3315,7 +3315,7 @@ int httpd_start_request(httpd_conn *hc, struct timeval *nowP) { if (strcmp(hc->expnfilename, CONFIG_THTTPD_AUTH_FILE) == 0) { - ndbg("%s URL \"%s\" tried to retrieve an auth file\n", + nerr("%s URL \"%s\" tried to retrieve an auth file\n", httpd_ntoa(&hc->client_addr), hc->encodedurl); httpd_send_err(hc, 403, err403title, "", ERROR_FORM(err403form, @@ -3329,7 +3329,7 @@ int httpd_start_request(httpd_conn *hc, struct timeval *nowP) CONFIG_THTTPD_AUTH_FILE) == 0 && hc->expnfilename[expnlen - sizeof(CONFIG_THTTPD_AUTH_FILE)] == '/') { - ndbg("%s URL \"%s\" tried to retrieve an auth file\n", + nerr("%s URL \"%s\" tried to retrieve an auth file\n", httpd_ntoa(&hc->client_addr), hc->encodedurl); httpd_send_err(hc, 403, err403title, "", ERROR_FORM(err403form, @@ -3360,7 +3360,7 @@ int httpd_start_request(httpd_conn *hc, struct timeval *nowP) if (hc->sb.st_mode & S_IXOTH) { - ndbg("%s URL \"%s\" is executable but isn't CGI\n", + nerr("%s URL \"%s\" is executable but isn't CGI\n", httpd_ntoa(&hc->client_addr), hc->encodedurl); httpd_send_err(hc, 403, err403title, "", ERROR_FORM(err403form, @@ -3371,7 +3371,7 @@ int httpd_start_request(httpd_conn *hc, struct timeval *nowP) if (hc->pathinfo[0] != '\0') { - ndbg("%s URL \"%s\" has pathinfo but isn't CGI\n", + nerr("%s URL \"%s\" has pathinfo but isn't CGI\n", httpd_ntoa(&hc->client_addr), hc->encodedurl); httpd_send_err(hc, 403, err403title, "", ERROR_FORM(err403form, @@ -3465,7 +3465,7 @@ int httpd_read(int fd, const void *buf, size_t nbytes) } else if (errno != EINTR) { - ndbg("Error sending: %d\n", errno); + nerr("Error sending: %d\n", errno); return nread; } } @@ -3497,7 +3497,7 @@ int httpd_write(int fd, const void *buf, size_t nbytes) } else if (errno != EINTR) { - ndbg("Error sending: %d\n", errno); + nerr("Error sending: %d\n", errno); return nwritten; } } diff --git a/netutils/thttpd/thttpd.c b/netutils/thttpd/thttpd.c index f2b657d51..425bba4e7 100644 --- a/netutils/thttpd/thttpd.c +++ b/netutils/thttpd/thttpd.c @@ -194,7 +194,7 @@ static int handle_newconnect(FAR struct timeval *tv, int listen_fd) * back here. */ - ndbg("No free connections\n"); + nerr("No free connections\n"); tmr_run(tv); return -1; } @@ -206,7 +206,7 @@ static int handle_newconnect(FAR struct timeval *tv, int listen_fd) conn->hc = NEW(httpd_conn, 1); if (conn->hc == NULL) { - ndbg("out of memory allocating an httpd_conn\n"); + nerr("out of memory allocating an httpd_conn\n"); exit(1); } @@ -294,7 +294,7 @@ static void handle_read(struct connect_s *conn, struct timeval *tv) return; } - ndbg("read(fd=%d) failed: %d\n", hc->conn_fd, errno); + nerr("read(fd=%d) failed: %d\n", hc->conn_fd, errno); BADREQUEST("read"); goto errout_with_400; } @@ -372,7 +372,7 @@ static void handle_read(struct connect_s *conn, struct timeval *tv) actual = lseek(hc->file_fd, conn->offset, SEEK_SET); if (actual != conn->offset) { - ndbg("fseek to %d failed: offset=%d errno=%d\n", conn->offset, actual, errno); + nerr("fseek to %d failed: offset=%d errno=%d\n", conn->offset, actual, errno); BADREQUEST("lseek"); goto errout_with_400; } @@ -434,7 +434,7 @@ static void handle_send(struct connect_s *conn, struct timeval *tv) nread = read_buffer(conn); if (nread < 0) { - ndbg("File read error: %d\n", errno); + nerr("File read error: %d\n", errno); goto errout_clear_connection; } ninfo("Read %d bytes, buflen %d\n", nread, hc->buflen); @@ -450,7 +450,7 @@ static void handle_send(struct connect_s *conn, struct timeval *tv) nwritten = httpd_write(hc->conn_fd, hc->buffer, hc->buflen); if (nwritten < 0) { - ndbg("Error sending %s: %d\n", hc->encodedurl, errno); + nerr("Error sending %s: %d\n", hc->encodedurl, errno); goto errout_clear_connection; } @@ -476,7 +476,7 @@ static void handle_send(struct connect_s *conn, struct timeval *tv) return; errout_clear_connection: - ndbg("Clear connection\n"); + nerr("Clear connection\n"); clear_connection(conn, tv); return; } @@ -556,7 +556,7 @@ static void clear_connection(struct connect_s *conn, struct timeval *tv) { return; } - ndbg("tmr_create(linger_clear_connection) failed\n"); + nerr("tmr_create(linger_clear_connection) failed\n"); } /* Either we are done lingering, we shouldn't linger, or we failed to setup the linger */ @@ -594,7 +594,7 @@ static void idle(ClientData client_data, struct timeval *nowP) case CNST_READING: if (nowP->tv_sec - conn->active_at >= CONFIG_THTTPD_IDLE_READ_LIMIT_SEC) { - ndbg("%s connection timed out reading\n", httpd_ntoa(&conn->hc->client_addr)); + nerr("%s connection timed out reading\n", httpd_ntoa(&conn->hc->client_addr)); httpd_send_err(conn->hc, 408, httpd_err408title, "", httpd_err408form, ""); finish_connection(conn, nowP); @@ -604,7 +604,7 @@ static void idle(ClientData client_data, struct timeval *nowP) case CNST_SENDING: if (nowP->tv_sec - conn->active_at >= CONFIG_THTTPD_IDLE_SEND_LIMIT_SEC) { - ndbg("%s connection timed out sending\n", httpd_ntoa(&conn->hc->client_addr)); + nerr("%s connection timed out sending\n", httpd_ntoa(&conn->hc->client_addr)); clear_connection(conn, nowP); } break; @@ -682,7 +682,7 @@ int thttpd_main(int argc, char **argv) fw = fdwatch_initialize(CONFIG_NSOCKET_DESCRIPTORS); if (!fw) { - ndbg("fdwatch initialization failure\n"); + nerr("fdwatch initialization failure\n"); exit(1); } @@ -691,7 +691,7 @@ int thttpd_main(int argc, char **argv) #ifdef CONFIG_THTTPD_DATADIR if (chdir(CONFIG_THTTPD_DATADIR) < 0) { - ndbg("chdir to %s: %d\n", CONFIG_THTTPD_DATADIR, errno); + nerr("chdir to %s: %d\n", CONFIG_THTTPD_DATADIR, errno); exit(1); } #endif @@ -706,7 +706,7 @@ int thttpd_main(int argc, char **argv) hs = httpd_initialize(&sa); if (!hs) { - ndbg("httpd_initialize() failed\n"); + nerr("httpd_initialize() failed\n"); exit(1); } @@ -714,7 +714,7 @@ int thttpd_main(int argc, char **argv) if (tmr_create(NULL, occasional, JunkClientData, CONFIG_THTTPD_OCCASIONAL_MSEC * 1000L, 1) == NULL) { - ndbg("tmr_create(occasional) failed\n"); + nerr("tmr_create(occasional) failed\n"); exit(1); } @@ -722,7 +722,7 @@ int thttpd_main(int argc, char **argv) if (tmr_create(NULL, idle, JunkClientData, 5 * 1000L, 1) == NULL) { - ndbg("tmr_create(idle) failed\n"); + nerr("tmr_create(idle) failed\n"); exit(1); } @@ -732,7 +732,7 @@ int thttpd_main(int argc, char **argv) connects = NEW(struct connect_s, AVAILABLE_FDS); if (connects == NULL) { - ndbg("Out of memory allocating a struct connect_s\n"); + nerr("Out of memory allocating a struct connect_s\n"); exit(1); } @@ -772,7 +772,7 @@ int thttpd_main(int argc, char **argv) continue; } - ndbg("fdwatch failed: %d\n", errno); + nerr("fdwatch failed: %d\n", errno); exit(1); } @@ -855,7 +855,7 @@ int thttpd_main(int argc, char **argv) /* The main loop terminated */ shut_down(); - ndbg("Exiting\n"); + nerr("Exiting\n"); exit(0); } diff --git a/netutils/thttpd/thttpd_alloc.c b/netutils/thttpd/thttpd_alloc.c index 63145f5be..1f04a4727 100644 --- a/netutils/thttpd/thttpd_alloc.c +++ b/netutils/thttpd/thttpd_alloc.c @@ -82,7 +82,7 @@ void httpd_memstats(void) { static struct mallinfo mm; - ndbg("%d allocations (%lu bytes), %d freed\n", g_nallocations, (unsigned long)g_allocated, g_nfreed); + nerr("%d allocations (%lu bytes), %d freed\n", g_nallocations, (unsigned long)g_allocated, g_nfreed); /* Get the current memory usage */ @@ -91,7 +91,7 @@ void httpd_memstats(void) #else (void)mallinfo(&mm); #endif - ndbg("arena: %08x ordblks: %08x mxordblk: %08x uordblks: %08x fordblks: %08x\n", + nerr("arena: %08x ordblks: %08x mxordblk: %08x uordblks: %08x fordblks: %08x\n", mm.arena, mm.ordblks, mm.mxordblk, mm.uordblks, mm.fordblks); } #endif @@ -106,7 +106,7 @@ FAR void *httpd_malloc(size_t nbytes) void *ptr = malloc(nbytes); if (!ptr) { - ndbg("Allocation of %d bytes failed\n", nbytes); + nerr("Allocation of %d bytes failed\n", nbytes); } else { @@ -125,7 +125,7 @@ FAR void *httpd_realloc(FAR void *oldptr, size_t oldsize, size_t newsize) void *ptr = realloc(oldptr, newsize); if (!ptr) { - ndbg("Re-allocation from %d to %d bytes failed\n", + nerr("Re-allocation from %d to %d bytes failed\n", oldsize, newsize); } else @@ -155,7 +155,7 @@ FAR char *httpd_strdup(const char *str) FAR char *newstr = strdup(str); if (!newstr) { - ndbg("strdup of %s failed\n", str); + nerr("strdup of %s failed\n", str); } else { @@ -191,7 +191,7 @@ void httpd_realloc_str(char **pstr, size_t *maxsize, size_t size) if (!*pstr) { - ndbg("out of memory reallocating a string to %d bytes\n", *maxsize); + nerr("out of memory reallocating a string to %d bytes\n", *maxsize); exit(1); } } diff --git a/netutils/thttpd/thttpd_cgi.c b/netutils/thttpd/thttpd_cgi.c index 341386abc..a04ef07da 100644 --- a/netutils/thttpd/thttpd_cgi.c +++ b/netutils/thttpd/thttpd_cgi.c @@ -1034,13 +1034,13 @@ int cgi(httpd_conn *hc) (main_t)cgi_child, (FAR char * const *)argv); if (child < 0) { - ndbg("task_create: %d\n", errno); + nerr("task_create: %d\n", errno); INTERNALERROR("task_create"); httpd_send_err(hc, 500, err500title, "", err500form, hc->encodedurl); goto errout_with_sem; } - ndbg("Started CGI task %d for file '%s'\n", child, hc->expnfilename); + nerr("Started CGI task %d for file '%s'\n", child, hc->expnfilename); /* Wait for the CGI threads to become initialized */ diff --git a/netutils/webclient/webclient.c b/netutils/webclient/webclient.c index df91a112d..2e8a283c5 100644 --- a/netutils/webclient/webclient.c +++ b/netutils/webclient/webclient.c @@ -396,12 +396,12 @@ static int wget_gethostip(FAR char *hostname, in_addr_t *ipv4addr) he = gethostbyname(hostname); if (he == NULL) { - ndbg("gethostbyname failed: %d\n", h_errno); + nerr("gethostbyname failed: %d\n", h_errno); return -ENOENT; } else if (he->h_addrtype != AF_INET) { - ndbg("gethostbyname returned an address of type: %d\n", he->h_addrtype); + nerr("gethostbyname returned an address of type: %d\n", he->h_addrtype); return -ENOEXEC; } @@ -465,7 +465,7 @@ static int wget_base(FAR const char *url, FAR char *buffer, int buflen, ws.filename, CONFIG_WEBCLIENT_MAXFILENAME); if (ret != 0) { - ndbg("ERROR: Malformed HTTP URL: %s\n", url); + nerr("ERROR: Malformed HTTP URL: %s\n", url); set_errno(-ret); return ERROR; } @@ -493,7 +493,7 @@ static int wget_base(FAR const char *url, FAR char *buffer, int buflen, { /* socket failed. It will set the errno appropriately */ - ndbg("ERROR: socket failed: %d\n", errno); + nerr("ERROR: socket failed: %d\n", errno); return ERROR; } @@ -516,7 +516,7 @@ static int wget_base(FAR const char *url, FAR char *buffer, int buflen, { /* Could not resolve host (or malformed IP address) */ - ndbg("ERROR: Failed to resolve hostname\n"); + nerr("ERROR: Failed to resolve hostname\n"); ret = -EHOSTUNREACH; goto errout_with_errno; } @@ -529,7 +529,7 @@ static int wget_base(FAR const char *url, FAR char *buffer, int buflen, ret = connect(sockfd, (struct sockaddr *)&server, sizeof(struct sockaddr_in)); if (ret < 0) { - ndbg("ERROR: connect failed: %d\n", errno); + nerr("ERROR: connect failed: %d\n", errno); goto errout; } @@ -584,7 +584,7 @@ static int wget_base(FAR const char *url, FAR char *buffer, int buflen, ret = send(sockfd, buffer, len, 0); if (ret < 0) { - ndbg("ERROR: send failed: %d\n", errno); + nerr("ERROR: send failed: %d\n", errno); goto errout; } @@ -600,7 +600,7 @@ static int wget_base(FAR const char *url, FAR char *buffer, int buflen, ws.datend = recv(sockfd, ws.buffer, ws.buflen, 0); if (ws.datend < 0) { - ndbg("ERROR: recv failed: %d\n", errno); + nerr("ERROR: recv failed: %d\n", errno); ret = ws.datend; goto errout_with_errno; } diff --git a/netutils/webserver/httpd.c b/netutils/webserver/httpd.c index 2f73d99af..b0ed45204 100644 --- a/netutils/webserver/httpd.c +++ b/netutils/webserver/httpd.c @@ -516,7 +516,7 @@ static int httpd_sendfile(struct httpd_state *pstate) if (httpd_openindex(pstate) != OK) { - ndbg("[%d] '%s' not found\n", pstate->ht_sockfd, pstate->ht_filename); + nerr("[%d] '%s' not found\n", pstate->ht_sockfd, pstate->ht_filename); return httpd_senderror(pstate, 404); } @@ -577,7 +577,7 @@ static inline int httpd_parse(struct httpd_state *pstate) if (o == pstate->ht_buffer + sizeof pstate->ht_buffer) { - ndbg("[%d] ht_buffer overflow\n"); + nerr("[%d] ht_buffer overflow\n"); return 413; } @@ -588,20 +588,20 @@ static inline int httpd_parse(struct httpd_state *pstate) sizeof pstate->ht_buffer - (o - pstate->ht_buffer), 0); if (r == 0) { - ndbg("[%d] connection lost\n", pstate->ht_sockfd); + nerr("[%d] connection lost\n", pstate->ht_sockfd); return ERROR; } #if CONFIG_NETUTILS_HTTPD_TIMEOUT > 0 if (r == -1 && errno == EWOULDBLOCK) { - ndbg("[%d] recv timeout\n"); + nerr("[%d] recv timeout\n"); return 408; } #endif if (r == -1) { - ndbg("[%d] recv failed: %d\n", pstate->ht_sockfd, errno); + nerr("[%d] recv failed: %d\n", pstate->ht_sockfd, errno); return 400; } @@ -625,7 +625,7 @@ static inline int httpd_parse(struct httpd_state *pstate) if (*end != '\n') { - ndbg("[%d] expected CRLF\n"); + nerr("[%d] expected CRLF\n"); return 400; } @@ -638,7 +638,7 @@ static inline int httpd_parse(struct httpd_state *pstate) case STATE_METHOD: if (0 != strncmp(start, "GET ", 4)) { - ndbg("[%d] method not supported\n"); + nerr("[%d] method not supported\n"); return 501; } @@ -647,7 +647,7 @@ static inline int httpd_parse(struct httpd_state *pstate) if (0 != strcmp(v, " HTTP/1.0") && 0 != strcmp(v, " HTTP/1.1")) { - ndbg("[%d] HTTP version not supported\n"); + nerr("[%d] HTTP version not supported\n"); return 505; } @@ -655,7 +655,7 @@ static inline int httpd_parse(struct httpd_state *pstate) if (v - start >= sizeof pstate->ht_filename) { - ndbg("[%d] ht_filename overflow\n"); + nerr("[%d] ht_filename overflow\n"); return 414; } @@ -680,7 +680,7 @@ static inline int httpd_parse(struct httpd_state *pstate) if (*start == '\0' || *v == '\0') { - ndbg("[%d] header parse error\n"); + nerr("[%d] header parse error\n"); return 400; } @@ -688,7 +688,7 @@ static inline int httpd_parse(struct httpd_state *pstate) if (0 == strcasecmp(start, "Content-Length") && 0 != atoi(v)) { - ndbg("[%d] non-zero request length\n"); + nerr("[%d] non-zero request length\n"); return 413; } #ifndef CONFIG_NETUTILS_HTTPD_KEEPALIVE_DISABLE @@ -815,7 +815,7 @@ static void single_server(uint16_t portno, pthread_startroutine_t handler, int s if (acceptsd < 0) { - ndbg("accept failure: %d\n", errno); + nerr("accept failure: %d\n", errno); break; } @@ -829,7 +829,7 @@ static void single_server(uint16_t portno, pthread_startroutine_t handler, int s if (setsockopt(acceptsd, SOL_SOCKET, SO_LINGER, &ling, sizeof(struct linger)) < 0) { close(acceptsd); - ndbg("setsockopt SO_LINGER failure: %d\n", errno); + nerr("setsockopt SO_LINGER failure: %d\n", errno); break;; } #endif @@ -842,7 +842,7 @@ static void single_server(uint16_t portno, pthread_startroutine_t handler, int s if (setsockopt(acceptsd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(struct timeval)) < 0) { close(acceptsd); - ndbg("setsockopt SO_RCVTIMEO failure: %d\n", errno); + nerr("setsockopt SO_RCVTIMEO failure: %d\n", errno); break;; } #endif diff --git a/nshlib/nsh_console.c b/nshlib/nsh_console.c index 390eb2ec8..04e1eec11 100644 --- a/nshlib/nsh_console.c +++ b/nshlib/nsh_console.c @@ -183,7 +183,7 @@ static ssize_t nsh_consolewrite(FAR struct nsh_vtbl_s *vtbl, ret = fwrite(buffer, 1, nbytes, pstate->cn_outstream); if (ret < 0) { - dbg("[%d] Failed to send buffer: %d\n", pstate->cn_outfd, errno); + err("[%d] Failed to send buffer: %d\n", pstate->cn_outfd, errno); } return ret; #else diff --git a/nshlib/nsh_fscmds.c b/nshlib/nsh_fscmds.c index df2fda8e1..b60e6a7e5 100644 --- a/nshlib/nsh_fscmds.c +++ b/nshlib/nsh_fscmds.c @@ -1293,7 +1293,7 @@ int cmd_mkrd(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) #ifdef CONFIG_DEBUG_INFO memset(buffer, 0, sectsize * nsectors); #endif - dbg("RAMDISK at %p\n", buffer); + info("RAMDISK at %p\n", buffer); /* Then register the ramdisk */ diff --git a/nshlib/nsh_netcmds.c b/nshlib/nsh_netcmds.c index 956b3c88c..3ee906ab4 100644 --- a/nshlib/nsh_netcmds.c +++ b/nshlib/nsh_netcmds.c @@ -475,7 +475,7 @@ static int nsh_gethostip(FAR char *hostname, FAR union ip_addr_u *ipaddr, he = gethostbyname(hostname); if (he == NULL) { - ndbg("gethostbyname failed: %d\n", h_errno); + nerr("gethostbyname failed: %d\n", h_errno); return -ENOENT; } @@ -483,7 +483,7 @@ static int nsh_gethostip(FAR char *hostname, FAR union ip_addr_u *ipaddr, else if (he->h_addrtype != addrtype) { - ndbg("gethostbyname returned an address of type: %d\n", he->h_addrtype); + nerr("gethostbyname returned an address of type: %d\n", he->h_addrtype); return -ENOEXEC; } else if (addrtype == AF_INET) @@ -499,7 +499,7 @@ static int nsh_gethostip(FAR char *hostname, FAR union ip_addr_u *ipaddr, else if (he->h_addrtype != AF_INET) { - ndbg("gethostbyname returned an address of type: %d\n", he->h_addrtype); + nerr("gethostbyname returned an address of type: %d\n", he->h_addrtype); return -ENOEXEC; } else @@ -511,7 +511,7 @@ static int nsh_gethostip(FAR char *hostname, FAR union ip_addr_u *ipaddr, else if (he->h_addrtype != AF_INET6) { - ndbg("gethostbyname returned an address of type: %d\n", he->h_addrtype); + nerr("gethostbyname returned an address of type: %d\n", he->h_addrtype); return -ENOEXEC; } else @@ -886,7 +886,7 @@ int cmd_ifconfig(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) if (hw) { - ndbg("HW MAC: %s\n", hw); + nerr("HW MAC: %s\n", hw); netlib_setmacaddr(intf, mac); } #endif @@ -915,7 +915,7 @@ int cmd_ifconfig(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) { /* Set DHCP addr */ - ndbg("DHCPC Mode\n"); + nerr("DHCPC Mode\n"); gip = addr.s_addr = 0; } else @@ -923,7 +923,7 @@ int cmd_ifconfig(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) { /* Set host IP address */ - ndbg("Host IP: %s\n", hostip); + nerr("Host IP: %s\n", hostip); gip = addr.s_addr = inet_addr(hostip); } @@ -950,14 +950,14 @@ int cmd_ifconfig(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) if (gwip) { - ndbg("Gateway: %s\n", gwip); + nerr("Gateway: %s\n", gwip); gip = addr.s_addr = inet_addr(gwip); } else { if (gip) { - ndbg("Gateway: default\n"); + nerr("Gateway: default\n"); gip = NTOHL(gip); gip &= ~0x000000ff; gip |= 0x00000001; @@ -990,12 +990,12 @@ int cmd_ifconfig(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) { if (mask) { - ndbg("Netmask: %s\n",mask); + nerr("Netmask: %s\n",mask); addr.s_addr = inet_addr(mask); } else { - ndbg("Netmask: Default\n"); + nerr("Netmask: Default\n"); addr.s_addr = inet_addr("255.255.255.0"); } @@ -1020,12 +1020,12 @@ int cmd_ifconfig(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) { if (dns) { - ndbg("DNS: %s\n", dns); + nerr("DNS: %s\n", dns); addr.s_addr = inet_addr(dns); } else { - ndbg("DNS: Default\n"); + nerr("DNS: Default\n"); addr.s_addr = gip; } diff --git a/nshlib/nsh_netinit.c b/nshlib/nsh_netinit.c index 0643d2c0e..fcd1f5f16 100644 --- a/nshlib/nsh_netinit.c +++ b/nshlib/nsh_netinit.c @@ -413,7 +413,7 @@ static int nsh_netinit_monitor(void) ret = -errno; DEBUGASSERT(ret < 0); - ndbg("ERROR: Failed to create a socket: %d\n", ret); + nerr("ERROR: Failed to create a socket: %d\n", ret); goto errout; } @@ -428,7 +428,7 @@ static int nsh_netinit_monitor(void) ret = -errno; DEBUGASSERT(ret < 0); - ndbg("ERROR: sigaction() failed: %d\n", ret); + nerr("ERROR: sigaction() failed: %d\n", ret); goto errout_with_socket; } @@ -450,7 +450,7 @@ static int nsh_netinit_monitor(void) ret = -errno; DEBUGASSERT(ret < 0); - ndbg("ERROR: ioctl(SIOCMIINOTIFY) failed: %d\n", ret); + nerr("ERROR: ioctl(SIOCMIINOTIFY) failed: %d\n", ret); goto errout_with_sigaction; } @@ -462,7 +462,7 @@ static int nsh_netinit_monitor(void) ret = -errno; DEBUGASSERT(ret < 0); - ndbg("ERROR: ioctl(SIOCGIFFLAGS) failed: %d\n", ret); + nerr("ERROR: ioctl(SIOCGIFFLAGS) failed: %d\n", ret); goto errout_with_notification; } @@ -481,7 +481,7 @@ static int nsh_netinit_monitor(void) ret = -errno; DEBUGASSERT(ret < 0); - ndbg("ERROR: ioctl(SIOCGMIIPHY) failed: %d\n", ret); + nerr("ERROR: ioctl(SIOCGMIIPHY) failed: %d\n", ret); goto errout_with_notification; } @@ -495,7 +495,7 @@ static int nsh_netinit_monitor(void) ret = -errno; DEBUGASSERT(ret < 0); - ndbg("ERROR: ioctl(SIOCGMIIREG) failed: %d\n", ret); + nerr("ERROR: ioctl(SIOCGMIIREG) failed: %d\n", ret); goto errout_with_notification; } @@ -523,7 +523,7 @@ static int nsh_netinit_monitor(void) ret = -errno; DEBUGASSERT(ret < 0); - ndbg("ERROR: ioctl(SIOCSIFFLAGS) failed: %d\n", ret); + nerr("ERROR: ioctl(SIOCSIFFLAGS) failed: %d\n", ret); goto errout_with_notification; } @@ -561,7 +561,7 @@ static int nsh_netinit_monitor(void) ret = -errno; DEBUGASSERT(ret < 0); - ndbg("ERROR: ioctl(SIOCSIFFLAGS) failed: %d\n", ret); + nerr("ERROR: ioctl(SIOCSIFFLAGS) failed: %d\n", ret); goto errout_with_notification; } } @@ -600,7 +600,7 @@ errout_with_sigaction: errout_with_socket: close(sd); errout: - ndbg("Aborting\n"); + nerr("Aborting\n"); return ret; } #endif @@ -666,7 +666,7 @@ int nsh_netinit(void) ret = pthread_create(&tid, &attr, nsh_netinit_thread, NULL); if (ret != OK) { - ndbg("ERROR: Failed to create netinit thread: %d\n", ret); + nerr("ERROR: Failed to create netinit thread: %d\n", ret); (void)nsh_netinit_thread(NULL); } else diff --git a/nshlib/nsh_parse.c b/nshlib/nsh_parse.c index 30f7ef536..2d5701728 100644 --- a/nshlib/nsh_parse.c +++ b/nshlib/nsh_parse.c @@ -363,7 +363,7 @@ static pthread_addr_t nsh_child(pthread_addr_t arg) struct cmdarg_s *carg = (struct cmdarg_s *)arg; int ret; - dbg("BG %s\n", carg->argv[0]); + info("BG %s\n", carg->argv[0]); /* Execute the specified command on the child thread */ @@ -371,7 +371,7 @@ static pthread_addr_t nsh_child(pthread_addr_t arg) /* Released the cloned arguments */ - dbg("BG %s complete\n", carg->argv[0]); + info("BG %s complete\n", carg->argv[0]); nsh_releaseargs(carg); return (pthread_addr_t)((uintptr_t)ret); } diff --git a/nshlib/nsh_romfsetc.c b/nshlib/nsh_romfsetc.c index 3e3ff3544..314a412cc 100644 --- a/nshlib/nsh_romfsetc.c +++ b/nshlib/nsh_romfsetc.c @@ -103,7 +103,7 @@ int nsh_romfsetc(void) NSECTORS(romfs_img_len), CONFIG_NSH_ROMFSSECTSIZE); if (ret < 0) { - dbg("nsh: romdisk_register failed: %d\n", -ret); + err("nsh: romdisk_register failed: %d\n", -ret); return ERROR; } @@ -115,7 +115,7 @@ int nsh_romfsetc(void) ret = mount(MOUNT_DEVNAME, CONFIG_NSH_ROMFSMOUNTPT, "romfs", MS_RDONLY, NULL); if (ret < 0) { - dbg("nsh: mount(%s,%s,romfs) failed: %d\n", + err("nsh: mount(%s,%s,romfs) failed: %d\n", MOUNT_DEVNAME, CONFIG_NSH_ROMFSMOUNTPT, errno); return ERROR; } diff --git a/nshlib/nsh_telnetd.c b/nshlib/nsh_telnetd.c index b80bc72be..8ea7ff083 100644 --- a/nshlib/nsh_telnetd.c +++ b/nshlib/nsh_telnetd.c @@ -67,7 +67,7 @@ static int nsh_telnetmain(int argc, char *argv[]) DEBUGASSERT(pstate != NULL); vtbl = &pstate->cn_vtbl; - dbg("Session [%d] Started\n", getpid()); + info("Session [%d] Started\n", getpid()); #ifdef CONFIG_NSH_TELNET_LOGIN /* Login User and Password Check */ @@ -205,7 +205,7 @@ int nsh_telnetstart(void) ret = telnetd_start(&config); if (ret < 0) { - dbg("Failed to tart the Telnet daemon: %d\n", ret); + err("Failed to tart the Telnet daemon: %d\n", ret); } return ret; diff --git a/platform/arduino-due/sam_cxxinitialize.c b/platform/arduino-due/sam_cxxinitialize.c index 298d08cf4..7799dbd5c 100644 --- a/platform/arduino-due/sam_cxxinitialize.c +++ b/platform/arduino-due/sam_cxxinitialize.c @@ -58,7 +58,7 @@ #endif #ifdef CONFIG_DEBUG_CXX -# define cxxdbg dbg +# define cxxerr err # define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info @@ -68,7 +68,7 @@ # define cxxllinfo(x...) # endif #else -# define cxxdbg(x...) +# define cxxerr(x...) # define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) @@ -126,7 +126,7 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ @@ -134,7 +134,7 @@ void up_cxxinitialize(void) for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxdbg("initp: %p initializer: %p\n", initp, initializer); + cxxerr("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +144,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxdbg("Calling %p\n", initializer); + cxxerr("Calling %p\n", initializer); initializer(); } } diff --git a/platform/cloudctrl/stm32_cxxinitialize.c b/platform/cloudctrl/stm32_cxxinitialize.c index 08703feb0..dff5a6ee2 100644 --- a/platform/cloudctrl/stm32_cxxinitialize.c +++ b/platform/cloudctrl/stm32_cxxinitialize.c @@ -59,7 +59,7 @@ #endif #ifdef CONFIG_DEBUG_CXX -# define cxxdbg dbg +# define cxxerr err # define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info @@ -69,7 +69,7 @@ # define cxxllinfo(x...) # endif #else -# define cxxdbg(x...) +# define cxxerr(x...) # define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) @@ -127,7 +127,7 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ @@ -135,7 +135,7 @@ void up_cxxinitialize(void) for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxdbg("initp: %p initializer: %p\n", initp, initializer); + cxxerr("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -145,7 +145,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxdbg("Calling %p\n", initializer); + cxxerr("Calling %p\n", initializer); initializer(); } } diff --git a/platform/fire-stm32v2/stm32_cxxinitialize.c b/platform/fire-stm32v2/stm32_cxxinitialize.c index 2da95e1b4..3fc4ca107 100644 --- a/platform/fire-stm32v2/stm32_cxxinitialize.c +++ b/platform/fire-stm32v2/stm32_cxxinitialize.c @@ -58,7 +58,7 @@ #endif #ifdef CONFIG_DEBUG_CXX -# define cxxdbg dbg +# define cxxerr err # define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info @@ -68,7 +68,7 @@ # define cxxllinfo(x...) # endif #else -# define cxxdbg(x...) +# define cxxerr(x...) # define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) @@ -126,7 +126,7 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ @@ -134,7 +134,7 @@ void up_cxxinitialize(void) for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxdbg("initp: %p initializer: %p\n", initp, initializer); + cxxerr("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +144,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxdbg("Calling %p\n", initializer); + cxxerr("Calling %p\n", initializer); initializer(); } } diff --git a/platform/mikroe-stm32f4/stm32_cxxinitialize.c b/platform/mikroe-stm32f4/stm32_cxxinitialize.c index 46820cfa3..2f2083b3b 100644 --- a/platform/mikroe-stm32f4/stm32_cxxinitialize.c +++ b/platform/mikroe-stm32f4/stm32_cxxinitialize.c @@ -58,7 +58,7 @@ #endif #ifdef CONFIG_DEBUG_CXX -# define cxxdbg dbg +# define cxxerr err # define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info @@ -68,7 +68,7 @@ # define cxxllinfo(x...) # endif #else -# define cxxdbg(x...) +# define cxxerr(x...) # define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) @@ -126,7 +126,7 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ @@ -134,7 +134,7 @@ void up_cxxinitialize(void) for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxdbg("initp: %p initializer: %p\n", initp, initializer); + cxxerr("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +144,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxdbg("Calling %p\n", initializer); + cxxerr("Calling %p\n", initializer); initializer(); } } diff --git a/platform/nucleo-144/stm32_cxxinitialize.c b/platform/nucleo-144/stm32_cxxinitialize.c index 4dcffedcf..62c05c4aa 100644 --- a/platform/nucleo-144/stm32_cxxinitialize.c +++ b/platform/nucleo-144/stm32_cxxinitialize.c @@ -59,7 +59,7 @@ #endif #ifdef CONFIG_DEBUG_CXX -# define cxxdbg dbg +# define cxxerr err # define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info @@ -69,7 +69,7 @@ # define cxxllinfo(x...) # endif #else -# define cxxdbg(x...) +# define cxxerr(x...) # define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) @@ -127,7 +127,7 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ @@ -135,7 +135,7 @@ void up_cxxinitialize(void) for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxdbg("initp: %p initializer: %p\n", initp, initializer); + cxxerr("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -145,7 +145,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxdbg("Calling %p\n", initializer); + cxxerr("Calling %p\n", initializer); initializer(); } } diff --git a/platform/nucleo-f303re/stm32_cxxinitialize.c b/platform/nucleo-f303re/stm32_cxxinitialize.c index 5b36cf735..c6f1a621e 100644 --- a/platform/nucleo-f303re/stm32_cxxinitialize.c +++ b/platform/nucleo-f303re/stm32_cxxinitialize.c @@ -58,7 +58,7 @@ #endif #ifdef CONFIG_DEBUG_CXX -# define cxxdbg dbg +# define cxxerr err # define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info @@ -68,7 +68,7 @@ # define cxxllinfo(x...) # endif #else -# define cxxdbg(x...) +# define cxxerr(x...) # define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) @@ -126,7 +126,7 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ @@ -134,7 +134,7 @@ void up_cxxinitialize(void) for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxdbg("initp: %p initializer: %p\n", initp, initializer); + cxxerr("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +144,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxdbg("Calling %p\n", initializer); + cxxerr("Calling %p\n", initializer); initializer(); } } diff --git a/platform/nucleo-f4x1re/stm32_cxxinitialize.c b/platform/nucleo-f4x1re/stm32_cxxinitialize.c index a42e5b48b..430468585 100644 --- a/platform/nucleo-f4x1re/stm32_cxxinitialize.c +++ b/platform/nucleo-f4x1re/stm32_cxxinitialize.c @@ -58,7 +58,7 @@ #endif #ifdef CONFIG_DEBUG_CXX -# define cxxdbg dbg +# define cxxerr err # define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info @@ -68,7 +68,7 @@ # define cxxllinfo(x...) # endif #else -# define cxxdbg(x...) +# define cxxerr(x...) # define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) @@ -126,7 +126,7 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ @@ -134,7 +134,7 @@ void up_cxxinitialize(void) for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxdbg("initp: %p initializer: %p\n", initp, initializer); + cxxerr("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +144,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxdbg("Calling %p\n", initializer); + cxxerr("Calling %p\n", initializer); initializer(); } } diff --git a/platform/nucleo-l476rg/stm32_cxxinitialize.c b/platform/nucleo-l476rg/stm32_cxxinitialize.c index fcdd4f9d6..64d56d64c 100644 --- a/platform/nucleo-l476rg/stm32_cxxinitialize.c +++ b/platform/nucleo-l476rg/stm32_cxxinitialize.c @@ -58,7 +58,7 @@ #endif #ifdef CONFIG_DEBUG_CXX -# define cxxdbg dbg +# define cxxerr err # define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info @@ -68,7 +68,7 @@ # define cxxllinfo(x...) # endif #else -# define cxxdbg(x...) +# define cxxerr(x...) # define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) @@ -126,7 +126,7 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ @@ -134,7 +134,7 @@ void up_cxxinitialize(void) for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxdbg("initp: %p initializer: %p\n", initp, initializer); + cxxerr("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +144,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxdbg("Calling %p\n", initializer); + cxxerr("Calling %p\n", initializer); initializer(); } } diff --git a/platform/olimex-stm32-h405/stm32_cxxinitialize.c b/platform/olimex-stm32-h405/stm32_cxxinitialize.c index 0edd262fd..195d9f86f 100644 --- a/platform/olimex-stm32-h405/stm32_cxxinitialize.c +++ b/platform/olimex-stm32-h405/stm32_cxxinitialize.c @@ -58,7 +58,7 @@ #endif #ifdef CONFIG_DEBUG_CXX -# define cxxdbg dbg +# define cxxerr err # define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info @@ -68,7 +68,7 @@ # define cxxllinfo(x...) # endif #else -# define cxxdbg(x...) +# define cxxerr(x...) # define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) @@ -126,7 +126,7 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ @@ -134,7 +134,7 @@ void up_cxxinitialize(void) for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxdbg("initp: %p initializer: %p\n", initp, initializer); + cxxerr("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +144,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxdbg("Calling %p\n", initializer); + cxxerr("Calling %p\n", initializer); initializer(); } } diff --git a/platform/olimex-stm32-h407/stm32_cxxinitialize.c b/platform/olimex-stm32-h407/stm32_cxxinitialize.c index 95ff79b7f..a38754c4b 100644 --- a/platform/olimex-stm32-h407/stm32_cxxinitialize.c +++ b/platform/olimex-stm32-h407/stm32_cxxinitialize.c @@ -58,7 +58,7 @@ #endif #ifdef CONFIG_DEBUG_CXX -# define cxxdbg dbg +# define cxxerr err # define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info @@ -68,7 +68,7 @@ # define cxxllinfo(x...) # endif #else -# define cxxdbg(x...) +# define cxxerr(x...) # define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) @@ -126,7 +126,7 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ @@ -134,7 +134,7 @@ void up_cxxinitialize(void) for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxdbg("initp: %p initializer: %p\n", initp, initializer); + cxxerr("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +144,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxdbg("Calling %p\n", initializer); + cxxerr("Calling %p\n", initializer); initializer(); } } diff --git a/platform/olimex-stm32-p207/stm32_cxxinitialize.c b/platform/olimex-stm32-p207/stm32_cxxinitialize.c index 3e129c18b..6e02b7474 100644 --- a/platform/olimex-stm32-p207/stm32_cxxinitialize.c +++ b/platform/olimex-stm32-p207/stm32_cxxinitialize.c @@ -58,7 +58,7 @@ #endif #ifdef CONFIG_DEBUG_CXX -# define cxxdbg dbg +# define cxxerr err # define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info @@ -68,7 +68,7 @@ # define cxxllinfo(x...) # endif #else -# define cxxdbg(x...) +# define cxxerr(x...) # define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) @@ -126,7 +126,7 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ @@ -134,7 +134,7 @@ void up_cxxinitialize(void) for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxdbg("initp: %p initializer: %p\n", initp, initializer); + cxxerr("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +144,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxdbg("Calling %p\n", initializer); + cxxerr("Calling %p\n", initializer); initializer(); } } diff --git a/platform/olimexino-stm32/stm32_cxxinitialize.c b/platform/olimexino-stm32/stm32_cxxinitialize.c index fc4cc71b3..e0c5092c1 100644 --- a/platform/olimexino-stm32/stm32_cxxinitialize.c +++ b/platform/olimexino-stm32/stm32_cxxinitialize.c @@ -58,7 +58,7 @@ #endif #ifdef CONFIG_DEBUG_CXX -# define cxxdbg dbg +# define cxxerr err # define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info @@ -68,7 +68,7 @@ # define cxxllinfo(x...) # endif #else -# define cxxdbg(x...) +# define cxxerr(x...) # define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) @@ -126,7 +126,7 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ @@ -134,7 +134,7 @@ void up_cxxinitialize(void) for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxdbg("initp: %p initializer: %p\n", initp, initializer); + cxxerr("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +144,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxdbg("Calling %p\n", initializer); + cxxerr("Calling %p\n", initializer); initializer(); } } diff --git a/platform/pcduino-a10/a1x_cxxinitialize.c b/platform/pcduino-a10/a1x_cxxinitialize.c index f1be61097..d81fcd506 100644 --- a/platform/pcduino-a10/a1x_cxxinitialize.c +++ b/platform/pcduino-a10/a1x_cxxinitialize.c @@ -58,7 +58,7 @@ #endif #ifdef CONFIG_DEBUG_CXX -# define cxxdbg dbg +# define cxxerr err # define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info @@ -68,7 +68,7 @@ # define cxxllinfo(x...) # endif #else -# define cxxdbg(x...) +# define cxxerr(x...) # define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) @@ -126,7 +126,7 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ @@ -134,7 +134,7 @@ void up_cxxinitialize(void) for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxdbg("initp: %p initializer: %p\n", initp, initializer); + cxxerr("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +144,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxdbg("Calling %p\n", initializer); + cxxerr("Calling %p\n", initializer); initializer(); } } diff --git a/platform/sabre-6quad/imx_cxxinitialize.c b/platform/sabre-6quad/imx_cxxinitialize.c index da4ddcc81..5c6e1e00b 100644 --- a/platform/sabre-6quad/imx_cxxinitialize.c +++ b/platform/sabre-6quad/imx_cxxinitialize.c @@ -58,7 +58,7 @@ #endif #ifdef CONFIG_DEBUG_CXX -# define cxxdbg dbg +# define cxxerr err # define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info @@ -68,7 +68,7 @@ # define cxxllinfo(x...) # endif #else -# define cxxdbg(x...) +# define cxxerr(x...) # define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) @@ -126,7 +126,7 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ @@ -134,7 +134,7 @@ void up_cxxinitialize(void) for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxdbg("initp: %p initializer: %p\n", initp, initializer); + cxxerr("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +144,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxdbg("Calling %p\n", initializer); + cxxerr("Calling %p\n", initializer); initializer(); } } diff --git a/platform/sam3u-ek/sam_cxxinitialized.c b/platform/sam3u-ek/sam_cxxinitialized.c index 7bdb6495e..9980df83c 100644 --- a/platform/sam3u-ek/sam_cxxinitialized.c +++ b/platform/sam3u-ek/sam_cxxinitialized.c @@ -58,7 +58,7 @@ #endif #ifdef CONFIG_DEBUG_CXX -# define cxxdbg dbg +# define cxxerr err # define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info @@ -68,7 +68,7 @@ # define cxxllinfo(x...) # endif #else -# define cxxdbg(x...) +# define cxxerr(x...) # define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) @@ -126,7 +126,7 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ @@ -134,7 +134,7 @@ void up_cxxinitialize(void) for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxdbg("initp: %p initializer: %p\n", initp, initializer); + cxxerr("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +144,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxdbg("Calling %p\n", initializer); + cxxerr("Calling %p\n", initializer); initializer(); } } diff --git a/platform/sam4e-ek/sam_cxxinitialize.c b/platform/sam4e-ek/sam_cxxinitialize.c index a0d513f6c..9403bf54c 100644 --- a/platform/sam4e-ek/sam_cxxinitialize.c +++ b/platform/sam4e-ek/sam_cxxinitialize.c @@ -58,7 +58,7 @@ #endif #ifdef CONFIG_DEBUG_CXX -# define cxxdbg dbg +# define cxxerr err # define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info @@ -68,7 +68,7 @@ # define cxxllinfo(x...) # endif #else -# define cxxdbg(x...) +# define cxxerr(x...) # define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) @@ -126,7 +126,7 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ @@ -134,7 +134,7 @@ void up_cxxinitialize(void) for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxdbg("initp: %p initializer: %p\n", initp, initializer); + cxxerr("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +144,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxdbg("Calling %p\n", initializer); + cxxerr("Calling %p\n", initializer); initializer(); } } diff --git a/platform/sam4l-xplained/sam_cxxinitialize.c b/platform/sam4l-xplained/sam_cxxinitialize.c index 676a134d5..71ec24037 100644 --- a/platform/sam4l-xplained/sam_cxxinitialize.c +++ b/platform/sam4l-xplained/sam_cxxinitialize.c @@ -58,7 +58,7 @@ #endif #ifdef CONFIG_DEBUG_CXX -# define cxxdbg dbg +# define cxxerr err # define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info @@ -68,7 +68,7 @@ # define cxxllinfo(x...) # endif #else -# define cxxdbg(x...) +# define cxxerr(x...) # define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) @@ -126,7 +126,7 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ @@ -134,7 +134,7 @@ void up_cxxinitialize(void) for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxdbg("initp: %p initializer: %p\n", initp, initializer); + cxxerr("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +144,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxdbg("Calling %p\n", initializer); + cxxerr("Calling %p\n", initializer); initializer(); } } diff --git a/platform/sam4s-xplained-pro/sam_cxxinitialize.c b/platform/sam4s-xplained-pro/sam_cxxinitialize.c index 0a35ca436..388687385 100644 --- a/platform/sam4s-xplained-pro/sam_cxxinitialize.c +++ b/platform/sam4s-xplained-pro/sam_cxxinitialize.c @@ -58,7 +58,7 @@ #endif #ifdef CONFIG_DEBUG_CXX -# define cxxdbg dbg +# define cxxerr err # define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info @@ -68,7 +68,7 @@ # define cxxllinfo(x...) # endif #else -# define cxxdbg(x...) +# define cxxerr(x...) # define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) @@ -126,7 +126,7 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ @@ -134,7 +134,7 @@ void up_cxxinitialize(void) for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxdbg("initp: %p initializer: %p\n", initp, initializer); + cxxerr("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +144,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxdbg("Calling %p\n", initializer); + cxxerr("Calling %p\n", initializer); initializer(); } } diff --git a/platform/sam4s-xplained/sam_cxxinitialize.c b/platform/sam4s-xplained/sam_cxxinitialize.c index 8e696d725..f145ef0de 100644 --- a/platform/sam4s-xplained/sam_cxxinitialize.c +++ b/platform/sam4s-xplained/sam_cxxinitialize.c @@ -58,7 +58,7 @@ #endif #ifdef CONFIG_DEBUG_CXX -# define cxxdbg dbg +# define cxxerr err # define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info @@ -68,7 +68,7 @@ # define cxxllinfo(x...) # endif #else -# define cxxdbg(x...) +# define cxxerr(x...) # define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) @@ -126,7 +126,7 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ @@ -134,7 +134,7 @@ void up_cxxinitialize(void) for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxdbg("initp: %p initializer: %p\n", initp, initializer); + cxxerr("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +144,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxdbg("Calling %p\n", initializer); + cxxerr("Calling %p\n", initializer); initializer(); } } diff --git a/platform/sama5d2-xult/sam_cxxinitialize.c b/platform/sama5d2-xult/sam_cxxinitialize.c index f2f41f147..605e6cdda 100644 --- a/platform/sama5d2-xult/sam_cxxinitialize.c +++ b/platform/sama5d2-xult/sam_cxxinitialize.c @@ -58,7 +58,7 @@ #endif #ifdef CONFIG_DEBUG_CXX -# define cxxdbg dbg +# define cxxerr err # define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info @@ -68,7 +68,7 @@ # define cxxllinfo(x...) # endif #else -# define cxxdbg(x...) +# define cxxerr(x...) # define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) @@ -126,7 +126,7 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ @@ -134,7 +134,7 @@ void up_cxxinitialize(void) for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxdbg("initp: %p initializer: %p\n", initp, initializer); + cxxerr("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +144,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxdbg("Calling %p\n", initializer); + cxxerr("Calling %p\n", initializer); initializer(); } } diff --git a/platform/sama5d3-xplained/sam_cxxinitialize.c b/platform/sama5d3-xplained/sam_cxxinitialize.c index 827938d6c..5a4033d0b 100644 --- a/platform/sama5d3-xplained/sam_cxxinitialize.c +++ b/platform/sama5d3-xplained/sam_cxxinitialize.c @@ -58,7 +58,7 @@ #endif #ifdef CONFIG_DEBUG_CXX -# define cxxdbg dbg +# define cxxerr err # define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info @@ -68,7 +68,7 @@ # define cxxllinfo(x...) # endif #else -# define cxxdbg(x...) +# define cxxerr(x...) # define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) @@ -126,7 +126,7 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ @@ -134,7 +134,7 @@ void up_cxxinitialize(void) for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxdbg("initp: %p initializer: %p\n", initp, initializer); + cxxerr("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +144,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxdbg("Calling %p\n", initializer); + cxxerr("Calling %p\n", initializer); initializer(); } } diff --git a/platform/sama5d3x-ek/sam_cxxinitialize.c b/platform/sama5d3x-ek/sam_cxxinitialize.c index 0b261511c..3b1ee3dfd 100644 --- a/platform/sama5d3x-ek/sam_cxxinitialize.c +++ b/platform/sama5d3x-ek/sam_cxxinitialize.c @@ -58,7 +58,7 @@ #endif #ifdef CONFIG_DEBUG_CXX -# define cxxdbg dbg +# define cxxerr err # define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info @@ -68,7 +68,7 @@ # define cxxllinfo(x...) # endif #else -# define cxxdbg(x...) +# define cxxerr(x...) # define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) @@ -126,7 +126,7 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ @@ -134,7 +134,7 @@ void up_cxxinitialize(void) for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxdbg("initp: %p initializer: %p\n", initp, initializer); + cxxerr("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +144,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxdbg("Calling %p\n", initializer); + cxxerr("Calling %p\n", initializer); initializer(); } } diff --git a/platform/sama5d4-ek/sam_cxxinitialize.c b/platform/sama5d4-ek/sam_cxxinitialize.c index d8f08b4aa..ccb249e14 100644 --- a/platform/sama5d4-ek/sam_cxxinitialize.c +++ b/platform/sama5d4-ek/sam_cxxinitialize.c @@ -58,7 +58,7 @@ #endif #ifdef CONFIG_DEBUG_CXX -# define cxxdbg dbg +# define cxxerr err # define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info @@ -68,7 +68,7 @@ # define cxxllinfo(x...) # endif #else -# define cxxdbg(x...) +# define cxxerr(x...) # define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) @@ -126,7 +126,7 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ @@ -134,7 +134,7 @@ void up_cxxinitialize(void) for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxdbg("initp: %p initializer: %p\n", initp, initializer); + cxxerr("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +144,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxdbg("Calling %p\n", initializer); + cxxerr("Calling %p\n", initializer); initializer(); } } diff --git a/platform/samd20-xplained/sam_cxxinitialize.c b/platform/samd20-xplained/sam_cxxinitialize.c index 5bb2096af..698ecf3ac 100644 --- a/platform/samd20-xplained/sam_cxxinitialize.c +++ b/platform/samd20-xplained/sam_cxxinitialize.c @@ -58,7 +58,7 @@ #endif #ifdef CONFIG_DEBUG_CXX -# define cxxdbg dbg +# define cxxerr err # define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info @@ -68,7 +68,7 @@ # define cxxllinfo(x...) # endif #else -# define cxxdbg(x...) +# define cxxerr(x...) # define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) @@ -126,7 +126,7 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ @@ -134,7 +134,7 @@ void up_cxxinitialize(void) for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxdbg("initp: %p initializer: %p\n", initp, initializer); + cxxerr("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +144,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxdbg("Calling %p\n", initializer); + cxxerr("Calling %p\n", initializer); initializer(); } } diff --git a/platform/samd21-xplained/sam_cxxinitialize.c b/platform/samd21-xplained/sam_cxxinitialize.c index ed2cab169..dbdd4762a 100644 --- a/platform/samd21-xplained/sam_cxxinitialize.c +++ b/platform/samd21-xplained/sam_cxxinitialize.c @@ -58,7 +58,7 @@ #endif #ifdef CONFIG_DEBUG_CXX -# define cxxdbg dbg +# define cxxerr err # define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info @@ -68,7 +68,7 @@ # define cxxllinfo(x...) # endif #else -# define cxxdbg(x...) +# define cxxerr(x...) # define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) @@ -126,7 +126,7 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ @@ -134,7 +134,7 @@ void up_cxxinitialize(void) for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxdbg("initp: %p initializer: %p\n", initp, initializer); + cxxerr("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +144,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxdbg("Calling %p\n", initializer); + cxxerr("Calling %p\n", initializer); initializer(); } } diff --git a/platform/same70-xplained/sam_cxxinitialize.c b/platform/same70-xplained/sam_cxxinitialize.c index 1277dfda5..1c0263c5c 100644 --- a/platform/same70-xplained/sam_cxxinitialize.c +++ b/platform/same70-xplained/sam_cxxinitialize.c @@ -58,7 +58,7 @@ #endif #ifdef CONFIG_DEBUG_CXX -# define cxxdbg dbg +# define cxxerr err # define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info @@ -68,7 +68,7 @@ # define cxxllinfo(x...) # endif #else -# define cxxdbg(x...) +# define cxxerr(x...) # define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) @@ -126,7 +126,7 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ @@ -134,7 +134,7 @@ void up_cxxinitialize(void) for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxdbg("initp: %p initializer: %p\n", initp, initializer); + cxxerr("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +144,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxdbg("Calling %p\n", initializer); + cxxerr("Calling %p\n", initializer); initializer(); } } diff --git a/platform/saml21-xplained/sam_cxxinitialize.c b/platform/saml21-xplained/sam_cxxinitialize.c index a523435d5..d1f518cd0 100644 --- a/platform/saml21-xplained/sam_cxxinitialize.c +++ b/platform/saml21-xplained/sam_cxxinitialize.c @@ -58,7 +58,7 @@ #endif #ifdef CONFIG_DEBUG_CXX -# define cxxdbg dbg +# define cxxerr err # define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info @@ -68,7 +68,7 @@ # define cxxllinfo(x...) # endif #else -# define cxxdbg(x...) +# define cxxerr(x...) # define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) @@ -126,7 +126,7 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ @@ -134,7 +134,7 @@ void up_cxxinitialize(void) for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxdbg("initp: %p initializer: %p\n", initp, initializer); + cxxerr("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +144,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxdbg("Calling %p\n", initializer); + cxxerr("Calling %p\n", initializer); initializer(); } } diff --git a/platform/samv71-xult/sam_cxxinitialize.c b/platform/samv71-xult/sam_cxxinitialize.c index a1ee79aaa..c945373a9 100644 --- a/platform/samv71-xult/sam_cxxinitialize.c +++ b/platform/samv71-xult/sam_cxxinitialize.c @@ -58,7 +58,7 @@ #endif #ifdef CONFIG_DEBUG_CXX -# define cxxdbg dbg +# define cxxerr err # define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info @@ -68,7 +68,7 @@ # define cxxllinfo(x...) # endif #else -# define cxxdbg(x...) +# define cxxerr(x...) # define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) @@ -126,7 +126,7 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ @@ -134,7 +134,7 @@ void up_cxxinitialize(void) for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxdbg("initp: %p initializer: %p\n", initp, initializer); + cxxerr("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +144,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxdbg("Calling %p\n", initializer); + cxxerr("Calling %p\n", initializer); initializer(); } } diff --git a/platform/shenzhou/stm32_cxxinitialize.c b/platform/shenzhou/stm32_cxxinitialize.c index ebc1c9b31..d93b926db 100644 --- a/platform/shenzhou/stm32_cxxinitialize.c +++ b/platform/shenzhou/stm32_cxxinitialize.c @@ -58,7 +58,7 @@ #endif #ifdef CONFIG_DEBUG_CXX -# define cxxdbg dbg +# define cxxerr err # define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info @@ -68,7 +68,7 @@ # define cxxllinfo(x...) # endif #else -# define cxxdbg(x...) +# define cxxerr(x...) # define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) @@ -126,7 +126,7 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ @@ -134,7 +134,7 @@ void up_cxxinitialize(void) for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxdbg("initp: %p initializer: %p\n", initp, initializer); + cxxerr("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +144,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxdbg("Calling %p\n", initializer); + cxxerr("Calling %p\n", initializer); initializer(); } } diff --git a/platform/spark/stm32_cxxinitialize.c b/platform/spark/stm32_cxxinitialize.c index bc9597697..9ce8956a2 100644 --- a/platform/spark/stm32_cxxinitialize.c +++ b/platform/spark/stm32_cxxinitialize.c @@ -58,7 +58,7 @@ #endif #ifdef CONFIG_DEBUG_CXX -# define cxxdbg dbg +# define cxxerr err # define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info @@ -68,7 +68,7 @@ # define cxxllinfo(x...) # endif #else -# define cxxdbg(x...) +# define cxxerr(x...) # define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) @@ -126,7 +126,7 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ @@ -134,7 +134,7 @@ void up_cxxinitialize(void) for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxdbg("initp: %p initializer: %p\n", initp, initializer); + cxxerr("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +144,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxdbg("Calling %p\n", initializer); + cxxerr("Calling %p\n", initializer); initializer(); } } diff --git a/platform/stm3220g-eval/stm32_cxxinitialize.c b/platform/stm3220g-eval/stm32_cxxinitialize.c index 7d1e6b6cb..b71a994ba 100644 --- a/platform/stm3220g-eval/stm32_cxxinitialize.c +++ b/platform/stm3220g-eval/stm32_cxxinitialize.c @@ -58,7 +58,7 @@ #endif #ifdef CONFIG_DEBUG_CXX -# define cxxdbg dbg +# define cxxerr err # define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info @@ -68,7 +68,7 @@ # define cxxllinfo(x...) # endif #else -# define cxxdbg(x...) +# define cxxerr(x...) # define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) @@ -126,7 +126,7 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ @@ -134,7 +134,7 @@ void up_cxxinitialize(void) for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxdbg("initp: %p initializer: %p\n", initp, initializer); + cxxerr("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +144,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxdbg("Calling %p\n", initializer); + cxxerr("Calling %p\n", initializer); initializer(); } } diff --git a/platform/stm3240g-eval/stm32_cxxinitialize.c b/platform/stm3240g-eval/stm32_cxxinitialize.c index 79194605b..f27a9635c 100644 --- a/platform/stm3240g-eval/stm32_cxxinitialize.c +++ b/platform/stm3240g-eval/stm32_cxxinitialize.c @@ -58,7 +58,7 @@ #endif #ifdef CONFIG_DEBUG_CXX -# define cxxdbg dbg +# define cxxerr err # define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info @@ -68,7 +68,7 @@ # define cxxllinfo(x...) # endif #else -# define cxxdbg(x...) +# define cxxerr(x...) # define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) @@ -126,7 +126,7 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ @@ -134,7 +134,7 @@ void up_cxxinitialize(void) for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxdbg("initp: %p initializer: %p\n", initp, initializer); + cxxerr("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +144,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxdbg("Calling %p\n", initializer); + cxxerr("Calling %p\n", initializer); initializer(); } } diff --git a/platform/stm32f3discovery/stm32_cxxinitialize.c b/platform/stm32f3discovery/stm32_cxxinitialize.c index d55f25d17..f0db50ba1 100644 --- a/platform/stm32f3discovery/stm32_cxxinitialize.c +++ b/platform/stm32f3discovery/stm32_cxxinitialize.c @@ -58,7 +58,7 @@ #endif #ifdef CONFIG_DEBUG_CXX -# define cxxdbg dbg +# define cxxerr err # define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info @@ -68,7 +68,7 @@ # define cxxllinfo(x...) # endif #else -# define cxxdbg(x...) +# define cxxerr(x...) # define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) @@ -126,7 +126,7 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ @@ -134,7 +134,7 @@ void up_cxxinitialize(void) for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxdbg("initp: %p initializer: %p\n", initp, initializer); + cxxerr("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +144,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxdbg("Calling %p\n", initializer); + cxxerr("Calling %p\n", initializer); initializer(); } } diff --git a/platform/stm32f429i-disco/stm32_cxxinitialize.c b/platform/stm32f429i-disco/stm32_cxxinitialize.c index de505735c..34741aa35 100644 --- a/platform/stm32f429i-disco/stm32_cxxinitialize.c +++ b/platform/stm32f429i-disco/stm32_cxxinitialize.c @@ -58,7 +58,7 @@ #endif #ifdef CONFIG_DEBUG_CXX -# define cxxdbg dbg +# define cxxerr err # define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info @@ -68,7 +68,7 @@ # define cxxllinfo(x...) # endif #else -# define cxxdbg(x...) +# define cxxerr(x...) # define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) @@ -126,7 +126,7 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ @@ -134,7 +134,7 @@ void up_cxxinitialize(void) for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxdbg("initp: %p initializer: %p\n", initp, initializer); + cxxerr("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +144,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxdbg("Calling %p\n", initializer); + cxxerr("Calling %p\n", initializer); initializer(); } } diff --git a/platform/stm32f4discovery/stm32_cxxinitialize.c b/platform/stm32f4discovery/stm32_cxxinitialize.c index f51c75ad7..0d04c9aa0 100644 --- a/platform/stm32f4discovery/stm32_cxxinitialize.c +++ b/platform/stm32f4discovery/stm32_cxxinitialize.c @@ -58,7 +58,7 @@ #endif #ifdef CONFIG_DEBUG_CXX -# define cxxdbg dbg +# define cxxerr err # define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info @@ -68,7 +68,7 @@ # define cxxllinfo(x...) # endif #else -# define cxxdbg(x...) +# define cxxerr(x...) # define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) @@ -126,7 +126,7 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ @@ -134,7 +134,7 @@ void up_cxxinitialize(void) for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxdbg("initp: %p initializer: %p\n", initp, initializer); + cxxerr("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +144,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxdbg("Calling %p\n", initializer); + cxxerr("Calling %p\n", initializer); initializer(); } } diff --git a/platform/stm32f746g-disco/stm32_cxxinitialize.c b/platform/stm32f746g-disco/stm32_cxxinitialize.c index 5d3f195be..e9707d6e1 100644 --- a/platform/stm32f746g-disco/stm32_cxxinitialize.c +++ b/platform/stm32f746g-disco/stm32_cxxinitialize.c @@ -58,7 +58,7 @@ #endif #ifdef CONFIG_DEBUG_CXX -# define cxxdbg dbg +# define cxxerr err # define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info @@ -68,7 +68,7 @@ # define cxxllinfo(x...) # endif #else -# define cxxdbg(x...) +# define cxxerr(x...) # define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) @@ -126,7 +126,7 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ @@ -134,7 +134,7 @@ void up_cxxinitialize(void) for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxdbg("initp: %p initializer: %p\n", initp, initializer); + cxxerr("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +144,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxdbg("Calling %p\n", initializer); + cxxerr("Calling %p\n", initializer); initializer(); } } diff --git a/platform/stm32l476vg-disco/stm32_cxxinitialize.c b/platform/stm32l476vg-disco/stm32_cxxinitialize.c index 4b685ab18..ab3814e44 100644 --- a/platform/stm32l476vg-disco/stm32_cxxinitialize.c +++ b/platform/stm32l476vg-disco/stm32_cxxinitialize.c @@ -58,7 +58,7 @@ #endif #ifdef CONFIG_DEBUG_CXX -# define cxxdbg dbg +# define cxxerr err # define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info @@ -68,7 +68,7 @@ # define cxxllinfo(x...) # endif #else -# define cxxdbg(x...) +# define cxxerr(x...) # define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) @@ -126,7 +126,7 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ @@ -134,7 +134,7 @@ void up_cxxinitialize(void) for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxdbg("initp: %p initializer: %p\n", initp, initializer); + cxxerr("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +144,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxdbg("Calling %p\n", initializer); + cxxerr("Calling %p\n", initializer); initializer(); } } diff --git a/platform/stm32ldiscovery/stm32_cxxinitialize.c b/platform/stm32ldiscovery/stm32_cxxinitialize.c index 07cb29ebd..1dcc54b75 100644 --- a/platform/stm32ldiscovery/stm32_cxxinitialize.c +++ b/platform/stm32ldiscovery/stm32_cxxinitialize.c @@ -58,7 +58,7 @@ #endif #ifdef CONFIG_DEBUG_CXX -# define cxxdbg dbg +# define cxxerr err # define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info @@ -68,7 +68,7 @@ # define cxxllinfo(x...) # endif #else -# define cxxdbg(x...) +# define cxxerr(x...) # define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) @@ -126,7 +126,7 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ @@ -134,7 +134,7 @@ void up_cxxinitialize(void) for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxdbg("initp: %p initializer: %p\n", initp, initializer); + cxxerr("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +144,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxdbg("Calling %p\n", initializer); + cxxerr("Calling %p\n", initializer); initializer(); } } diff --git a/platform/teensy-lc/kl_cxxinitialize.c b/platform/teensy-lc/kl_cxxinitialize.c index 98bfa067e..2d88785ef 100644 --- a/platform/teensy-lc/kl_cxxinitialize.c +++ b/platform/teensy-lc/kl_cxxinitialize.c @@ -58,7 +58,7 @@ #endif #ifdef CONFIG_DEBUG_CXX -# define cxxdbg dbg +# define cxxerr err # define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info @@ -68,7 +68,7 @@ # define cxxllinfo(x...) # endif #else -# define cxxdbg(x...) +# define cxxerr(x...) # define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) @@ -126,7 +126,7 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ @@ -134,7 +134,7 @@ void up_cxxinitialize(void) for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxdbg("initp: %p initializer: %p\n", initp, initializer); + cxxerr("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +144,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxdbg("Calling %p\n", initializer); + cxxerr("Calling %p\n", initializer); initializer(); } } diff --git a/platform/viewtool-stm32f107/stm32_cxxinitialize.c b/platform/viewtool-stm32f107/stm32_cxxinitialize.c index 892e8ceae..1ef478db5 100644 --- a/platform/viewtool-stm32f107/stm32_cxxinitialize.c +++ b/platform/viewtool-stm32f107/stm32_cxxinitialize.c @@ -58,7 +58,7 @@ #endif #ifdef CONFIG_DEBUG_CXX -# define cxxdbg dbg +# define cxxerr err # define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info @@ -68,7 +68,7 @@ # define cxxllinfo(x...) # endif #else -# define cxxdbg(x...) +# define cxxerr(x...) # define cxxllerr(x...) # define cxxinfo(x...) # define cxxllinfo(x...) @@ -126,7 +126,7 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ @@ -134,7 +134,7 @@ void up_cxxinitialize(void) for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxdbg("initp: %p initializer: %p\n", initp, initializer); + cxxerr("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +144,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxdbg("Calling %p\n", initializer); + cxxerr("Calling %p\n", initializer); initializer(); } } diff --git a/system/i2c/i2c_main.c b/system/i2c/i2c_main.c index 0150959ea..675aa57fb 100644 --- a/system/i2c/i2c_main.c +++ b/system/i2c/i2c_main.c @@ -426,7 +426,7 @@ ssize_t i2ctool_write(FAR struct i2ctool_s *i2ctool, FAR const void *buffer, siz ret = fwrite(buffer, 1, nbytes, OUTSTREAM(i2ctool)); if (ret < 0) { - dbg("[%d] Failed to send buffer: %d\n", OUTFD(i2ctool), errno); + err("[%d] Failed to send buffer: %d\n", OUTFD(i2ctool), errno); } return ret; diff --git a/system/nxplayer/nxplayer.c b/system/nxplayer/nxplayer.c index ffbce5e1a..f5b12d8b4 100644 --- a/system/nxplayer/nxplayer.c +++ b/system/nxplayer/nxplayer.c @@ -176,7 +176,7 @@ static int nxplayer_opendevice(FAR struct nxplayer_s *pPlayer, int format, { /* Format not supported by the device */ - auddbg("ERROR: Format not supported by device: %d\n", format); + auderr("ERROR: Format not supported by device: %d\n", format); return -ENODEV; } @@ -188,7 +188,7 @@ static int nxplayer_opendevice(FAR struct nxplayer_s *pPlayer, int format, int errcode = errno; DEBUGASSERT(errcode > 0); - auddbg("ERROR: Failed to open %s: %d\n", -errcode); + auderr("ERROR: Failed to open %s: %d\n", -errcode); UNUSED(errcode); return -ENOENT; } @@ -229,7 +229,7 @@ static int nxplayer_opendevice(FAR struct nxplayer_s *pPlayer, int format, int errcode = errno; DEBUGASSERT(errcode > 0); - auddbg("ERROR: Failed to open /dev/audio: %d\n", -errcode); + auderr("ERROR: Failed to open /dev/audio: %d\n", -errcode); UNUSED(errcode); return -ENODEV; } @@ -340,7 +340,7 @@ static int nxplayer_opendevice(FAR struct nxplayer_s *pPlayer, int format, /* Device not found */ - auddbg("ERROR: Device not found\n"); + auderr("ERROR: Device not found\n"); pPlayer->devFd = -1; return -ENODEV; } @@ -540,7 +540,7 @@ static int nxplayer_readbuffer(FAR struct nxplayer_s *pPlayer, if (apb->nbytes == 0 && readerror) { DEBUGASSERT(errcode > 0); - auddbg("ERROR: fread failed: %d\n", errcode); + auderr("ERROR: fread failed: %d\n", errcode); } #endif } @@ -598,7 +598,7 @@ static int nxplayer_enqueuebuffer(FAR struct nxplayer_s *pPlayer, int errcode = errno; DEBUGASSERT(errcode > 0); - auddbg("ERROR: AUDIOIOC_ENQUEUEBUFFER ioctl failed: %d\n", errcode); + auderr("ERROR: AUDIOIOC_ENQUEUEBUFFER ioctl failed: %d\n", errcode); return -errcode; } @@ -701,7 +701,7 @@ static void *nxplayer_playthread(pthread_addr_t pvarg) { /* Buffer alloc Operation not supported or error allocating! */ - auddbg("ERROR: Could not allocate buffer %d\n", x); + auderr("ERROR: Could not allocate buffer %d\n", x); running = false; goto err_out; } @@ -1102,7 +1102,7 @@ int nxplayer_setvolume(FAR struct nxplayer_s *pPlayer, uint16_t volume) int errcode = errno; DEBUGASSERT(errcode > 0); - auddbg("ERROR: AUDIOIOC_CONFIGURE ioctl failed: %d\n", errcode); + auderr("ERROR: AUDIOIOC_CONFIGURE ioctl failed: %d\n", errcode); return -errcode; } } @@ -1402,7 +1402,7 @@ int nxplayer_fforward(FAR struct nxplayer_s *pPlayer, uint8_t subsample) int errcode = errno; DEBUGASSERT(errcode > 0); - auddbg("ERROR: ioctl AUDIOIOC_CONFIGURE failed: %d\n", errcode); + auderr("ERROR: ioctl AUDIOIOC_CONFIGURE failed: %d\n", errcode); ret = -errcode; } @@ -1458,7 +1458,7 @@ int nxplayer_rewind(FAR struct nxplayer_s *pPlayer, uint8_t subsample) int errcode = errno; DEBUGASSERT(errcode > 0); - auddbg("ERROR: ioctl AUDIOIOC_CONFIGURE failed: %d\n", errcode); + auderr("ERROR: ioctl AUDIOIOC_CONFIGURE failed: %d\n", errcode); ret = -errcode; } @@ -1497,7 +1497,7 @@ int nxplayer_cancel_motion(FAR struct nxplayer_s *pPlayer, bool paused) ret = nxplayer_fforward(pPlayer, AUDIO_SUBSAMPLE_NONE); if (ret < 0) { - auddbg("ERROR: nxplayer_fforward failed: %d\n", ret); + auderr("ERROR: nxplayer_fforward failed: %d\n", ret); return ret; } @@ -1507,7 +1507,7 @@ int nxplayer_cancel_motion(FAR struct nxplayer_s *pPlayer, bool paused) ret = nxplayer_pause(pPlayer); if (ret < 0) { - auddbg("ERROR: nxplayer_pause failed: %d\n", ret); + auderr("ERROR: nxplayer_pause failed: %d\n", ret); return ret; } } @@ -1681,18 +1681,18 @@ int nxplayer_playfile(FAR struct nxplayer_s *pPlayer, if (nxplayer_mediasearch(pPlayer, pFilename, path, sizeof(path)) != OK) { - auddbg("ERROR: Could not find file\n"); + auderr("ERROR: Could not find file\n"); return -ENOENT; } #else - auddbg("ERROR: Could not open %s or %s\n", pFilename, path); + auderr("ERROR: Could not open %s or %s\n", pFilename, path); return -ENOENT; #endif /* CONFIG_NXPLAYER_MEDIA_SEARCH */ } #else /* CONFIG_NXPLAYER_INCLUDE_MEDIADIR */ - auddbg("ERROR: Could not open %s\n", pFilename); + auderr("ERROR: Could not open %s\n", pFilename); return -ENOENT; #endif /* CONFIG_NXPLAYER_INCLUDE_MEDIADIR */ } @@ -1721,7 +1721,7 @@ int nxplayer_playfile(FAR struct nxplayer_s *pPlayer, { /* Hmmm, it's some unknown / unsupported type */ - auddbg("ERROR: Unsupported format: %d \n", filefmt); + auderr("ERROR: Unsupported format: %d \n", filefmt); ret = -ENOSYS; goto err_out_nodev; } @@ -1740,7 +1740,7 @@ int nxplayer_playfile(FAR struct nxplayer_s *pPlayer, { /* Error opening the device */ - auddbg("ERROR: nxplayer_opendevice failed: %d\n", ret); + auderr("ERROR: nxplayer_opendevice failed: %d\n", ret); goto err_out_nodev; } @@ -1756,7 +1756,7 @@ int nxplayer_playfile(FAR struct nxplayer_s *pPlayer, { /* Device is busy or error */ - auddbg("ERROR: Failed to reserve device: %d\n", ret); + auderr("ERROR: Failed to reserve device: %d\n", ret); ret = -errno; goto err_out; } @@ -1777,7 +1777,7 @@ int nxplayer_playfile(FAR struct nxplayer_s *pPlayer, /* Unable to open message queue! */ ret = -errno; - auddbg("ERROR: mq_open failed: %d\n", ret); + auderr("ERROR: mq_open failed: %d\n", ret); goto err_out; } @@ -1813,7 +1813,7 @@ int nxplayer_playfile(FAR struct nxplayer_s *pPlayer, (pthread_addr_t) pPlayer); if (ret != OK) { - auddbg("ERROR: Failed to create playthread: %d\n", ret); + auderr("ERROR: Failed to create playthread: %d\n", ret); goto err_out; } @@ -1944,7 +1944,7 @@ void nxplayer_release(FAR struct nxplayer_s* pPlayer) if (errcode != EINTR) { - auddbg("ERROR: sem_wait failed: %d\n", errcode); + auderr("ERROR: sem_wait failed: %d\n", errcode); return; } } @@ -1964,7 +1964,7 @@ void nxplayer_release(FAR struct nxplayer_s* pPlayer) if (errcode != -EINTR) { - auddbg("ERROR: sem_wait failed: %d\n", errcode); + auderr("ERROR: sem_wait failed: %d\n", errcode); return; } } @@ -2006,7 +2006,7 @@ void nxplayer_reference(FAR struct nxplayer_s* pPlayer) if (errcode != -EINTR) { - auddbg("ERROR: sem_wait failed: %d\n", errcode); + auderr("ERROR: sem_wait failed: %d\n", errcode); return; } } @@ -2043,7 +2043,7 @@ void nxplayer_detach(FAR struct nxplayer_s* pPlayer) if (errcode != -EINTR) { - auddbg("ERROR: sem_wait failed: %d\n", errcode); + auderr("ERROR: sem_wait failed: %d\n", errcode); return; } } diff --git a/system/prun/prun.c b/system/prun/prun.c index 59dc29b4c..0495954ee 100644 --- a/system/prun/prun.c +++ b/system/prun/prun.c @@ -95,7 +95,7 @@ int prun(FAR char *exepath, size_t varsize, size_t strsize) st = pload(exepath, varsize, varsize); if (!st) { - bdbg("ERROR: Could not load %s\n", exepath); + berr("ERROR: Could not load %s\n", exepath); return -ENOEXEC; } @@ -118,7 +118,7 @@ int prun(FAR char *exepath, size_t varsize, size_t strsize) { /* REVISIT: Select a more appropriated return errocode */ - bdbg("ERROR: Runtime error 0x%02x -- Execution Stopped\n", errcode); + berr("ERROR: Runtime error 0x%02x -- Execution Stopped\n", errcode); ret = -ENOEXEC; } diff --git a/system/ubloxmodem/ubloxmodem_main.c b/system/ubloxmodem/ubloxmodem_main.c index 16c05994e..273dce39f 100644 --- a/system/ubloxmodem/ubloxmodem_main.c +++ b/system/ubloxmodem/ubloxmodem_main.c @@ -59,12 +59,12 @@ ****************************************************************************/ #ifdef CONFIG_MODEM_U_BLOX_DEBUG -# define m_dbg dbg -# define m_info info +# define m_err err +# define m_info info # define m_vllerr llerr # define m_vllinfo llinfo #else -# define m_dbg(x...) +# define m_err(x...) # define m_info(x...) # define m_llerr(x...) # define m_llinfo(x...) @@ -364,7 +364,7 @@ static int ubloxmodem_at(FAR struct ubloxmodem_cxt* cxt) ret = chat_single(fd, atcmd, resp); - m_dbg("test result: %d\n", ret); + m_err("test result: %d\n", ret); close(fd); return ret; From 4a0db11565ff18fd233c6928b5bdcbf0e5dfb013 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sun, 12 Jun 2016 17:33:49 -0600 Subject: [PATCH 49/74] Eliminate some warnings --- netutils/tftpc/tftpc_get.c | 3 ++- netutils/tftpc/tftpc_internal.h | 2 +- netutils/tftpc/tftpc_packets.c | 11 ++++++----- netutils/tftpc/tftpc_put.c | 5 +++-- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/netutils/tftpc/tftpc_get.c b/netutils/tftpc/tftpc_get.c index 4ad5eeb58..28fd438cf 100644 --- a/netutils/tftpc/tftpc_get.c +++ b/netutils/tftpc/tftpc_get.c @@ -119,12 +119,13 @@ static inline int tftp_parsedatapacket(const uint8_t *packet, *blockno = (uint16_t)packet[2] << 8 | (uint16_t)packet[3]; return OK; } -#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_DEBUG_NET) +#ifdef CONFIG_DEBUG_NET_WARN else if (*opcode == TFTP_ERR) { (void)tftp_parseerrpacket(packet); } #endif + return ERROR; } diff --git a/netutils/tftpc/tftpc_internal.h b/netutils/tftpc/tftpc_internal.h index e25d5365a..8516aef37 100644 --- a/netutils/tftpc/tftpc_internal.h +++ b/netutils/tftpc/tftpc_internal.h @@ -162,7 +162,7 @@ extern int tftp_sockinit(struct sockaddr_in *server, in_addr_t addr); extern int tftp_mkreqpacket(uint8_t *buffer, int opcode, const char *path, bool binary); extern int tftp_mkackpacket(uint8_t *buffer, uint16_t blockno); extern int tftp_mkerrpacket(uint8_t *buffer, uint16_t errorcode, const char *errormsg); -#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_DEBUG_NET) +#ifdef CONFIG_DEBUG_NET_WARN extern int tftp_parseerrpacket(const uint8_t *packet); #endif diff --git a/netutils/tftpc/tftpc_packets.c b/netutils/tftpc/tftpc_packets.c index d4cb5cfc8..39cbe6f13 100644 --- a/netutils/tftpc/tftpc_packets.c +++ b/netutils/tftpc/tftpc_packets.c @@ -207,18 +207,19 @@ int tftp_mkerrpacket(uint8_t *buffer, uint16_t errorcode, const char *errormsg) * ****************************************************************************/ -#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_DEBUG_NET) +#ifdef CONFIG_DEBUG_NET_WARN int tftp_parseerrpacket(const uint8_t *buffer) { - uint16_t opcode = (uint16_t)buffer[0] << 8 | (uint16_t)buffer[1]; - uint16_t errcode = (uint16_t)buffer[2] << 8 | (uint16_t)buffer[3]; - const char *errmsg = (const char *)&buffer[4]; + uint16_t opcode = (uint16_t)buffer[0] << 8 | (uint16_t)buffer[1]; + uint16_t errcode = (uint16_t)buffer[2] << 8 | (uint16_t)buffer[3]; + FAR const char *errmsg = (const char *)&buffer[4]; if (opcode == TFTP_ERR) { - nerr("ERR message: %s (%d)\n", errmsg, errcode); + ninfo("ERR message: %s (%d)\n", errmsg, errcode); return OK; } + return ERROR; } #endif diff --git a/netutils/tftpc/tftpc_put.c b/netutils/tftpc/tftpc_put.c index 4611b8d66..05808e4ce 100644 --- a/netutils/tftpc/tftpc_put.c +++ b/netutils/tftpc/tftpc_put.c @@ -270,8 +270,9 @@ static int tftp_rcvack(int sd, uint8_t *packet, struct sockaddr_in *server, if (opcode != TFTP_ACK) { - ninfo("Bad opcode\n"); -#if defined(CONFIG_DEBUG_FEATURES) && defined(CONFIG_DEBUG_NET) + nwarn("WARNING: Bad opcode\n"); + +#ifdef CONFIG_DEBUG_NET_WARN if (opcode == TFTP_ERR) { (void)tftp_parseerrpacket(packet); From a7b1aae68ccd94c3e7442f2fdc0f463fc8063dc5 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 13 Jun 2016 12:06:44 -0600 Subject: [PATCH 50/74] Fix some warnings --- netutils/ftpc/ftpc_connect.c | 26 +++----------------------- system/nxplayer/nxplayer.c | 4 ++-- 2 files changed, 5 insertions(+), 25 deletions(-) diff --git a/netutils/ftpc/ftpc_connect.c b/netutils/ftpc/ftpc_connect.c index ab8b9b479..fa915d015 100644 --- a/netutils/ftpc/ftpc_connect.c +++ b/netutils/ftpc/ftpc_connect.c @@ -51,26 +51,6 @@ #include "ftpc_internal.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -159,7 +139,7 @@ errout: int ftpc_reconnect(FAR struct ftpc_session_s *session) { struct sockaddr_in addr; -#ifdef CONFIG_DEBUG_FEATURES +#ifdef CONFIG_DEBUG_NET_ERROR char *tmp; #endif int ret; @@ -190,7 +170,7 @@ int ftpc_reconnect(FAR struct ftpc_session_s *session) /* Connect the socket to the server */ -#ifdef CONFIG_DEBUG_FEATURES +#ifdef CONFIG_DEBUG_NET_ERROR tmp = inet_ntoa(session->addr); nerr("Connecting to server address %s:%d\n", tmp, ntohs(session->port)); #endif @@ -236,7 +216,7 @@ int ftpc_reconnect(FAR struct ftpc_session_s *session) goto errout_with_socket; } -#ifdef CONFIG_DEBUG_FEATURES +#ifdef CONFIG_DEBUG_NET_ERROR nerr("Connected\n"); tmp = inet_ntoa(addr.sin_addr); nerr(" Remote address: %s:%d\n", tmp, ntohs(addr.sin_port)); diff --git a/system/nxplayer/nxplayer.c b/system/nxplayer/nxplayer.c index f5b12d8b4..fb16b1fdf 100644 --- a/system/nxplayer/nxplayer.c +++ b/system/nxplayer/nxplayer.c @@ -515,7 +515,7 @@ static int nxplayer_readbuffer(FAR struct nxplayer_s *pPlayer, if (apb->nbytes < apb->nmaxbytes) { -#ifdef CONFIG_DEBUG_FEATURES +#ifdef CONFIG_DEBUG_AUDIO_INFO int errcode = errno; int readerror = ferror(pPlayer->fileFd); @@ -534,7 +534,7 @@ static int nxplayer_readbuffer(FAR struct nxplayer_s *pPlayer, apb->flags |= AUDIO_APB_FINAL; -#ifdef CONFIG_DEBUG_FEATURES +#ifdef CONFIG_DEBUG_AUDIO_ERROR /* Was this a file read error */ if (apb->nbytes == 0 && readerror) From c0a4e00cc911a13235a4c15c9f691afe2dc8bf4e Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 14 Jun 2016 14:10:13 -0600 Subject: [PATCH 51/74] apps/platform: Change some *err() message to *info() messages if what was a *dbg() message does not indicate and error condition. --- platform/arduino-due/sam_cxxinitialize.c | 29 ++++--------------- platform/cloudctrl/stm32_cxxinitialize.c | 29 ++++--------------- platform/fire-stm32v2/stm32_cxxinitialize.c | 29 ++++--------------- platform/mikroe-stm32f4/stm32_cxxinitialize.c | 29 ++++--------------- platform/nucleo-144/stm32_cxxinitialize.c | 29 ++++--------------- platform/nucleo-f303re/stm32_cxxinitialize.c | 29 ++++--------------- platform/nucleo-f4x1re/stm32_cxxinitialize.c | 29 ++++--------------- platform/nucleo-l476rg/stm32_cxxinitialize.c | 29 ++++--------------- .../olimex-stm32-h405/stm32_cxxinitialize.c | 29 ++++--------------- .../olimex-stm32-h407/stm32_cxxinitialize.c | 29 ++++--------------- .../olimex-stm32-p207/stm32_cxxinitialize.c | 29 ++++--------------- .../olimexino-stm32/stm32_cxxinitialize.c | 29 ++++--------------- platform/pcduino-a10/a1x_cxxinitialize.c | 29 ++++--------------- platform/sabre-6quad/imx_cxxinitialize.c | 29 ++++--------------- platform/sam3u-ek/sam_cxxinitialized.c | 29 ++++--------------- platform/sam4e-ek/sam_cxxinitialize.c | 29 ++++--------------- platform/sam4l-xplained/sam_cxxinitialize.c | 29 ++++--------------- .../sam4s-xplained-pro/sam_cxxinitialize.c | 29 ++++--------------- platform/sam4s-xplained/sam_cxxinitialize.c | 29 ++++--------------- platform/sama5d2-xult/sam_cxxinitialize.c | 29 ++++--------------- platform/sama5d3-xplained/sam_cxxinitialize.c | 29 ++++--------------- platform/sama5d3x-ek/sam_cxxinitialize.c | 29 ++++--------------- platform/sama5d4-ek/sam_cxxinitialize.c | 29 ++++--------------- platform/samd20-xplained/sam_cxxinitialize.c | 29 ++++--------------- platform/samd21-xplained/sam_cxxinitialize.c | 29 ++++--------------- platform/same70-xplained/sam_cxxinitialize.c | 29 ++++--------------- platform/saml21-xplained/sam_cxxinitialize.c | 29 ++++--------------- platform/samv71-xult/sam_cxxinitialize.c | 29 ++++--------------- platform/shenzhou/stm32_cxxinitialize.c | 29 ++++--------------- platform/spark/stm32_cxxinitialize.c | 29 ++++--------------- platform/stm3220g-eval/stm32_cxxinitialize.c | 29 ++++--------------- platform/stm3240g-eval/stm32_cxxinitialize.c | 29 ++++--------------- .../stm32f3discovery/stm32_cxxinitialize.c | 29 ++++--------------- .../stm32f429i-disco/stm32_cxxinitialize.c | 29 ++++--------------- .../stm32f4discovery/stm32_cxxinitialize.c | 29 ++++--------------- .../stm32f746g-disco/stm32_cxxinitialize.c | 29 ++++--------------- .../stm32l476vg-disco/stm32_cxxinitialize.c | 29 ++++--------------- .../stm32ldiscovery/stm32_cxxinitialize.c | 29 ++++--------------- platform/teensy-lc/kl_cxxinitialize.c | 29 ++++--------------- .../viewtool-stm32f107/stm32_cxxinitialize.c | 29 ++++--------------- 40 files changed, 200 insertions(+), 960 deletions(-) diff --git a/platform/arduino-due/sam_cxxinitialize.c b/platform/arduino-due/sam_cxxinitialize.c index 7799dbd5c..db73f5b5c 100644 --- a/platform/arduino-due/sam_cxxinitialize.c +++ b/platform/arduino-due/sam_cxxinitialize.c @@ -53,25 +53,10 @@ * constructors. */ -#ifndef CONFIG_DEBUG_FEATURES -# undef CONFIG_DEBUG_CXX -#endif - #ifdef CONFIG_DEBUG_CXX -# define cxxerr err -# define cxxllerr llerr -# ifdef CONFIG_DEBUG_INFO -# define cxxinfo info -# define cxxllinfo llinfo -# else -# define cxxinfo(x...) -# define cxxllinfo(x...) -# endif +# define cxxinfo info #else -# define cxxerr(x...) -# define cxxllerr(x...) # define cxxinfo(x...) -# define cxxllinfo(x...) #endif /**************************************************************************** @@ -98,10 +83,6 @@ extern initializer_t _einit; extern uint32_t _stext; extern uint32_t _etext; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -126,15 +107,15 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); + cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxerr("initp: %p initializer: %p\n", initp, initializer); + cxxinfo("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +125,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxerr("Calling %p\n", initializer); + cxxinfo("Calling %p\n", initializer); initializer(); } } diff --git a/platform/cloudctrl/stm32_cxxinitialize.c b/platform/cloudctrl/stm32_cxxinitialize.c index dff5a6ee2..4f65d0803 100644 --- a/platform/cloudctrl/stm32_cxxinitialize.c +++ b/platform/cloudctrl/stm32_cxxinitialize.c @@ -54,25 +54,10 @@ * constructors. */ -#ifndef CONFIG_DEBUG_FEATURES -# undef CONFIG_DEBUG_CXX -#endif - #ifdef CONFIG_DEBUG_CXX -# define cxxerr err -# define cxxllerr llerr -# ifdef CONFIG_DEBUG_INFO -# define cxxinfo info -# define cxxllinfo llinfo -# else -# define cxxinfo(x...) -# define cxxllinfo(x...) -# endif +# define cxxinfo info #else -# define cxxerr(x...) -# define cxxllerr(x...) # define cxxinfo(x...) -# define cxxllinfo(x...) #endif /**************************************************************************** @@ -99,10 +84,6 @@ extern initializer_t _einit; extern uint32_t _stext; extern uint32_t _etext; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -127,15 +108,15 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); + cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxerr("initp: %p initializer: %p\n", initp, initializer); + cxxinfo("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -145,7 +126,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxerr("Calling %p\n", initializer); + cxxinfo("Calling %p\n", initializer); initializer(); } } diff --git a/platform/fire-stm32v2/stm32_cxxinitialize.c b/platform/fire-stm32v2/stm32_cxxinitialize.c index 3fc4ca107..c4c525f77 100644 --- a/platform/fire-stm32v2/stm32_cxxinitialize.c +++ b/platform/fire-stm32v2/stm32_cxxinitialize.c @@ -53,25 +53,10 @@ * constructors. */ -#ifndef CONFIG_DEBUG_FEATURES -# undef CONFIG_DEBUG_CXX -#endif - #ifdef CONFIG_DEBUG_CXX -# define cxxerr err -# define cxxllerr llerr -# ifdef CONFIG_DEBUG_INFO -# define cxxinfo info -# define cxxllinfo llinfo -# else -# define cxxinfo(x...) -# define cxxllinfo(x...) -# endif +# define cxxinfo info #else -# define cxxerr(x...) -# define cxxllerr(x...) # define cxxinfo(x...) -# define cxxllinfo(x...) #endif /**************************************************************************** @@ -98,10 +83,6 @@ extern initializer_t _einit; extern uint32_t _stext; extern uint32_t _etext; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -126,15 +107,15 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); + cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxerr("initp: %p initializer: %p\n", initp, initializer); + cxxinfo("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +125,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxerr("Calling %p\n", initializer); + cxxinfo("Calling %p\n", initializer); initializer(); } } diff --git a/platform/mikroe-stm32f4/stm32_cxxinitialize.c b/platform/mikroe-stm32f4/stm32_cxxinitialize.c index 2f2083b3b..44d05ef15 100644 --- a/platform/mikroe-stm32f4/stm32_cxxinitialize.c +++ b/platform/mikroe-stm32f4/stm32_cxxinitialize.c @@ -53,25 +53,10 @@ * constructors. */ -#ifndef CONFIG_DEBUG_FEATURES -# undef CONFIG_DEBUG_CXX -#endif - #ifdef CONFIG_DEBUG_CXX -# define cxxerr err -# define cxxllerr llerr -# ifdef CONFIG_DEBUG_INFO -# define cxxinfo info -# define cxxllinfo llinfo -# else -# define cxxinfo(x...) -# define cxxllinfo(x...) -# endif +# define cxxinfo info #else -# define cxxerr(x...) -# define cxxllerr(x...) # define cxxinfo(x...) -# define cxxllinfo(x...) #endif /**************************************************************************** @@ -98,10 +83,6 @@ extern initializer_t _einit; extern uint32_t _stext; extern uint32_t _etext; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -126,15 +107,15 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); + cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxerr("initp: %p initializer: %p\n", initp, initializer); + cxxinfo("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +125,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxerr("Calling %p\n", initializer); + cxxinfo("Calling %p\n", initializer); initializer(); } } diff --git a/platform/nucleo-144/stm32_cxxinitialize.c b/platform/nucleo-144/stm32_cxxinitialize.c index 62c05c4aa..30bc36b1b 100644 --- a/platform/nucleo-144/stm32_cxxinitialize.c +++ b/platform/nucleo-144/stm32_cxxinitialize.c @@ -54,25 +54,10 @@ * constructors */ -#ifndef CONFIG_DEBUG_FEATURES -# undef CONFIG_DEBUG_CXX -#endif - #ifdef CONFIG_DEBUG_CXX -# define cxxerr err -# define cxxllerr llerr -# ifdef CONFIG_DEBUG_INFO -# define cxxinfo info -# define cxxllinfo llinfo -# else -# define cxxinfo(x...) -# define cxxllinfo(x...) -# endif +# define cxxinfo info #else -# define cxxerr(x...) -# define cxxllerr(x...) # define cxxinfo(x...) -# define cxxllinfo(x...) #endif /**************************************************************************** @@ -99,10 +84,6 @@ extern initializer_t _einit; extern uint32_t _stext; extern uint32_t _etext; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -127,15 +108,15 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); + cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxerr("initp: %p initializer: %p\n", initp, initializer); + cxxinfo("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -145,7 +126,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxerr("Calling %p\n", initializer); + cxxinfo("Calling %p\n", initializer); initializer(); } } diff --git a/platform/nucleo-f303re/stm32_cxxinitialize.c b/platform/nucleo-f303re/stm32_cxxinitialize.c index c6f1a621e..fb9bc1142 100644 --- a/platform/nucleo-f303re/stm32_cxxinitialize.c +++ b/platform/nucleo-f303re/stm32_cxxinitialize.c @@ -53,25 +53,10 @@ * constructors */ -#ifndef CONFIG_DEBUG_FEATURES -# undef CONFIG_DEBUG_CXX -#endif - #ifdef CONFIG_DEBUG_CXX -# define cxxerr err -# define cxxllerr llerr -# ifdef CONFIG_DEBUG_INFO -# define cxxinfo info -# define cxxllinfo llinfo -# else -# define cxxinfo(x...) -# define cxxllinfo(x...) -# endif +# define cxxinfo info #else -# define cxxerr(x...) -# define cxxllerr(x...) # define cxxinfo(x...) -# define cxxllinfo(x...) #endif /**************************************************************************** @@ -98,10 +83,6 @@ extern initializer_t _einit; extern uint32_t _stext; extern uint32_t _etext; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -126,15 +107,15 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); + cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxerr("initp: %p initializer: %p\n", initp, initializer); + cxxinfo("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +125,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxerr("Calling %p\n", initializer); + cxxinfo("Calling %p\n", initializer); initializer(); } } diff --git a/platform/nucleo-f4x1re/stm32_cxxinitialize.c b/platform/nucleo-f4x1re/stm32_cxxinitialize.c index 430468585..b0667f577 100644 --- a/platform/nucleo-f4x1re/stm32_cxxinitialize.c +++ b/platform/nucleo-f4x1re/stm32_cxxinitialize.c @@ -53,25 +53,10 @@ * constructors. */ -#ifndef CONFIG_DEBUG_FEATURES -# undef CONFIG_DEBUG_CXX -#endif - #ifdef CONFIG_DEBUG_CXX -# define cxxerr err -# define cxxllerr llerr -# ifdef CONFIG_DEBUG_INFO -# define cxxinfo info -# define cxxllinfo llinfo -# else -# define cxxinfo(x...) -# define cxxllinfo(x...) -# endif +# define cxxinfo info #else -# define cxxerr(x...) -# define cxxllerr(x...) # define cxxinfo(x...) -# define cxxllinfo(x...) #endif /**************************************************************************** @@ -98,10 +83,6 @@ extern initializer_t _einit; extern uint32_t _stext; extern uint32_t _etext; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -126,15 +107,15 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); + cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxerr("initp: %p initializer: %p\n", initp, initializer); + cxxinfo("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +125,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxerr("Calling %p\n", initializer); + cxxinfo("Calling %p\n", initializer); initializer(); } } diff --git a/platform/nucleo-l476rg/stm32_cxxinitialize.c b/platform/nucleo-l476rg/stm32_cxxinitialize.c index 64d56d64c..4730302fc 100644 --- a/platform/nucleo-l476rg/stm32_cxxinitialize.c +++ b/platform/nucleo-l476rg/stm32_cxxinitialize.c @@ -53,25 +53,10 @@ * constructors. */ -#ifndef CONFIG_DEBUG_FEATURES -# undef CONFIG_DEBUG_CXX -#endif - #ifdef CONFIG_DEBUG_CXX -# define cxxerr err -# define cxxllerr llerr -# ifdef CONFIG_DEBUG_INFO -# define cxxinfo info -# define cxxllinfo llinfo -# else -# define cxxinfo(x...) -# define cxxllinfo(x...) -# endif +# define cxxinfo info #else -# define cxxerr(x...) -# define cxxllerr(x...) # define cxxinfo(x...) -# define cxxllinfo(x...) #endif /**************************************************************************** @@ -98,10 +83,6 @@ extern initializer_t _einit; extern uint32_t _stext; extern uint32_t _etext; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -126,15 +107,15 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); + cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxerr("initp: %p initializer: %p\n", initp, initializer); + cxxinfo("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +125,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxerr("Calling %p\n", initializer); + cxxinfo("Calling %p\n", initializer); initializer(); } } diff --git a/platform/olimex-stm32-h405/stm32_cxxinitialize.c b/platform/olimex-stm32-h405/stm32_cxxinitialize.c index 195d9f86f..a6ccc64ae 100644 --- a/platform/olimex-stm32-h405/stm32_cxxinitialize.c +++ b/platform/olimex-stm32-h405/stm32_cxxinitialize.c @@ -53,25 +53,10 @@ * constructors. */ -#ifndef CONFIG_DEBUG_FEATURES -# undef CONFIG_DEBUG_CXX -#endif - #ifdef CONFIG_DEBUG_CXX -# define cxxerr err -# define cxxllerr llerr -# ifdef CONFIG_DEBUG_INFO -# define cxxinfo info -# define cxxllinfo llinfo -# else -# define cxxinfo(x...) -# define cxxllinfo(x...) -# endif +# define cxxinfo info #else -# define cxxerr(x...) -# define cxxllerr(x...) # define cxxinfo(x...) -# define cxxllinfo(x...) #endif /**************************************************************************** @@ -98,10 +83,6 @@ extern initializer_t _einit; extern uint32_t _stext; extern uint32_t _etext; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -126,15 +107,15 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); + cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxerr("initp: %p initializer: %p\n", initp, initializer); + cxxinfo("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +125,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxerr("Calling %p\n", initializer); + cxxinfo("Calling %p\n", initializer); initializer(); } } diff --git a/platform/olimex-stm32-h407/stm32_cxxinitialize.c b/platform/olimex-stm32-h407/stm32_cxxinitialize.c index a38754c4b..c65073a17 100644 --- a/platform/olimex-stm32-h407/stm32_cxxinitialize.c +++ b/platform/olimex-stm32-h407/stm32_cxxinitialize.c @@ -53,25 +53,10 @@ * constructors. */ -#ifndef CONFIG_DEBUG_FEATURES -# undef CONFIG_DEBUG_CXX -#endif - #ifdef CONFIG_DEBUG_CXX -# define cxxerr err -# define cxxllerr llerr -# ifdef CONFIG_DEBUG_INFO -# define cxxinfo info -# define cxxllinfo llinfo -# else -# define cxxinfo(x...) -# define cxxllinfo(x...) -# endif +# define cxxinfo info #else -# define cxxerr(x...) -# define cxxllerr(x...) # define cxxinfo(x...) -# define cxxllinfo(x...) #endif /**************************************************************************** @@ -98,10 +83,6 @@ extern initializer_t _einit; extern uint32_t _stext; extern uint32_t _etext; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -126,15 +107,15 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); + cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxerr("initp: %p initializer: %p\n", initp, initializer); + cxxinfo("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +125,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxerr("Calling %p\n", initializer); + cxxinfo("Calling %p\n", initializer); initializer(); } } diff --git a/platform/olimex-stm32-p207/stm32_cxxinitialize.c b/platform/olimex-stm32-p207/stm32_cxxinitialize.c index 6e02b7474..521739eec 100644 --- a/platform/olimex-stm32-p207/stm32_cxxinitialize.c +++ b/platform/olimex-stm32-p207/stm32_cxxinitialize.c @@ -53,25 +53,10 @@ * constructors. */ -#ifndef CONFIG_DEBUG_FEATURES -# undef CONFIG_DEBUG_CXX -#endif - #ifdef CONFIG_DEBUG_CXX -# define cxxerr err -# define cxxllerr llerr -# ifdef CONFIG_DEBUG_INFO -# define cxxinfo info -# define cxxllinfo llinfo -# else -# define cxxinfo(x...) -# define cxxllinfo(x...) -# endif +# define cxxinfo info #else -# define cxxerr(x...) -# define cxxllerr(x...) # define cxxinfo(x...) -# define cxxllinfo(x...) #endif /**************************************************************************** @@ -98,10 +83,6 @@ extern initializer_t _einit; extern uint32_t _stext; extern uint32_t _etext; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -126,15 +107,15 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); + cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxerr("initp: %p initializer: %p\n", initp, initializer); + cxxinfo("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +125,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxerr("Calling %p\n", initializer); + cxxinfo("Calling %p\n", initializer); initializer(); } } diff --git a/platform/olimexino-stm32/stm32_cxxinitialize.c b/platform/olimexino-stm32/stm32_cxxinitialize.c index e0c5092c1..f634fdadf 100644 --- a/platform/olimexino-stm32/stm32_cxxinitialize.c +++ b/platform/olimexino-stm32/stm32_cxxinitialize.c @@ -53,25 +53,10 @@ * constructors. */ -#ifndef CONFIG_DEBUG_FEATURES -# undef CONFIG_DEBUG_CXX -#endif - #ifdef CONFIG_DEBUG_CXX -# define cxxerr err -# define cxxllerr llerr -# ifdef CONFIG_DEBUG_INFO -# define cxxinfo info -# define cxxllinfo llinfo -# else -# define cxxinfo(x...) -# define cxxllinfo(x...) -# endif +# define cxxinfo info #else -# define cxxerr(x...) -# define cxxllerr(x...) # define cxxinfo(x...) -# define cxxllinfo(x...) #endif /**************************************************************************** @@ -98,10 +83,6 @@ extern initializer_t _einit; extern uint32_t _stext; extern uint32_t _etext; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -126,15 +107,15 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); + cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxerr("initp: %p initializer: %p\n", initp, initializer); + cxxinfo("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +125,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxerr("Calling %p\n", initializer); + cxxinfo("Calling %p\n", initializer); initializer(); } } diff --git a/platform/pcduino-a10/a1x_cxxinitialize.c b/platform/pcduino-a10/a1x_cxxinitialize.c index d81fcd506..bfdd3b4d4 100644 --- a/platform/pcduino-a10/a1x_cxxinitialize.c +++ b/platform/pcduino-a10/a1x_cxxinitialize.c @@ -53,25 +53,10 @@ * constructors. */ -#ifndef CONFIG_DEBUG_FEATURES -# undef CONFIG_DEBUG_CXX -#endif - #ifdef CONFIG_DEBUG_CXX -# define cxxerr err -# define cxxllerr llerr -# ifdef CONFIG_DEBUG_INFO -# define cxxinfo info -# define cxxllinfo llinfo -# else -# define cxxinfo(x...) -# define cxxllinfo(x...) -# endif +# define cxxinfo info #else -# define cxxerr(x...) -# define cxxllerr(x...) # define cxxinfo(x...) -# define cxxllinfo(x...) #endif /**************************************************************************** @@ -98,10 +83,6 @@ extern initializer_t _einit; extern uint32_t _stext; extern uint32_t _etext; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -126,15 +107,15 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); + cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxerr("initp: %p initializer: %p\n", initp, initializer); + cxxinfo("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +125,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxerr("Calling %p\n", initializer); + cxxinfo("Calling %p\n", initializer); initializer(); } } diff --git a/platform/sabre-6quad/imx_cxxinitialize.c b/platform/sabre-6quad/imx_cxxinitialize.c index 5c6e1e00b..fe5e5d465 100644 --- a/platform/sabre-6quad/imx_cxxinitialize.c +++ b/platform/sabre-6quad/imx_cxxinitialize.c @@ -53,25 +53,10 @@ * constructors. */ -#ifndef CONFIG_DEBUG_FEATURES -# undef CONFIG_DEBUG_CXX -#endif - #ifdef CONFIG_DEBUG_CXX -# define cxxerr err -# define cxxllerr llerr -# ifdef CONFIG_DEBUG_INFO -# define cxxinfo info -# define cxxllinfo llinfo -# else -# define cxxinfo(x...) -# define cxxllinfo(x...) -# endif +# define cxxinfo info #else -# define cxxerr(x...) -# define cxxllerr(x...) # define cxxinfo(x...) -# define cxxllinfo(x...) #endif /**************************************************************************** @@ -98,10 +83,6 @@ extern initializer_t _einit; extern uint32_t _stext; extern uint32_t _etext; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -126,15 +107,15 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); + cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxerr("initp: %p initializer: %p\n", initp, initializer); + cxxinfo("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +125,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxerr("Calling %p\n", initializer); + cxxinfo("Calling %p\n", initializer); initializer(); } } diff --git a/platform/sam3u-ek/sam_cxxinitialized.c b/platform/sam3u-ek/sam_cxxinitialized.c index 9980df83c..c95a03efa 100644 --- a/platform/sam3u-ek/sam_cxxinitialized.c +++ b/platform/sam3u-ek/sam_cxxinitialized.c @@ -53,25 +53,10 @@ * constructors. */ -#ifndef CONFIG_DEBUG_FEATURES -# undef CONFIG_DEBUG_CXX -#endif - #ifdef CONFIG_DEBUG_CXX -# define cxxerr err -# define cxxllerr llerr -# ifdef CONFIG_DEBUG_INFO -# define cxxinfo info -# define cxxllinfo llinfo -# else -# define cxxinfo(x...) -# define cxxllinfo(x...) -# endif +# define cxxinfo info #else -# define cxxerr(x...) -# define cxxllerr(x...) # define cxxinfo(x...) -# define cxxllinfo(x...) #endif /**************************************************************************** @@ -98,10 +83,6 @@ extern initializer_t _einit; extern uint32_t _stext; extern uint32_t _etext; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -126,15 +107,15 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); + cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxerr("initp: %p initializer: %p\n", initp, initializer); + cxxinfo("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +125,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxerr("Calling %p\n", initializer); + cxxinfo("Calling %p\n", initializer); initializer(); } } diff --git a/platform/sam4e-ek/sam_cxxinitialize.c b/platform/sam4e-ek/sam_cxxinitialize.c index 9403bf54c..516c7e07f 100644 --- a/platform/sam4e-ek/sam_cxxinitialize.c +++ b/platform/sam4e-ek/sam_cxxinitialize.c @@ -53,25 +53,10 @@ * constructors. */ -#ifndef CONFIG_DEBUG_FEATURES -# undef CONFIG_DEBUG_CXX -#endif - #ifdef CONFIG_DEBUG_CXX -# define cxxerr err -# define cxxllerr llerr -# ifdef CONFIG_DEBUG_INFO -# define cxxinfo info -# define cxxllinfo llinfo -# else -# define cxxinfo(x...) -# define cxxllinfo(x...) -# endif +# define cxxinfo info #else -# define cxxerr(x...) -# define cxxllerr(x...) # define cxxinfo(x...) -# define cxxllinfo(x...) #endif /**************************************************************************** @@ -98,10 +83,6 @@ extern initializer_t _einit; extern uint32_t _stext; extern uint32_t _etext; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -126,15 +107,15 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); + cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxerr("initp: %p initializer: %p\n", initp, initializer); + cxxinfo("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +125,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxerr("Calling %p\n", initializer); + cxxinfo("Calling %p\n", initializer); initializer(); } } diff --git a/platform/sam4l-xplained/sam_cxxinitialize.c b/platform/sam4l-xplained/sam_cxxinitialize.c index 71ec24037..e0dff6945 100644 --- a/platform/sam4l-xplained/sam_cxxinitialize.c +++ b/platform/sam4l-xplained/sam_cxxinitialize.c @@ -53,25 +53,10 @@ * constructors. */ -#ifndef CONFIG_DEBUG_FEATURES -# undef CONFIG_DEBUG_CXX -#endif - #ifdef CONFIG_DEBUG_CXX -# define cxxerr err -# define cxxllerr llerr -# ifdef CONFIG_DEBUG_INFO -# define cxxinfo info -# define cxxllinfo llinfo -# else -# define cxxinfo(x...) -# define cxxllinfo(x...) -# endif +# define cxxinfo info #else -# define cxxerr(x...) -# define cxxllerr(x...) # define cxxinfo(x...) -# define cxxllinfo(x...) #endif /**************************************************************************** @@ -98,10 +83,6 @@ extern initializer_t _einit; extern uint32_t _stext; extern uint32_t _etext; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -126,15 +107,15 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); + cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxerr("initp: %p initializer: %p\n", initp, initializer); + cxxinfo("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +125,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxerr("Calling %p\n", initializer); + cxxinfo("Calling %p\n", initializer); initializer(); } } diff --git a/platform/sam4s-xplained-pro/sam_cxxinitialize.c b/platform/sam4s-xplained-pro/sam_cxxinitialize.c index 388687385..e1182d21f 100644 --- a/platform/sam4s-xplained-pro/sam_cxxinitialize.c +++ b/platform/sam4s-xplained-pro/sam_cxxinitialize.c @@ -53,25 +53,10 @@ * constructors. */ -#ifndef CONFIG_DEBUG_FEATURES -# undef CONFIG_DEBUG_CXX -#endif - #ifdef CONFIG_DEBUG_CXX -# define cxxerr err -# define cxxllerr llerr -# ifdef CONFIG_DEBUG_INFO -# define cxxinfo info -# define cxxllinfo llinfo -# else -# define cxxinfo(x...) -# define cxxllinfo(x...) -# endif +# define cxxinfo info #else -# define cxxerr(x...) -# define cxxllerr(x...) # define cxxinfo(x...) -# define cxxllinfo(x...) #endif /**************************************************************************** @@ -98,10 +83,6 @@ extern initializer_t _einit; extern uint32_t _stext; extern uint32_t _etext; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -126,15 +107,15 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); + cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxerr("initp: %p initializer: %p\n", initp, initializer); + cxxinfo("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +125,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxerr("Calling %p\n", initializer); + cxxinfo("Calling %p\n", initializer); initializer(); } } diff --git a/platform/sam4s-xplained/sam_cxxinitialize.c b/platform/sam4s-xplained/sam_cxxinitialize.c index f145ef0de..e68182e13 100644 --- a/platform/sam4s-xplained/sam_cxxinitialize.c +++ b/platform/sam4s-xplained/sam_cxxinitialize.c @@ -53,25 +53,10 @@ * constructors. */ -#ifndef CONFIG_DEBUG_FEATURES -# undef CONFIG_DEBUG_CXX -#endif - #ifdef CONFIG_DEBUG_CXX -# define cxxerr err -# define cxxllerr llerr -# ifdef CONFIG_DEBUG_INFO -# define cxxinfo info -# define cxxllinfo llinfo -# else -# define cxxinfo(x...) -# define cxxllinfo(x...) -# endif +# define cxxinfo info #else -# define cxxerr(x...) -# define cxxllerr(x...) # define cxxinfo(x...) -# define cxxllinfo(x...) #endif /**************************************************************************** @@ -98,10 +83,6 @@ extern initializer_t _einit; extern uint32_t _stext; extern uint32_t _etext; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -126,15 +107,15 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); + cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxerr("initp: %p initializer: %p\n", initp, initializer); + cxxinfo("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +125,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxerr("Calling %p\n", initializer); + cxxinfo("Calling %p\n", initializer); initializer(); } } diff --git a/platform/sama5d2-xult/sam_cxxinitialize.c b/platform/sama5d2-xult/sam_cxxinitialize.c index 605e6cdda..00d28a083 100644 --- a/platform/sama5d2-xult/sam_cxxinitialize.c +++ b/platform/sama5d2-xult/sam_cxxinitialize.c @@ -53,25 +53,10 @@ * constructors. */ -#ifndef CONFIG_DEBUG_FEATURES -# undef CONFIG_DEBUG_CXX -#endif - #ifdef CONFIG_DEBUG_CXX -# define cxxerr err -# define cxxllerr llerr -# ifdef CONFIG_DEBUG_INFO -# define cxxinfo info -# define cxxllinfo llinfo -# else -# define cxxinfo(x...) -# define cxxllinfo(x...) -# endif +# define cxxinfo info #else -# define cxxerr(x...) -# define cxxllerr(x...) # define cxxinfo(x...) -# define cxxllinfo(x...) #endif /**************************************************************************** @@ -98,10 +83,6 @@ extern initializer_t _einit; extern uint32_t _stext; extern uint32_t _etext; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -126,15 +107,15 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); + cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxerr("initp: %p initializer: %p\n", initp, initializer); + cxxinfo("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +125,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxerr("Calling %p\n", initializer); + cxxinfo("Calling %p\n", initializer); initializer(); } } diff --git a/platform/sama5d3-xplained/sam_cxxinitialize.c b/platform/sama5d3-xplained/sam_cxxinitialize.c index 5a4033d0b..fb13d3eaf 100644 --- a/platform/sama5d3-xplained/sam_cxxinitialize.c +++ b/platform/sama5d3-xplained/sam_cxxinitialize.c @@ -53,25 +53,10 @@ * constructors. */ -#ifndef CONFIG_DEBUG_FEATURES -# undef CONFIG_DEBUG_CXX -#endif - #ifdef CONFIG_DEBUG_CXX -# define cxxerr err -# define cxxllerr llerr -# ifdef CONFIG_DEBUG_INFO -# define cxxinfo info -# define cxxllinfo llinfo -# else -# define cxxinfo(x...) -# define cxxllinfo(x...) -# endif +# define cxxinfo info #else -# define cxxerr(x...) -# define cxxllerr(x...) # define cxxinfo(x...) -# define cxxllinfo(x...) #endif /**************************************************************************** @@ -98,10 +83,6 @@ extern initializer_t _einit; extern uint32_t _stext; extern uint32_t _etext; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -126,15 +107,15 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); + cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxerr("initp: %p initializer: %p\n", initp, initializer); + cxxinfo("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +125,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxerr("Calling %p\n", initializer); + cxxinfo("Calling %p\n", initializer); initializer(); } } diff --git a/platform/sama5d3x-ek/sam_cxxinitialize.c b/platform/sama5d3x-ek/sam_cxxinitialize.c index 3b1ee3dfd..03f9d5f56 100644 --- a/platform/sama5d3x-ek/sam_cxxinitialize.c +++ b/platform/sama5d3x-ek/sam_cxxinitialize.c @@ -53,25 +53,10 @@ * constructors. */ -#ifndef CONFIG_DEBUG_FEATURES -# undef CONFIG_DEBUG_CXX -#endif - #ifdef CONFIG_DEBUG_CXX -# define cxxerr err -# define cxxllerr llerr -# ifdef CONFIG_DEBUG_INFO -# define cxxinfo info -# define cxxllinfo llinfo -# else -# define cxxinfo(x...) -# define cxxllinfo(x...) -# endif +# define cxxinfo info #else -# define cxxerr(x...) -# define cxxllerr(x...) # define cxxinfo(x...) -# define cxxllinfo(x...) #endif /**************************************************************************** @@ -98,10 +83,6 @@ extern initializer_t _einit; extern uint32_t _stext; extern uint32_t _etext; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -126,15 +107,15 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); + cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxerr("initp: %p initializer: %p\n", initp, initializer); + cxxinfo("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +125,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxerr("Calling %p\n", initializer); + cxxinfo("Calling %p\n", initializer); initializer(); } } diff --git a/platform/sama5d4-ek/sam_cxxinitialize.c b/platform/sama5d4-ek/sam_cxxinitialize.c index ccb249e14..c020f55fe 100644 --- a/platform/sama5d4-ek/sam_cxxinitialize.c +++ b/platform/sama5d4-ek/sam_cxxinitialize.c @@ -53,25 +53,10 @@ * constructors. */ -#ifndef CONFIG_DEBUG_FEATURES -# undef CONFIG_DEBUG_CXX -#endif - #ifdef CONFIG_DEBUG_CXX -# define cxxerr err -# define cxxllerr llerr -# ifdef CONFIG_DEBUG_INFO -# define cxxinfo info -# define cxxllinfo llinfo -# else -# define cxxinfo(x...) -# define cxxllinfo(x...) -# endif +# define cxxinfo info #else -# define cxxerr(x...) -# define cxxllerr(x...) # define cxxinfo(x...) -# define cxxllinfo(x...) #endif /**************************************************************************** @@ -98,10 +83,6 @@ extern initializer_t _einit; extern uint32_t _stext; extern uint32_t _etext; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -126,15 +107,15 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); + cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxerr("initp: %p initializer: %p\n", initp, initializer); + cxxinfo("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +125,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxerr("Calling %p\n", initializer); + cxxinfo("Calling %p\n", initializer); initializer(); } } diff --git a/platform/samd20-xplained/sam_cxxinitialize.c b/platform/samd20-xplained/sam_cxxinitialize.c index 698ecf3ac..b25e594f2 100644 --- a/platform/samd20-xplained/sam_cxxinitialize.c +++ b/platform/samd20-xplained/sam_cxxinitialize.c @@ -53,25 +53,10 @@ * constructors. */ -#ifndef CONFIG_DEBUG_FEATURES -# undef CONFIG_DEBUG_CXX -#endif - #ifdef CONFIG_DEBUG_CXX -# define cxxerr err -# define cxxllerr llerr -# ifdef CONFIG_DEBUG_INFO -# define cxxinfo info -# define cxxllinfo llinfo -# else -# define cxxinfo(x...) -# define cxxllinfo(x...) -# endif +# define cxxinfo info #else -# define cxxerr(x...) -# define cxxllerr(x...) # define cxxinfo(x...) -# define cxxllinfo(x...) #endif /**************************************************************************** @@ -98,10 +83,6 @@ extern initializer_t _einit; extern uint32_t _stext; extern uint32_t _etext; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -126,15 +107,15 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); + cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxerr("initp: %p initializer: %p\n", initp, initializer); + cxxinfo("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +125,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxerr("Calling %p\n", initializer); + cxxinfo("Calling %p\n", initializer); initializer(); } } diff --git a/platform/samd21-xplained/sam_cxxinitialize.c b/platform/samd21-xplained/sam_cxxinitialize.c index dbdd4762a..3766534f0 100644 --- a/platform/samd21-xplained/sam_cxxinitialize.c +++ b/platform/samd21-xplained/sam_cxxinitialize.c @@ -53,25 +53,10 @@ * constructors. */ -#ifndef CONFIG_DEBUG_FEATURES -# undef CONFIG_DEBUG_CXX -#endif - #ifdef CONFIG_DEBUG_CXX -# define cxxerr err -# define cxxllerr llerr -# ifdef CONFIG_DEBUG_INFO -# define cxxinfo info -# define cxxllinfo llinfo -# else -# define cxxinfo(x...) -# define cxxllinfo(x...) -# endif +# define cxxinfo info #else -# define cxxerr(x...) -# define cxxllerr(x...) # define cxxinfo(x...) -# define cxxllinfo(x...) #endif /**************************************************************************** @@ -98,10 +83,6 @@ extern initializer_t _einit; extern uint32_t _stext; extern uint32_t _etext; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -126,15 +107,15 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); + cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxerr("initp: %p initializer: %p\n", initp, initializer); + cxxinfo("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +125,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxerr("Calling %p\n", initializer); + cxxinfo("Calling %p\n", initializer); initializer(); } } diff --git a/platform/same70-xplained/sam_cxxinitialize.c b/platform/same70-xplained/sam_cxxinitialize.c index 1c0263c5c..06f2dd75b 100644 --- a/platform/same70-xplained/sam_cxxinitialize.c +++ b/platform/same70-xplained/sam_cxxinitialize.c @@ -53,25 +53,10 @@ * constructors. */ -#ifndef CONFIG_DEBUG_FEATURES -# undef CONFIG_DEBUG_CXX -#endif - #ifdef CONFIG_DEBUG_CXX -# define cxxerr err -# define cxxllerr llerr -# ifdef CONFIG_DEBUG_INFO -# define cxxinfo info -# define cxxllinfo llinfo -# else -# define cxxinfo(x...) -# define cxxllinfo(x...) -# endif +# define cxxinfo info #else -# define cxxerr(x...) -# define cxxllerr(x...) # define cxxinfo(x...) -# define cxxllinfo(x...) #endif /**************************************************************************** @@ -98,10 +83,6 @@ extern initializer_t _einit; extern uint32_t _stext; extern uint32_t _etext; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -126,15 +107,15 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); + cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxerr("initp: %p initializer: %p\n", initp, initializer); + cxxinfo("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +125,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxerr("Calling %p\n", initializer); + cxxinfo("Calling %p\n", initializer); initializer(); } } diff --git a/platform/saml21-xplained/sam_cxxinitialize.c b/platform/saml21-xplained/sam_cxxinitialize.c index d1f518cd0..126c9496b 100644 --- a/platform/saml21-xplained/sam_cxxinitialize.c +++ b/platform/saml21-xplained/sam_cxxinitialize.c @@ -53,25 +53,10 @@ * constructors. */ -#ifndef CONFIG_DEBUG_FEATURES -# undef CONFIG_DEBUG_CXX -#endif - #ifdef CONFIG_DEBUG_CXX -# define cxxerr err -# define cxxllerr llerr -# ifdef CONFIG_DEBUG_INFO -# define cxxinfo info -# define cxxllinfo llinfo -# else -# define cxxinfo(x...) -# define cxxllinfo(x...) -# endif +# define cxxinfo info #else -# define cxxerr(x...) -# define cxxllerr(x...) # define cxxinfo(x...) -# define cxxllinfo(x...) #endif /**************************************************************************** @@ -98,10 +83,6 @@ extern initializer_t _einit; extern uint32_t _stext; extern uint32_t _etext; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -126,15 +107,15 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); + cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxerr("initp: %p initializer: %p\n", initp, initializer); + cxxinfo("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +125,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxerr("Calling %p\n", initializer); + cxxinfo("Calling %p\n", initializer); initializer(); } } diff --git a/platform/samv71-xult/sam_cxxinitialize.c b/platform/samv71-xult/sam_cxxinitialize.c index c945373a9..40edce139 100644 --- a/platform/samv71-xult/sam_cxxinitialize.c +++ b/platform/samv71-xult/sam_cxxinitialize.c @@ -53,25 +53,10 @@ * constructors. */ -#ifndef CONFIG_DEBUG_FEATURES -# undef CONFIG_DEBUG_CXX -#endif - #ifdef CONFIG_DEBUG_CXX -# define cxxerr err -# define cxxllerr llerr -# ifdef CONFIG_DEBUG_INFO -# define cxxinfo info -# define cxxllinfo llinfo -# else -# define cxxinfo(x...) -# define cxxllinfo(x...) -# endif +# define cxxinfo info #else -# define cxxerr(x...) -# define cxxllerr(x...) # define cxxinfo(x...) -# define cxxllinfo(x...) #endif /**************************************************************************** @@ -98,10 +83,6 @@ extern initializer_t _einit; extern uint32_t _stext; extern uint32_t _etext; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -126,15 +107,15 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); + cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxerr("initp: %p initializer: %p\n", initp, initializer); + cxxinfo("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +125,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxerr("Calling %p\n", initializer); + cxxinfo("Calling %p\n", initializer); initializer(); } } diff --git a/platform/shenzhou/stm32_cxxinitialize.c b/platform/shenzhou/stm32_cxxinitialize.c index d93b926db..5bad27c7d 100644 --- a/platform/shenzhou/stm32_cxxinitialize.c +++ b/platform/shenzhou/stm32_cxxinitialize.c @@ -53,25 +53,10 @@ * constructors. */ -#ifndef CONFIG_DEBUG_FEATURES -# undef CONFIG_DEBUG_CXX -#endif - #ifdef CONFIG_DEBUG_CXX -# define cxxerr err -# define cxxllerr llerr -# ifdef CONFIG_DEBUG_INFO -# define cxxinfo info -# define cxxllinfo llinfo -# else -# define cxxinfo(x...) -# define cxxllinfo(x...) -# endif +# define cxxinfo info #else -# define cxxerr(x...) -# define cxxllerr(x...) # define cxxinfo(x...) -# define cxxllinfo(x...) #endif /**************************************************************************** @@ -98,10 +83,6 @@ extern initializer_t _einit; extern uint32_t _stext; extern uint32_t _etext; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -126,15 +107,15 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); + cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxerr("initp: %p initializer: %p\n", initp, initializer); + cxxinfo("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +125,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxerr("Calling %p\n", initializer); + cxxinfo("Calling %p\n", initializer); initializer(); } } diff --git a/platform/spark/stm32_cxxinitialize.c b/platform/spark/stm32_cxxinitialize.c index 9ce8956a2..f11ef6ed5 100644 --- a/platform/spark/stm32_cxxinitialize.c +++ b/platform/spark/stm32_cxxinitialize.c @@ -53,25 +53,10 @@ * constructors. */ -#ifndef CONFIG_DEBUG_FEATURES -# undef CONFIG_DEBUG_CXX -#endif - #ifdef CONFIG_DEBUG_CXX -# define cxxerr err -# define cxxllerr llerr -# ifdef CONFIG_DEBUG_INFO -# define cxxinfo info -# define cxxllinfo llinfo -# else -# define cxxinfo(x...) -# define cxxllinfo(x...) -# endif +# define cxxinfo info #else -# define cxxerr(x...) -# define cxxllerr(x...) # define cxxinfo(x...) -# define cxxllinfo(x...) #endif /**************************************************************************** @@ -98,10 +83,6 @@ extern initializer_t _einit; extern uint32_t _stext; extern uint32_t _etext; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -126,15 +107,15 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); + cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxerr("initp: %p initializer: %p\n", initp, initializer); + cxxinfo("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +125,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxerr("Calling %p\n", initializer); + cxxinfo("Calling %p\n", initializer); initializer(); } } diff --git a/platform/stm3220g-eval/stm32_cxxinitialize.c b/platform/stm3220g-eval/stm32_cxxinitialize.c index b71a994ba..99c0eaaee 100644 --- a/platform/stm3220g-eval/stm32_cxxinitialize.c +++ b/platform/stm3220g-eval/stm32_cxxinitialize.c @@ -53,25 +53,10 @@ * constructors. */ -#ifndef CONFIG_DEBUG_FEATURES -# undef CONFIG_DEBUG_CXX -#endif - #ifdef CONFIG_DEBUG_CXX -# define cxxerr err -# define cxxllerr llerr -# ifdef CONFIG_DEBUG_INFO -# define cxxinfo info -# define cxxllinfo llinfo -# else -# define cxxinfo(x...) -# define cxxllinfo(x...) -# endif +# define cxxinfo info #else -# define cxxerr(x...) -# define cxxllerr(x...) # define cxxinfo(x...) -# define cxxllinfo(x...) #endif /**************************************************************************** @@ -98,10 +83,6 @@ extern initializer_t _einit; extern uint32_t _stext; extern uint32_t _etext; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -126,15 +107,15 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); + cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxerr("initp: %p initializer: %p\n", initp, initializer); + cxxinfo("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +125,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxerr("Calling %p\n", initializer); + cxxinfo("Calling %p\n", initializer); initializer(); } } diff --git a/platform/stm3240g-eval/stm32_cxxinitialize.c b/platform/stm3240g-eval/stm32_cxxinitialize.c index f27a9635c..c03e76c20 100644 --- a/platform/stm3240g-eval/stm32_cxxinitialize.c +++ b/platform/stm3240g-eval/stm32_cxxinitialize.c @@ -53,25 +53,10 @@ * constructors. */ -#ifndef CONFIG_DEBUG_FEATURES -# undef CONFIG_DEBUG_CXX -#endif - #ifdef CONFIG_DEBUG_CXX -# define cxxerr err -# define cxxllerr llerr -# ifdef CONFIG_DEBUG_INFO -# define cxxinfo info -# define cxxllinfo llinfo -# else -# define cxxinfo(x...) -# define cxxllinfo(x...) -# endif +# define cxxinfo info #else -# define cxxerr(x...) -# define cxxllerr(x...) # define cxxinfo(x...) -# define cxxllinfo(x...) #endif /**************************************************************************** @@ -98,10 +83,6 @@ extern initializer_t _einit; extern uint32_t _stext; extern uint32_t _etext; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -126,15 +107,15 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); + cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxerr("initp: %p initializer: %p\n", initp, initializer); + cxxinfo("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +125,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxerr("Calling %p\n", initializer); + cxxinfo("Calling %p\n", initializer); initializer(); } } diff --git a/platform/stm32f3discovery/stm32_cxxinitialize.c b/platform/stm32f3discovery/stm32_cxxinitialize.c index f0db50ba1..c899d50be 100644 --- a/platform/stm32f3discovery/stm32_cxxinitialize.c +++ b/platform/stm32f3discovery/stm32_cxxinitialize.c @@ -53,25 +53,10 @@ * constructors. */ -#ifndef CONFIG_DEBUG_FEATURES -# undef CONFIG_DEBUG_CXX -#endif - #ifdef CONFIG_DEBUG_CXX -# define cxxerr err -# define cxxllerr llerr -# ifdef CONFIG_DEBUG_INFO -# define cxxinfo info -# define cxxllinfo llinfo -# else -# define cxxinfo(x...) -# define cxxllinfo(x...) -# endif +# define cxxinfo info #else -# define cxxerr(x...) -# define cxxllerr(x...) # define cxxinfo(x...) -# define cxxllinfo(x...) #endif /**************************************************************************** @@ -98,10 +83,6 @@ extern initializer_t _einit; extern uint32_t _stext; extern uint32_t _etext; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -126,15 +107,15 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); + cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxerr("initp: %p initializer: %p\n", initp, initializer); + cxxinfo("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +125,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxerr("Calling %p\n", initializer); + cxxinfo("Calling %p\n", initializer); initializer(); } } diff --git a/platform/stm32f429i-disco/stm32_cxxinitialize.c b/platform/stm32f429i-disco/stm32_cxxinitialize.c index 34741aa35..bea0b04cd 100644 --- a/platform/stm32f429i-disco/stm32_cxxinitialize.c +++ b/platform/stm32f429i-disco/stm32_cxxinitialize.c @@ -53,25 +53,10 @@ * constructors. */ -#ifndef CONFIG_DEBUG_FEATURES -# undef CONFIG_DEBUG_CXX -#endif - #ifdef CONFIG_DEBUG_CXX -# define cxxerr err -# define cxxllerr llerr -# ifdef CONFIG_DEBUG_INFO -# define cxxinfo info -# define cxxllinfo llinfo -# else -# define cxxinfo(x...) -# define cxxllinfo(x...) -# endif +# define cxxinfo info #else -# define cxxerr(x...) -# define cxxllerr(x...) # define cxxinfo(x...) -# define cxxllinfo(x...) #endif /**************************************************************************** @@ -98,10 +83,6 @@ extern initializer_t _einit; extern uint32_t _stext; extern uint32_t _etext; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -126,15 +107,15 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); + cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxerr("initp: %p initializer: %p\n", initp, initializer); + cxxinfo("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +125,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxerr("Calling %p\n", initializer); + cxxinfo("Calling %p\n", initializer); initializer(); } } diff --git a/platform/stm32f4discovery/stm32_cxxinitialize.c b/platform/stm32f4discovery/stm32_cxxinitialize.c index 0d04c9aa0..d3165aaba 100644 --- a/platform/stm32f4discovery/stm32_cxxinitialize.c +++ b/platform/stm32f4discovery/stm32_cxxinitialize.c @@ -53,25 +53,10 @@ * constructors */ -#ifndef CONFIG_DEBUG_FEATURES -# undef CONFIG_DEBUG_CXX -#endif - #ifdef CONFIG_DEBUG_CXX -# define cxxerr err -# define cxxllerr llerr -# ifdef CONFIG_DEBUG_INFO -# define cxxinfo info -# define cxxllinfo llinfo -# else -# define cxxinfo(x...) -# define cxxllinfo(x...) -# endif +# define cxxinfo info #else -# define cxxerr(x...) -# define cxxllerr(x...) # define cxxinfo(x...) -# define cxxllinfo(x...) #endif /**************************************************************************** @@ -98,10 +83,6 @@ extern initializer_t _einit; extern uint32_t _stext; extern uint32_t _etext; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -126,15 +107,15 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); + cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxerr("initp: %p initializer: %p\n", initp, initializer); + cxxinfo("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +125,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxerr("Calling %p\n", initializer); + cxxinfo("Calling %p\n", initializer); initializer(); } } diff --git a/platform/stm32f746g-disco/stm32_cxxinitialize.c b/platform/stm32f746g-disco/stm32_cxxinitialize.c index e9707d6e1..33eb1d3f1 100644 --- a/platform/stm32f746g-disco/stm32_cxxinitialize.c +++ b/platform/stm32f746g-disco/stm32_cxxinitialize.c @@ -53,25 +53,10 @@ * constructors */ -#ifndef CONFIG_DEBUG_FEATURES -# undef CONFIG_DEBUG_CXX -#endif - #ifdef CONFIG_DEBUG_CXX -# define cxxerr err -# define cxxllerr llerr -# ifdef CONFIG_DEBUG_INFO -# define cxxinfo info -# define cxxllinfo llinfo -# else -# define cxxinfo(x...) -# define cxxllinfo(x...) -# endif +# define cxxinfo info #else -# define cxxerr(x...) -# define cxxllerr(x...) # define cxxinfo(x...) -# define cxxllinfo(x...) #endif /**************************************************************************** @@ -98,10 +83,6 @@ extern initializer_t _einit; extern uint32_t _stext; extern uint32_t _etext; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -126,15 +107,15 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); + cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxerr("initp: %p initializer: %p\n", initp, initializer); + cxxinfo("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +125,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxerr("Calling %p\n", initializer); + cxxinfo("Calling %p\n", initializer); initializer(); } } diff --git a/platform/stm32l476vg-disco/stm32_cxxinitialize.c b/platform/stm32l476vg-disco/stm32_cxxinitialize.c index ab3814e44..b438b564d 100644 --- a/platform/stm32l476vg-disco/stm32_cxxinitialize.c +++ b/platform/stm32l476vg-disco/stm32_cxxinitialize.c @@ -53,25 +53,10 @@ * constructors. */ -#ifndef CONFIG_DEBUG_FEATURES -# undef CONFIG_DEBUG_CXX -#endif - #ifdef CONFIG_DEBUG_CXX -# define cxxerr err -# define cxxllerr llerr -# ifdef CONFIG_DEBUG_INFO -# define cxxinfo info -# define cxxllinfo llinfo -# else -# define cxxinfo(x...) -# define cxxllinfo(x...) -# endif +# define cxxinfo info #else -# define cxxerr(x...) -# define cxxllerr(x...) # define cxxinfo(x...) -# define cxxllinfo(x...) #endif /**************************************************************************** @@ -98,10 +83,6 @@ extern initializer_t _einit; extern uint32_t _stext; extern uint32_t _etext; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -126,15 +107,15 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); + cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxerr("initp: %p initializer: %p\n", initp, initializer); + cxxinfo("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +125,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxerr("Calling %p\n", initializer); + cxxinfo("Calling %p\n", initializer); initializer(); } } diff --git a/platform/stm32ldiscovery/stm32_cxxinitialize.c b/platform/stm32ldiscovery/stm32_cxxinitialize.c index 1dcc54b75..1e5313369 100644 --- a/platform/stm32ldiscovery/stm32_cxxinitialize.c +++ b/platform/stm32ldiscovery/stm32_cxxinitialize.c @@ -53,25 +53,10 @@ * constructors. */ -#ifndef CONFIG_DEBUG_FEATURES -# undef CONFIG_DEBUG_CXX -#endif - #ifdef CONFIG_DEBUG_CXX -# define cxxerr err -# define cxxllerr llerr -# ifdef CONFIG_DEBUG_INFO -# define cxxinfo info -# define cxxllinfo llinfo -# else -# define cxxinfo(x...) -# define cxxllinfo(x...) -# endif +# define cxxinfo info #else -# define cxxerr(x...) -# define cxxllerr(x...) # define cxxinfo(x...) -# define cxxllinfo(x...) #endif /**************************************************************************** @@ -98,10 +83,6 @@ extern initializer_t _einit; extern uint32_t _stext; extern uint32_t _etext; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -126,15 +107,15 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); + cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxerr("initp: %p initializer: %p\n", initp, initializer); + cxxinfo("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +125,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxerr("Calling %p\n", initializer); + cxxinfo("Calling %p\n", initializer); initializer(); } } diff --git a/platform/teensy-lc/kl_cxxinitialize.c b/platform/teensy-lc/kl_cxxinitialize.c index 2d88785ef..45fa933de 100644 --- a/platform/teensy-lc/kl_cxxinitialize.c +++ b/platform/teensy-lc/kl_cxxinitialize.c @@ -53,25 +53,10 @@ * constructors. */ -#ifndef CONFIG_DEBUG_FEATURES -# undef CONFIG_DEBUG_CXX -#endif - #ifdef CONFIG_DEBUG_CXX -# define cxxerr err -# define cxxllerr llerr -# ifdef CONFIG_DEBUG_INFO -# define cxxinfo info -# define cxxllinfo llinfo -# else -# define cxxinfo(x...) -# define cxxllinfo(x...) -# endif +# define cxxinfo info #else -# define cxxerr(x...) -# define cxxllerr(x...) # define cxxinfo(x...) -# define cxxllinfo(x...) #endif /**************************************************************************** @@ -98,10 +83,6 @@ extern initializer_t _einit; extern uint32_t _stext; extern uint32_t _etext; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -126,15 +107,15 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); + cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxerr("initp: %p initializer: %p\n", initp, initializer); + cxxinfo("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +125,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxerr("Calling %p\n", initializer); + cxxinfo("Calling %p\n", initializer); initializer(); } } diff --git a/platform/viewtool-stm32f107/stm32_cxxinitialize.c b/platform/viewtool-stm32f107/stm32_cxxinitialize.c index 1ef478db5..b92f9dfee 100644 --- a/platform/viewtool-stm32f107/stm32_cxxinitialize.c +++ b/platform/viewtool-stm32f107/stm32_cxxinitialize.c @@ -53,25 +53,10 @@ * constructors. */ -#ifndef CONFIG_DEBUG_FEATURES -# undef CONFIG_DEBUG_CXX -#endif - #ifdef CONFIG_DEBUG_CXX -# define cxxerr err -# define cxxllerr llerr -# ifdef CONFIG_DEBUG_INFO -# define cxxinfo info -# define cxxllinfo llinfo -# else -# define cxxinfo(x...) -# define cxxllinfo(x...) -# endif +# define cxxinfo info #else -# define cxxerr(x...) -# define cxxllerr(x...) # define cxxinfo(x...) -# define cxxllinfo(x...) #endif /**************************************************************************** @@ -98,10 +83,6 @@ extern initializer_t _einit; extern uint32_t _stext; extern uint32_t _etext; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -126,15 +107,15 @@ void up_cxxinitialize(void) { initializer_t *initp; - cxxerr("_sinit: %p _einit: %p _stext: %p _etext: %p\n", - &_sinit, &_einit, &_stext, &_etext); + cxxinfo("_sinit: %p _einit: %p _stext: %p _etext: %p\n", + &_sinit, &_einit, &_stext, &_etext); /* Visit each entry in the initialization table */ for (initp = &_sinit; initp != &_einit; initp++) { initializer_t initializer = *initp; - cxxerr("initp: %p initializer: %p\n", initp, initializer); + cxxinfo("initp: %p initializer: %p\n", initp, initializer); /* Make sure that the address is non-NULL and lies in the text region * defined by the linker script. Some toolchains may put NULL values @@ -144,7 +125,7 @@ void up_cxxinitialize(void) if ((void *)initializer > (void *)&_stext && (void *)initializer < (void *)&_etext) { - cxxerr("Calling %p\n", initializer); + cxxinfo("Calling %p\n", initializer); initializer(); } } From 65899c99e600529c58f922b1a947dd28ce4e6788 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 14 Jun 2016 14:18:07 -0600 Subject: [PATCH 52/74] apps/nshlib: Change some *err() message to *info() messages if what was a *dbg() message does not indicate and error condition. --- nshlib/nsh_console.c | 3 ++- nshlib/nsh_netcmds.c | 29 ++++++++++++++++------------- nshlib/nsh_netinit.c | 4 ++-- nshlib/nsh_romfsetc.c | 11 +++++------ nshlib/nsh_telnetd.c | 2 +- system/i2c/i2c_main.c | 2 +- system/ubloxmodem/ubloxmodem_main.c | 14 +++++++++----- 7 files changed, 36 insertions(+), 29 deletions(-) diff --git a/nshlib/nsh_console.c b/nshlib/nsh_console.c index 04e1eec11..7544d226a 100644 --- a/nshlib/nsh_console.c +++ b/nshlib/nsh_console.c @@ -183,7 +183,8 @@ static ssize_t nsh_consolewrite(FAR struct nsh_vtbl_s *vtbl, ret = fwrite(buffer, 1, nbytes, pstate->cn_outstream); if (ret < 0) { - err("[%d] Failed to send buffer: %d\n", pstate->cn_outfd, errno); + err("ERROR: [%d] Failed to send buffer: %d\n", + pstate->cn_outfd, errno); } return ret; #else diff --git a/nshlib/nsh_netcmds.c b/nshlib/nsh_netcmds.c index 3ee906ab4..8f7dee3ad 100644 --- a/nshlib/nsh_netcmds.c +++ b/nshlib/nsh_netcmds.c @@ -475,7 +475,7 @@ static int nsh_gethostip(FAR char *hostname, FAR union ip_addr_u *ipaddr, he = gethostbyname(hostname); if (he == NULL) { - nerr("gethostbyname failed: %d\n", h_errno); + nerr("ERROR: gethostbyname failed: %d\n", h_errno); return -ENOENT; } @@ -483,7 +483,8 @@ static int nsh_gethostip(FAR char *hostname, FAR union ip_addr_u *ipaddr, else if (he->h_addrtype != addrtype) { - nerr("gethostbyname returned an address of type: %d\n", he->h_addrtype); + nerr("ERROR: gethostbyname returned an address of type: %d\n", + he->h_addrtype); return -ENOEXEC; } else if (addrtype == AF_INET) @@ -499,7 +500,8 @@ static int nsh_gethostip(FAR char *hostname, FAR union ip_addr_u *ipaddr, else if (he->h_addrtype != AF_INET) { - nerr("gethostbyname returned an address of type: %d\n", he->h_addrtype); + nerr("ERROR: gethostbyname returned an address of type: %d\n", + he->h_addrtype); return -ENOEXEC; } else @@ -511,7 +513,8 @@ static int nsh_gethostip(FAR char *hostname, FAR union ip_addr_u *ipaddr, else if (he->h_addrtype != AF_INET6) { - nerr("gethostbyname returned an address of type: %d\n", he->h_addrtype); + nerr("ERROR: gethostbyname returned an address of type: %d\n", + he->h_addrtype); return -ENOEXEC; } else @@ -886,7 +889,7 @@ int cmd_ifconfig(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) if (hw) { - nerr("HW MAC: %s\n", hw); + ninfo("HW MAC: %s\n", hw); netlib_setmacaddr(intf, mac); } #endif @@ -915,7 +918,7 @@ int cmd_ifconfig(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) { /* Set DHCP addr */ - nerr("DHCPC Mode\n"); + ninfo("DHCPC Mode\n"); gip = addr.s_addr = 0; } else @@ -923,7 +926,7 @@ int cmd_ifconfig(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) { /* Set host IP address */ - nerr("Host IP: %s\n", hostip); + ninfo("Host IP: %s\n", hostip); gip = addr.s_addr = inet_addr(hostip); } @@ -950,14 +953,14 @@ int cmd_ifconfig(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) if (gwip) { - nerr("Gateway: %s\n", gwip); + ninfo("Gateway: %s\n", gwip); gip = addr.s_addr = inet_addr(gwip); } else { if (gip) { - nerr("Gateway: default\n"); + ninfo("Gateway: default\n"); gip = NTOHL(gip); gip &= ~0x000000ff; gip |= 0x00000001; @@ -990,12 +993,12 @@ int cmd_ifconfig(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) { if (mask) { - nerr("Netmask: %s\n",mask); + ninfo("Netmask: %s\n",mask); addr.s_addr = inet_addr(mask); } else { - nerr("Netmask: Default\n"); + ninfo("Netmask: Default\n"); addr.s_addr = inet_addr("255.255.255.0"); } @@ -1020,12 +1023,12 @@ int cmd_ifconfig(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) { if (dns) { - nerr("DNS: %s\n", dns); + ninfo("DNS: %s\n", dns); addr.s_addr = inet_addr(dns); } else { - nerr("DNS: Default\n"); + ninfo("DNS: Default\n"); addr.s_addr = gip; } diff --git a/nshlib/nsh_netinit.c b/nshlib/nsh_netinit.c index fcd1f5f16..0adec1467 100644 --- a/nshlib/nsh_netinit.c +++ b/nshlib/nsh_netinit.c @@ -366,7 +366,7 @@ static void nsh_netinit_signal(int signo, FAR siginfo_t *siginfo, /* What is the count on the semaphore? Don't over-post */ ret = sem_getvalue(&g_notify_sem, &semcount); - nllerr("Entry: semcount=%d\n", semcount); + nllinfo("Entry: semcount=%d\n", semcount); if (ret == OK && semcount <= 0) { @@ -600,7 +600,7 @@ errout_with_sigaction: errout_with_socket: close(sd); errout: - nerr("Aborting\n"); + nerr("ERROR: Aborting\n"); return ret; } #endif diff --git a/nshlib/nsh_romfsetc.c b/nshlib/nsh_romfsetc.c index 314a412cc..99dc3d635 100644 --- a/nshlib/nsh_romfsetc.c +++ b/nshlib/nsh_romfsetc.c @@ -103,24 +103,23 @@ int nsh_romfsetc(void) NSECTORS(romfs_img_len), CONFIG_NSH_ROMFSSECTSIZE); if (ret < 0) { - err("nsh: romdisk_register failed: %d\n", -ret); + ferr("ERROR: romdisk_register failed: %d\n", -ret); return ERROR; } /* Mount the file system */ - info("Mounting ROMFS filesystem at target=%s with source=%s\n", - CONFIG_NSH_ROMFSMOUNTPT, MOUNT_DEVNAME); + finfo("Mounting ROMFS filesystem at target=%s with source=%s\n", + CONFIG_NSH_ROMFSMOUNTPT, MOUNT_DEVNAME); ret = mount(MOUNT_DEVNAME, CONFIG_NSH_ROMFSMOUNTPT, "romfs", MS_RDONLY, NULL); if (ret < 0) { - err("nsh: mount(%s,%s,romfs) failed: %d\n", - MOUNT_DEVNAME, CONFIG_NSH_ROMFSMOUNTPT, errno); + ferr("ERROR: mount(%s,%s,romfs) failed: %d\n", + MOUNT_DEVNAME, CONFIG_NSH_ROMFSMOUNTPT, errno); return ERROR; } return OK; } #endif /* CONFIG_NSH_ROMFSETC */ - diff --git a/nshlib/nsh_telnetd.c b/nshlib/nsh_telnetd.c index 8ea7ff083..f4e1da0f7 100644 --- a/nshlib/nsh_telnetd.c +++ b/nshlib/nsh_telnetd.c @@ -205,7 +205,7 @@ int nsh_telnetstart(void) ret = telnetd_start(&config); if (ret < 0) { - err("Failed to tart the Telnet daemon: %d\n", ret); + err("ERROR: Failed to tart the Telnet daemon: %d\n", ret); } return ret; diff --git a/system/i2c/i2c_main.c b/system/i2c/i2c_main.c index 675aa57fb..286739c3a 100644 --- a/system/i2c/i2c_main.c +++ b/system/i2c/i2c_main.c @@ -426,7 +426,7 @@ ssize_t i2ctool_write(FAR struct i2ctool_s *i2ctool, FAR const void *buffer, siz ret = fwrite(buffer, 1, nbytes, OUTSTREAM(i2ctool)); if (ret < 0) { - err("[%d] Failed to send buffer: %d\n", OUTFD(i2ctool), errno); + err("ERROR: [%d] Failed to send buffer: %d\n", OUTFD(i2ctool), errno); } return ret; diff --git a/system/ubloxmodem/ubloxmodem_main.c b/system/ubloxmodem/ubloxmodem_main.c index 273dce39f..2a8a74dbd 100644 --- a/system/ubloxmodem/ubloxmodem_main.c +++ b/system/ubloxmodem/ubloxmodem_main.c @@ -59,14 +59,18 @@ ****************************************************************************/ #ifdef CONFIG_MODEM_U_BLOX_DEBUG -# define m_err err -# define m_info info -# define m_vllerr llerr -# define m_vllinfo llinfo +# define m_err err +# define m_warn llwarn +# define m_info info +# define m_llerr llerr +# define m_llwarn llwarn +# define m_llinfo llinfo #else # define m_err(x...) +# define m_warn(x...) # define m_info(x...) # define m_llerr(x...) +# define m_llwarn(x...) # define m_llinfo(x...) #endif @@ -364,7 +368,7 @@ static int ubloxmodem_at(FAR struct ubloxmodem_cxt* cxt) ret = chat_single(fd, atcmd, resp); - m_err("test result: %d\n", ret); + m_info("test result: %d\n", ret); close(fd); return ret; From a50383db3d50272a56c09004ee1cab26e6fbd202 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 14 Jun 2016 17:53:47 -0600 Subject: [PATCH 53/74] apps/graphics and netutils: Change some *err() message to *info() messages if what was a *dbg() message does not indicate and error condition. --- graphics/tiff/tiff_initialize.c | 13 ++-- netutils/dhcpc/dhcpc.c | 63 ++++++++--------- netutils/dhcpd/dhcpd.c | 34 +++++----- netutils/discover/discover.c | 38 +++++------ netutils/esp8266/esp8266.c | 48 ++++++------- netutils/ftpc/ftpc_chmod.c | 2 +- netutils/ftpc/ftpc_cmd.c | 14 ++-- netutils/ftpc/ftpc_connect.c | 19 +++--- netutils/ftpc/ftpc_getfile.c | 18 ++--- netutils/ftpc/ftpc_getreply.c | 6 +- netutils/ftpc/ftpc_idle.c | 4 +- netutils/ftpc/ftpc_listdir.c | 14 ++-- netutils/ftpc/ftpc_login.c | 10 +-- netutils/ftpc/ftpc_putfile.c | 14 ++-- netutils/ftpc/ftpc_rpwd.c | 6 +- netutils/ftpc/ftpc_socket.c | 20 +++--- netutils/ftpc/ftpc_transfer.c | 16 ++--- netutils/ftpd/ftpd.c | 74 ++++++++++---------- netutils/netlib/netlib_listenon.c | 8 +-- netutils/netlib/netlib_server.c | 6 +- netutils/tftpc/tftpc_get.c | 6 +- netutils/tftpc/tftpc_packets.c | 10 +-- netutils/tftpc/tftpc_put.c | 22 +++--- netutils/thttpd/libhttpd.c | 109 ++++++++++++++++-------------- netutils/thttpd/thttpd.c | 42 +++++++----- netutils/thttpd/thttpd_alloc.c | 14 ++-- netutils/thttpd/thttpd_cgi.c | 22 +++--- netutils/webclient/webclient.c | 9 +-- netutils/webserver/httpd.c | 30 ++++---- 29 files changed, 358 insertions(+), 333 deletions(-) diff --git a/graphics/tiff/tiff_initialize.c b/graphics/tiff/tiff_initialize.c index a5ad3f6af..e8a9e839c 100644 --- a/graphics/tiff/tiff_initialize.c +++ b/graphics/tiff/tiff_initialize.c @@ -415,7 +415,7 @@ static int tiff_datetime(FAR char *timbuf, unsigned int buflen) ret = clock_gettime(CLOCK_REALTIME, &ts); if (ret < 0) { - gerr("clock_gettime failed: %d\n", errno); + gerr("ERROR: clock_gettime failed: %d\n", errno); return ERROR; } @@ -463,21 +463,24 @@ int tiff_initialize(FAR struct tiff_info_s *info) info->outfd = open(info->outfile, O_RDWR|O_CREAT|O_TRUNC, 0666); if (info->outfd < 0) { - gerr("Failed to open %s for reading/writing: %d\n", info->outfile, errno); + gerr("ERROR: Failed to open %s for reading/writing: %d\n", + info->outfile, errno); goto errout; } info->tmp1fd = open(info->tmpfile1, O_RDWR|O_CREAT|O_TRUNC, 0666); if (info->tmp1fd < 0) { - gerr("Failed to open %s for reading/writing: %d\n", info->tmpfile1, errno); + gerr("ERROR: Failed to open %s for reading/writing: %d\n", + info->tmpfile1, errno); goto errout; } info->tmp2fd = open(info->tmpfile2, O_RDWR|O_CREAT|O_TRUNC, 0666); if (info->tmp2fd < 0) { - gerr("Failed to open %s for reading/writing: %d\n", info->tmpfile2, errno); + gerr("ERROR: Failed to open %s for reading/writing: %d\n", + info->tmpfile2, errno); goto errout; } @@ -519,7 +522,7 @@ int tiff_initialize(FAR struct tiff_info_s *info) break; default: - gerr("Unsupported color format: %d\n", info->colorfmt); + gerr("ERROR: Unsupported color format: %d\n", info->colorfmt); return -EINVAL; } diff --git a/netutils/dhcpc/dhcpc.c b/netutils/dhcpc/dhcpc.c index b8c0c280f..487a797be 100644 --- a/netutils/dhcpc/dhcpc.c +++ b/netutils/dhcpc/dhcpc.c @@ -353,9 +353,9 @@ void *dhcpc_open(const void *macaddr, int maclen) struct timeval tv; int ret; - nerr("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", - ((uint8_t*)macaddr)[0], ((uint8_t*)macaddr)[1], ((uint8_t*)macaddr)[2], - ((uint8_t*)macaddr)[3], ((uint8_t*)macaddr)[4], ((uint8_t*)macaddr)[5]); + ninfo("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", + ((uint8_t*)macaddr)[0], ((uint8_t*)macaddr)[1], ((uint8_t*)macaddr)[2], + ((uint8_t*)macaddr)[3], ((uint8_t*)macaddr)[4], ((uint8_t*)macaddr)[5]); /* Allocate an internal DHCP structure */ @@ -469,7 +469,7 @@ int dhcpc_request(void *handle, struct dhcpc_state *presult) { /* Send the DISCOVER command */ - nerr("Broadcast DISCOVER\n"); + ninfo("Broadcast DISCOVER\n"); if (dhcpc_sendmsg(pdhcpc, presult, DHCPDISCOVER) < 0) { return ERROR; @@ -487,7 +487,8 @@ int dhcpc_request(void *handle, struct dhcpc_state *presult) * by a new OFFER. */ - nerr("Received OFFER from %08x\n", ntohl(presult->serverid.s_addr)); + ninfo("Received OFFER from %08x\n", + ntohl(presult->serverid.s_addr)); pdhcpc->ipaddr.s_addr = presult->ipaddr.s_addr; pdhcpc->serverid.s_addr = presult->serverid.s_addr; @@ -522,7 +523,7 @@ int dhcpc_request(void *handle, struct dhcpc_state *presult) { /* Send the REQUEST message to obtain the lease that was offered to us. */ - nerr("Send REQUEST\n"); + ninfo("Send REQUEST\n"); if (dhcpc_sendmsg(pdhcpc, presult, DHCPREQUEST) < 0) { return ERROR; @@ -544,7 +545,7 @@ int dhcpc_request(void *handle, struct dhcpc_state *presult) if (msgtype == DHCPACK) { - nerr("Received ACK\n"); + ninfo("Received ACK\n"); state = STATE_HAVE_LEASE; } @@ -554,7 +555,7 @@ int dhcpc_request(void *handle, struct dhcpc_state *presult) else if (msgtype == DHCPNAK) { - nerr("Received NAK\n"); + ninfo("Received NAK\n"); break; } @@ -565,7 +566,7 @@ int dhcpc_request(void *handle, struct dhcpc_state *presult) else if (msgtype == DHCPOFFER) { - nerr("Received another OFFER, send DECLINE\n"); + ninfo("Received another OFFER, send DECLINE\n"); (void)dhcpc_sendmsg(pdhcpc, presult, DHCPDECLINE); } @@ -573,7 +574,7 @@ int dhcpc_request(void *handle, struct dhcpc_state *presult) else { - nerr("Ignoring msgtype=%d\n", msgtype); + ninfo("Ignoring msgtype=%d\n", msgtype); } } @@ -595,26 +596,26 @@ int dhcpc_request(void *handle, struct dhcpc_state *presult) } while (state != STATE_HAVE_LEASE); - nerr("Got IP address %d.%d.%d.%d\n", - (presult->ipaddr.s_addr ) & 0xff, - (presult->ipaddr.s_addr >> 8 ) & 0xff, - (presult->ipaddr.s_addr >> 16 ) & 0xff, - (presult->ipaddr.s_addr >> 24 ) & 0xff); - nerr("Got netmask %d.%d.%d.%d\n", - (presult->netmask.s_addr ) & 0xff, - (presult->netmask.s_addr >> 8 ) & 0xff, - (presult->netmask.s_addr >> 16 ) & 0xff, - (presult->netmask.s_addr >> 24 ) & 0xff); - nerr("Got DNS server %d.%d.%d.%d\n", - (presult->dnsaddr.s_addr ) & 0xff, - (presult->dnsaddr.s_addr >> 8 ) & 0xff, - (presult->dnsaddr.s_addr >> 16 ) & 0xff, - (presult->dnsaddr.s_addr >> 24 ) & 0xff); - nerr("Got default router %d.%d.%d.%d\n", - (presult->default_router.s_addr ) & 0xff, - (presult->default_router.s_addr >> 8 ) & 0xff, - (presult->default_router.s_addr >> 16 ) & 0xff, - (presult->default_router.s_addr >> 24 ) & 0xff); - nerr("Lease expires in %d seconds\n", presult->lease_time); + ninfo("Got IP address %d.%d.%d.%d\n", + (presult->ipaddr.s_addr ) & 0xff, + (presult->ipaddr.s_addr >> 8 ) & 0xff, + (presult->ipaddr.s_addr >> 16 ) & 0xff, + (presult->ipaddr.s_addr >> 24 ) & 0xff); + ninfo("Got netmask %d.%d.%d.%d\n", + (presult->netmask.s_addr ) & 0xff, + (presult->netmask.s_addr >> 8 ) & 0xff, + (presult->netmask.s_addr >> 16 ) & 0xff, + (presult->netmask.s_addr >> 24 ) & 0xff); + ninfo("Got DNS server %d.%d.%d.%d\n", + (presult->dnsaddr.s_addr ) & 0xff, + (presult->dnsaddr.s_addr >> 8 ) & 0xff, + (presult->dnsaddr.s_addr >> 16 ) & 0xff, + (presult->dnsaddr.s_addr >> 24 ) & 0xff); + ninfo("Got default router %d.%d.%d.%d\n", + (presult->default_router.s_addr ) & 0xff, + (presult->default_router.s_addr >> 8 ) & 0xff, + (presult->default_router.s_addr >> 16 ) & 0xff, + (presult->default_router.s_addr >> 24 ) & 0xff); + ninfo("Lease expires in %d seconds\n", presult->lease_time); return OK; } diff --git a/netutils/dhcpd/dhcpd.c b/netutils/dhcpd/dhcpd.c index 3dd3fbf27..8f16bf033 100644 --- a/netutils/dhcpd/dhcpd.c +++ b/netutils/dhcpd/dhcpd.c @@ -495,7 +495,8 @@ static inline bool dhcpd_parseoptions(void) { /* Bad magic number... skip g_state.ds_outpacket */ - nerr("Bad magic: %d,%d,%d,%d\n", ptr[0], ptr[1], ptr[2], ptr[3]); + nerr("ERROR: Bad magic: %d,%d,%d,%d\n", + ptr[0], ptr[1], ptr[2], ptr[3]); return false; } @@ -798,7 +799,7 @@ static inline int dhcpd_socket(void) sockfd = socket(PF_INET, SOCK_DGRAM, 0); if (sockfd < 0) { - nerr("socket failed: %d\n", errno); + nerr("ERROR: socket failed: %d\n", errno); return ERROR; } @@ -809,7 +810,7 @@ static inline int dhcpd_socket(void) ret = setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, (void*)&optval, sizeof(int)); if (ret < 0) { - nerr("setsockopt SO_REUSEADDR failed: %d\n", errno); + nerr("ERROR: setsockopt SO_REUSEADDR failed: %d\n", errno); close(sockfd); return ERROR; } @@ -820,7 +821,7 @@ static inline int dhcpd_socket(void) ret = setsockopt(sockfd, SOL_SOCKET, SO_BROADCAST, (void*)&optval, sizeof(int)); if (ret < 0) { - nerr("setsockopt SO_BROADCAST failed: %d\n", errno); + nerr("ERROR: setsockopt SO_BROADCAST failed: %d\n", errno); close(sockfd); return ERROR; } @@ -847,7 +848,7 @@ static inline int dhcpd_openresponder(void) sockfd = dhcpd_socket(); if (sockfd < 0) { - nerr("socket failed: %d\n", errno); + nerr("ERROR: socket failed: %d\n", errno); return ERROR; } @@ -860,8 +861,8 @@ static inline int dhcpd_openresponder(void) ret = bind(sockfd, (struct sockaddr *)&addr, sizeof(struct sockaddr_in)); if (ret < 0) { - nerr("bind failed, port=%d addr=%08lx: %d\n", - addr.sin_port, (long)addr.sin_addr.s_addr, errno); + nerr("ERROR: bind failed, port=%d addr=%08lx: %d\n", + addr.sin_port, (long)addr.sin_addr.s_addr, errno); close(sockfd); return ERROR; } @@ -1159,7 +1160,7 @@ static inline int dhcpd_discover(void) { /* Nope... return failure */ - nerr("Failed to get IP address\n"); + nerr("ERROR: Failed to get IP address\n"); return ERROR; } @@ -1167,7 +1168,7 @@ static inline int dhcpd_discover(void) if (!dhcpd_setlease(g_state.ds_inpacket.chaddr, ipaddr, CONFIG_NETUTILS_DHCPD_OFFERTIME)) { - nerr("Failed to set lease\n"); + nerr("ERROR: Failed to set lease\n"); return ERROR; } @@ -1380,7 +1381,7 @@ static inline int dhcpd_openlistener(void) sockfd = dhcpd_socket(); if (sockfd < 0) { - nerr("socket failed: %d\n", errno); + nerr("ERROR: socket failed: %d\n", errno); return ERROR; } @@ -1390,7 +1391,7 @@ static inline int dhcpd_openlistener(void) ret = ioctl(sockfd, SIOCGIFADDR, (unsigned long)&req); if (ret < 0) { - nerr("setsockopt SIOCGIFADDR failed: %d\n", errno); + nerr("ERROR: setsockopt SIOCGIFADDR failed: %d\n", errno); close(sockfd); return ERROR; } @@ -1409,7 +1410,7 @@ static inline int dhcpd_openlistener(void) ret = bind(sockfd, (struct sockaddr *)&addr, sizeof(struct sockaddr_in)); if (ret < 0) { - nerr("bind failed, port=%d addr=%08lx: %d\n", + nerr("ERROR: bind failed, port=%d addr=%08lx: %d\n", addr.sin_port, (long)addr.sin_addr.s_addr, errno); close(sockfd); return ERROR; @@ -1449,7 +1450,7 @@ int dhcpd_run(void) sockfd = dhcpd_openlistener(); if (sockfd < 0) { - nerr("Failed to create socket\n"); + nerr("ERROR: Failed to create socket\n"); break; } } @@ -1461,7 +1462,7 @@ int dhcpd_run(void) { /* On errors (other EINTR), close the socket and try again */ - nerr("recv failed: %d\n", errno); + nerr("ERROR: recv failed: %d\n", errno); if (errno != EINTR) { close(sockfd); @@ -1476,7 +1477,7 @@ int dhcpd_run(void) { /* Failed to parse the message options */ - nerr("No msg type\n"); + nerr("ERROR: No msg type\n"); continue; } @@ -1512,7 +1513,8 @@ int dhcpd_run(void) case DHCPINFORM: /* Not supported */ default: - nerr("Unsupported message type: %d\n", g_state.ds_optmsgtype); + nerr("ERROR: Unsupported message type: %d\n", + g_state.ds_optmsgtype); break; } } diff --git a/netutils/discover/discover.c b/netutils/discover/discover.c index 1502b830d..4b9bd8d2e 100644 --- a/netutils/discover/discover.c +++ b/netutils/discover/discover.c @@ -196,7 +196,7 @@ static int discover_daemon(int argc, char *argv[]) sockfd = discover_openlistener(); if (sockfd < 0) { - nerr("Failed to create socket\n"); + nerr("ERROR: Failed to create socket\n"); break; } } @@ -210,7 +210,7 @@ static int discover_daemon(int argc, char *argv[]) { /* On errors (other EINTR), close the socket and try again */ - nerr("recv failed: %d\n", errno); + nerr("ERROR: recv failed: %d\n", errno); if (errno != EINTR) { close(sockfd); @@ -224,7 +224,7 @@ static int discover_daemon(int argc, char *argv[]) continue; } - nerr("Received discover from %08lx'\n", srcaddr.sin_addr.s_addr); + ninfo("Received discover from %08lx'\n", srcaddr.sin_addr.s_addr); discover_respond(&srcaddr.sin_addr.s_addr); } @@ -239,13 +239,13 @@ static inline int discover_parse(request_t packet) if (packet[0] != DISCOVER_PROTO_ID) { - nerr("Wrong protocol id: %d\n", packet[0]); + nerr("ERROR: Wrong protocol id: %d\n", packet[0]); return ERROR; } if (packet[1] != DISCOVER_REQUEST) { - nerr("Wrong command: %d\n", packet[1]); + nerr("ERROR: Wrong command: %d\n", packet[1]); return ERROR; } @@ -256,7 +256,7 @@ static inline int discover_parse(request_t packet) if ((chk & 0xff) != packet[3]) { - nerr("Checksum does not match: %d\n", packet[3]); + nerr("ERROR: Checksum does not match: %d\n", packet[3]); return ERROR; } else @@ -276,7 +276,7 @@ static inline int discover_respond(in_addr_t *ipaddr) sockfd = discover_openresponder(); if (sockfd < 0) { - nerr("discover_openresponder failed\n"); + nerr("ERROR: discover_openresponder failed\n"); return ERROR; } @@ -291,7 +291,7 @@ static inline int discover_respond(in_addr_t *ipaddr) (struct sockaddr *)&addr, sizeof(struct sockaddr_in)); if (ret < 0) { - nerr("Could not send discovery response: %d\n", errno); + nerr("ERROR: Could not send discovery response: %d\n", errno); } close(sockfd); @@ -311,7 +311,7 @@ static inline int discover_socket() sockfd = socket(PF_INET, SOCK_DGRAM, 0); if (sockfd < 0) { - nerr("socket failed: %d\n", errno); + nerr("ERROR: socket failed: %d\n", errno); return ERROR; } @@ -322,7 +322,7 @@ static inline int discover_socket() ret = setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, (void*)&optval, sizeof(int)); if (ret < 0) { - nerr("setsockopt SO_REUSEADDR failed: %d\n", errno); + nerr("ERROR: setsockopt SO_REUSEADDR failed: %d\n", errno); close(sockfd); return ERROR; } @@ -333,7 +333,7 @@ static inline int discover_socket() ret = setsockopt(sockfd, SOL_SOCKET, SO_BROADCAST, (void*)&optval, sizeof(int)); if (ret < 0) { - nerr("setsockopt SO_BROADCAST failed: %d\n", errno); + nerr("ERROR: setsockopt SO_BROADCAST failed: %d\n", errno); close(sockfd); return ERROR; } @@ -354,7 +354,7 @@ static inline int discover_openlistener() sockfd = discover_socket(); if (sockfd < 0) { - nerr("socket failed: %d\n", errno); + nerr("ERROR: socket failed: %d\n", errno); return ERROR; } @@ -364,7 +364,7 @@ static inline int discover_openlistener() ret = ioctl(sockfd, SIOCGIFADDR, (unsigned long)&req); if (ret < 0) { - nerr("setsockopt SIOCGIFADDR failed: %d\n", errno); + nerr("ERROR: setsockopt SIOCGIFADDR failed: %d\n", errno); close(sockfd); return ERROR; } @@ -382,8 +382,8 @@ static inline int discover_openlistener() ret = bind(sockfd, (struct sockaddr *)&addr, sizeof(struct sockaddr_in)); if (ret < 0) { - nerr("bind failed, port=%d addr=%08lx: %d\n", - addr.sin_port, (long)addr.sin_addr.s_addr, errno); + nerr("ERROR: bind failed, port=%d addr=%08lx: %d\n", + addr.sin_port, (long)addr.sin_addr.s_addr, errno); close(sockfd); return ERROR; } @@ -402,7 +402,7 @@ static inline int discover_openresponder(void) sockfd = discover_socket(); if (sockfd < 0) { - nerr("socket failed: %d\n", errno); + nerr("ERROR: socket failed: %d\n", errno); return ERROR; } @@ -415,8 +415,8 @@ static inline int discover_openresponder(void) ret = bind(sockfd, (struct sockaddr *)&addr, sizeof(struct sockaddr_in)); if (ret < 0) { - nerr("bind failed, port=%d addr=%08lx: %d\n", - addr.sin_port, (long)addr.sin_addr.s_addr, errno); + nerr("ERROR: bind failed, port=%d addr=%08lx: %d\n", + addr.sin_port, (long)addr.sin_addr.s_addr, errno); close(sockfd); return ERROR; } @@ -457,7 +457,7 @@ int discover_start(struct discover_info_s *info) if (pid < 0) { int errval = errno; - nerr("Failed to start the discover daemon: %d\n", errval); + nerr("ERROR: Failed to start the discover daemon: %d\n", errval); return -errval; } diff --git a/netutils/esp8266/esp8266.c b/netutils/esp8266/esp8266.c index 9b9976f95..faa051ed0 100644 --- a/netutils/esp8266/esp8266.c +++ b/netutils/esp8266/esp8266.c @@ -182,20 +182,20 @@ static int lesp_set_baudrate(int baudrate) if (ioctl(g_lesp_state.fd,TCGETS,(unsigned long)&term) < 0) { - nerr("TCGETS failed.\n"); + nerr("ERROR: TCGETS failed.\n"); return -1; } if ((cfsetispeed(&term, baudrate) < 0) || (cfsetospeed(&term, baudrate) < 0)) { - nerr("Connot set baudrate %0x08X\n",baudrate); + nerr("ERROR: Connot set baudrate %0x08X\n",baudrate); return -1; } if (ioctl(g_lesp_state.fd,TCSETS,(unsigned long)&term) < 0) { - nerr("TCSETS failed.\n"); + nerr("ERROR: TCSETS failed.\n"); return -1; } @@ -233,7 +233,7 @@ static lesp_socket_t *get_sock(int sockfd) if ((g_lesp_state.sockets[sockfd].flags & FLAGS_SOCK_USED) == 0) { - nerr("Connection id %d not Created!\n", sockfd); + nerr("ERROR: Connection id %d not Created!\n", sockfd); return NULL; } @@ -271,12 +271,12 @@ static int lesp_low_level_read(uint8_t* buf, int size) if (ret < 0) { int errcode = errno; - nerr("worker read Error %d (errno %d)\n", ret, errcode); + nerr("ERROR: worker read Error %d (errno %d)\n", ret, errcode); UNUSED(errcode); } else if ((fds[0].revents & POLLERR) && (fds[0].revents & POLLHUP)) { - nerr("worker poll read Error %d\n", ret); + nerr("ERROR: worker poll read Error %d\n", ret); ret = -1; } else if (fds[0].revents & POLLIN) @@ -790,7 +790,7 @@ static void *lesp_worker(void *args) if (ret < 0) { - nerr("worker read data Error %d\n", ret); + nerr("ERROR: worker read data Error %d\n", ret); } else if (ret > 0) { @@ -850,7 +850,7 @@ static inline int lesp_create_worker(int priority) if (ret < 0) { - nerr("Cannot Set scheduler parameter thread (%d)\n", ret); + nerr("ERROR: Cannot Set scheduler parameter thread (%d)\n", ret); } else { @@ -862,7 +862,7 @@ static inline int lesp_create_worker(int priority) } else { - nerr("Cannot Get/Set scheduler parameter thread (%d)\n", ret); + nerr("ERROR: Cannot Get/Set scheduler parameter thread (%d)\n", ret); } g_lesp_state.worker.running = true; @@ -871,13 +871,13 @@ static inline int lesp_create_worker(int priority) (ret < 0)?NULL:&thread_attr, lesp_worker, NULL); if (ret < 0) { - nerr("Cannot Create thread return (%d)\n", ret); + nerr("ERROR: Cannot Create thread return (%d)\n", ret); g_lesp_state.worker.running = false; } if (pthread_attr_destroy(&thread_attr) < 0) { - nerr("Cannot destroy thread attribute (%d)\n", ret); + nerr("ERROR: Cannot destroy thread attribute (%d)\n", ret); } } @@ -919,14 +919,14 @@ int lesp_initialize(void) if (g_lesp_state.fd < 0) { - nerr("Cannot open %s\n", CONFIG_NETUTILS_ESP8266_DEV_PATH); + nerr("ERROR: Cannot open %s\n", CONFIG_NETUTILS_ESP8266_DEV_PATH); ret = -1; } #ifdef CONFIG_SERIAL_TERMIOS if (ret >= 0 && lesp_set_baudrate(CONFIG_NETUTILS_ESP8266_BAUDRATE) < 0) { - nerr("Cannot set baud rate %d\n", CONFIG_NETUTILS_ESP8266_BAUDRATE); + nerr("ERROR: Cannot set baud rate %d\n", CONFIG_NETUTILS_ESP8266_BAUDRATE); ret = -1; } #endif @@ -1020,7 +1020,7 @@ int lesp_ap_connect(const char* ssid_name, const char* ap_key, int timeout_s) if (! g_lesp_state.is_initialized) { - nerr("ESP8266 not initialized; can't run manual connect\n"); + nerr("ERROR: ESP8266 not initialized; can't run manual connect\n"); ret = -1; } else @@ -1167,7 +1167,7 @@ int lesp_list_access_points(lesp_cb_t cb) ret = lesp_parse_cwlap_ans_line(g_lesp_state.bufans,&ap); if (ret < 0) { - nerr("Line badly formed."); + nerr("ERROR: Line badly formed."); } cb(&ap); @@ -1210,7 +1210,7 @@ int lesp_socket(int domain, int type, int protocol) if ((domain != PF_INET) && (type != SOCK_STREAM) && (IPPROTO_TCP)) { - nerr("Not Implemented!\n"); + nerr("ERROR: Not Implemented!\n"); return -1; } @@ -1272,7 +1272,7 @@ int lesp_closesocket(int sockfd) int lesp_bind(int sockfd, FAR const struct sockaddr *addr, socklen_t addrlen) { - nerr("Not implemented %s\n", __func__); + nerr("ERROR: Not implemented %s\n", __func__); return -1; } @@ -1322,13 +1322,13 @@ int lesp_connect(int sockfd, FAR const struct sockaddr *addr, socklen_t addrlen) int lesp_listen(int sockfd, int backlog) { - nerr("Not implemented %s\n", __func__); + nerr("ERROR: Not implemented %s\n", __func__); return -1; } int lesp_accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen) { - nerr("Not implemented %s\n", __func__); + nerr("ERROR: Not implemented %s\n", __func__); return -1; } @@ -1385,7 +1385,7 @@ ssize_t lesp_send(int sockfd, FAR const uint8_t *buf, size_t len, int flags) if (ret < 0) { - nerr("Cannot send in socket %d, %d bytes\n", sockfd, len); + nerr("ERROR: Cannot send in socket %d, %d bytes\n", sockfd, len); return -1; } @@ -1475,28 +1475,28 @@ ssize_t lesp_recv(int sockfd, FAR uint8_t *buf, size_t len, int flags) int lesp_setsockopt(int sockfd, int level, int option, FAR const void *value, socklen_t value_len) { - nerr("Not implemented %s\n", __func__); + nerr("ERROR: Not implemented %s\n", __func__); return -1; } int lesp_getsockopt(int sockfd, int level, int option, FAR void *value, FAR socklen_t *value_len) { - nerr("Not implemented %s\n", __func__); + nerr("ERROR: Not implemented %s\n", __func__); return -1; } int lesp_gethostbyname(char *hostname, uint16_t usNameLen, unsigned long *out_ip_addr) { - nerr("Not implemented %s\n", __func__); + nerr("ERROR: Not implemented %s\n", __func__); return -1; } int lesp_mdnsadvertiser(uint16_t mdnsEnabled, char *deviceServiceName, uint16_t deviceServiceNameLength) { - nerr("Not implemented %s\n", __func__); + nerr("ERROR: Not implemented %s\n", __func__); return -1; } diff --git a/netutils/ftpc/ftpc_chmod.c b/netutils/ftpc/ftpc_chmod.c index 183c6dced..b3e651fc0 100644 --- a/netutils/ftpc/ftpc_chmod.c +++ b/netutils/ftpc/ftpc_chmod.c @@ -99,7 +99,7 @@ int ftpc_chmod(SESSION handle, FAR const char *path, FAR const char *mode) } else { - nerr("Server does not support SITE CHMOD\n"); + nwarn("WARNING: Server does not support SITE CHMOD\n"); } return ERROR; diff --git a/netutils/ftpc/ftpc_cmd.c b/netutils/ftpc/ftpc_cmd.c index 5a99b4662..b6a2bd598 100644 --- a/netutils/ftpc/ftpc_cmd.c +++ b/netutils/ftpc/ftpc_cmd.c @@ -136,7 +136,7 @@ int ftpc_cmd(struct ftpc_session_s *session, const char *cmd, ...) if (!ftpc_sockconnected(&session->cmd)) { - nerr("Cmd channel si not connected\n"); + nwarn("WARNING: Cmd channel is not connected\n"); goto errout; } @@ -164,7 +164,7 @@ int ftpc_cmd(struct ftpc_session_s *session, const char *cmd, ...) if (ret < 0) { - nerr("Error sending cmd %s: %d\n", cmd, errno); + nerr("ERROR: Error sending cmd %s: %d\n", cmd, errno); goto errout; } @@ -173,7 +173,7 @@ int ftpc_cmd(struct ftpc_session_s *session, const char *cmd, ...) ret = fptc_getreply(session); if (ret < 0) { - nerr("Error getting reply: %d\n", errno); + nerr("ERROR: Error getting reply: %d\n", errno); goto errout; } @@ -183,7 +183,7 @@ int ftpc_cmd(struct ftpc_session_s *session, const char *cmd, ...) { /* Server is closing the control connection. */ - nerr("Server closed control connection\n"); + nwarn("WARNING: Server closed control connection\n"); /* If we were previously logged in and this is not a QUIT commnad * then attempt to automatically reconnect to the server. @@ -196,7 +196,7 @@ int ftpc_cmd(struct ftpc_session_s *session, const char *cmd, ...) if (reconnect) { - nerr("Reconnect failed\n"); + nwarn("WARNING: Reconnect failed\n"); goto errout; } else @@ -205,12 +205,12 @@ int ftpc_cmd(struct ftpc_session_s *session, const char *cmd, ...) * continue the loop and try to send the command again. */ - nerr("Reconnecting...\n"); + ninfo("Reconnecting...\n"); reconnect = true; ret = ftpc_restore(); if (ret < 0) { - nerr("Failed to restore the connection"); + nwarn("WARNING: Failed to restore the connection"); goto errout; } continue; diff --git a/netutils/ftpc/ftpc_connect.c b/netutils/ftpc/ftpc_connect.c index fa915d015..96f920503 100644 --- a/netutils/ftpc/ftpc_connect.c +++ b/netutils/ftpc/ftpc_connect.c @@ -73,7 +73,7 @@ SESSION ftpc_connect(FAR struct ftpc_connect_s *server) session = (struct ftpc_session_s *)zalloc(sizeof(struct ftpc_session_s)); if (!session) { - nerr("Failed to allocate a session\n"); + nerr("ERROR: Failed to allocate a session\n"); set_errno(ENOMEM); goto errout; } @@ -116,7 +116,7 @@ SESSION ftpc_connect(FAR struct ftpc_connect_s *server) ret = ftpc_reconnect(session); if (ret != OK) { - nerr("ftpc_reconnect() failed: %d\n", errno); + nerr("ERROR: ftpc_reconnect() failed: %d\n", errno); goto errout_with_alloc; } @@ -155,7 +155,7 @@ int ftpc_reconnect(FAR struct ftpc_session_s *session) ret = wd_start(session->wdog, session->conntimeo, ftpc_timeout, 1, session); if (ret != OK) { - nerr("wd_start() failed\n"); + nerr("ERROR: wd_start() failed\n"); goto errout; } @@ -164,7 +164,7 @@ int ftpc_reconnect(FAR struct ftpc_session_s *session) ret = ftpc_sockinit(&session->cmd); if (ret != OK) { - nerr("ftpc_sockinit() failed: %d\n", errno); + nerr("ERROR: ftpc_sockinit() failed: %d\n", errno); goto errout; } @@ -172,7 +172,8 @@ int ftpc_reconnect(FAR struct ftpc_session_s *session) #ifdef CONFIG_DEBUG_NET_ERROR tmp = inet_ntoa(session->addr); - nerr("Connecting to server address %s:%d\n", tmp, ntohs(session->port)); + ninfo("Connecting to server address %s:%d\n", + tmp, ntohs(session->port)); #endif addr.sin_family = AF_INET; @@ -182,7 +183,7 @@ int ftpc_reconnect(FAR struct ftpc_session_s *session) ret = ftpc_sockconnect(&session->cmd, &addr); if (ret != OK) { - nerr("ftpc_sockconnect() failed: %d\n", errno); + nerr("ERROR: ftpc_sockconnect() failed: %d\n", errno); goto errout_with_socket; } @@ -217,11 +218,11 @@ int ftpc_reconnect(FAR struct ftpc_session_s *session) } #ifdef CONFIG_DEBUG_NET_ERROR - nerr("Connected\n"); + ninfo("Connected\n"); tmp = inet_ntoa(addr.sin_addr); - nerr(" Remote address: %s:%d\n", tmp, ntohs(addr.sin_port)); + ninfo(" Remote address: %s:%d\n", tmp, ntohs(addr.sin_port)); tmp = inet_ntoa(session->cmd.laddr.sin_addr); - nerr(" Local address: %s:%d\n", tmp, ntohs(session->cmd.laddr.sin_port)); + ninfo(" Local address: %s:%d\n", tmp, ntohs(session->cmd.laddr.sin_port)); #endif return OK; diff --git a/netutils/ftpc/ftpc_getfile.c b/netutils/ftpc/ftpc_getfile.c index ddca40baa..138a8b1e5 100644 --- a/netutils/ftpc/ftpc_getfile.c +++ b/netutils/ftpc/ftpc_getfile.c @@ -111,7 +111,7 @@ static int ftpc_recvinit(struct ftpc_session_s *session, FAR const char *path, ret = ftpc_cmd(session, "REST %ld", offset); if (ret < 0) { - nerr("REST command failed: %d\n", errno); + nwarn("WARNING: REST command failed: %d\n", errno); return ERROR; } @@ -143,7 +143,7 @@ static int ftpc_recvinit(struct ftpc_session_s *session, FAR const char *path, ret = ftpc_cmd(session, "RETR %s", path); if (ret < 0) { - nerr("RETR command failed: %d\n", errno); + nwarn("WARNING: RETR command failed: %d\n", errno); return ERROR; } @@ -157,7 +157,7 @@ static int ftpc_recvinit(struct ftpc_session_s *session, FAR const char *path, ret = ftpc_sockaccept(&session->data); if (ret != OK) { - nerr("Data connection not accepted\n"); + nerr("ERROR: Data connection not accepted\n"); } } @@ -262,7 +262,7 @@ int ftpc_getfile(SESSION handle, FAR const char *rname, FAR const char *lname, abslpath = ftpc_abslpath(session, lname); if (!abslpath) { - nerr("ftpc_abslpath(%s) failed: %d\n", errno); + nwarn("WARNING: ftpc_abslpath(%s) failed: %d\n", errno); goto errout; } @@ -275,7 +275,7 @@ int ftpc_getfile(SESSION handle, FAR const char *rname, FAR const char *lname, if (S_ISDIR(statbuf.st_mode)) { - nerr("'%s' is a directory\n", abslpath); + nwarn("WARNING: '%s' is a directory\n", abslpath); goto errout_with_abspath; } } @@ -285,7 +285,7 @@ int ftpc_getfile(SESSION handle, FAR const char *rname, FAR const char *lname, #ifdef S_IWRITE if (!(statbuf.st_mode & S_IWRITE)) { - nerr("'%s' permission denied\n", abslpath); + nwarn("WARNING: '%s' permission denied\n", abslpath); goto errout_with_abspath; } #endif @@ -308,14 +308,14 @@ int ftpc_getfile(SESSION handle, FAR const char *rname, FAR const char *lname, ret = ftpc_recvinit(session, rname, xfrmode, offset); if (ret != OK) { - nerr("ftpc_recvinit failed\n"); + nerr("ERROR: ftpc_recvinit failed\n"); goto errout_with_abspath; } loutstream = fopen(abslpath, (offset > 0 || (how == FTPC_GET_APPEND)) ? "a" : "w"); if (!loutstream) { - nerr("fopen failed: %d\n", errno); + nerr("ERROR: fopen failed: %d\n", errno); goto errout_with_abspath; } @@ -326,7 +326,7 @@ int ftpc_getfile(SESSION handle, FAR const char *rname, FAR const char *lname, ret = fseek(loutstream, offset, SEEK_SET); if (ret != OK) { - nerr("fseek failed: %d\n", errno); + nerr("ERROR: fseek failed: %d\n", errno); goto errout_with_outstream; } } diff --git a/netutils/ftpc/ftpc_getreply.c b/netutils/ftpc/ftpc_getreply.c index e538d1a97..25e025ca1 100644 --- a/netutils/ftpc/ftpc_getreply.c +++ b/netutils/ftpc/ftpc_getreply.c @@ -82,7 +82,7 @@ static int ftpc_gets(struct ftpc_session_s *session) if (!ftpc_sockconnected(&session->cmd)) { - nerr("Cmd channel disconnected\n"); + nwarn("WARNING: Cmd channel disconnected\n"); return ERROR; } @@ -98,7 +98,7 @@ static int ftpc_gets(struct ftpc_session_s *session) if (ch == EOF) { - nerr("EOF: Server closed command stream\n"); + nwarn("WARNING: EOF: Server closed command stream\n"); ftpc_reset(session); return ERROR; } @@ -189,7 +189,7 @@ static int ftpc_gets(struct ftpc_session_s *session) } else { - nerr("Reply truncated\n"); + nwarn("WARNING: Reply truncated\n"); } } diff --git a/netutils/ftpc/ftpc_idle.c b/netutils/ftpc/ftpc_idle.c index 879049b2e..900357853 100644 --- a/netutils/ftpc/ftpc_idle.c +++ b/netutils/ftpc/ftpc_idle.c @@ -91,7 +91,7 @@ int ftpc_idle(SESSION handle, unsigned int idletime) if (!FTPC_HAS_IDLE(session)) { - nerr("Server does not support SITE IDLE\n"); + nwarn("WARNING: Server does not support SITE IDLE\n"); return ERROR; } @@ -114,7 +114,7 @@ int ftpc_idle(SESSION handle, unsigned int idletime) { /* Server does not support SITE IDLE */ - nerr("Server does not support SITE IDLE\n"); + nwarn("WARNING: Server does not support SITE IDLE\n"); FTPC_CLR_IDLE(session); } diff --git a/netutils/ftpc/ftpc_listdir.c b/netutils/ftpc/ftpc_listdir.c index 6a0129757..d330dbabb 100644 --- a/netutils/ftpc/ftpc_listdir.c +++ b/netutils/ftpc/ftpc_listdir.c @@ -170,7 +170,7 @@ static int ftpc_recvdir(FAR struct ftpc_session_s *session, if (!ftpc_connected(session)) { - nerr("Not connected to server\n"); + nerr("ERROR: Not connected to server\n"); return ERROR; } @@ -209,7 +209,7 @@ static int ftpc_recvdir(FAR struct ftpc_session_s *session, ret = ftpc_sockaccept(&session->data); if (ret != OK) { - nerr("ftpc_sockaccept() failed: %d\n", errno); + nerr("ERROR: ftpc_sockaccept() failed: %d\n", errno); return ERROR; } } @@ -297,7 +297,7 @@ FAR struct ftpc_dirlist_s *ftpc_listdir(SESSION handle, filestream = fopen(tmpfname, "w+"); if (!filestream) { - nerr("Failed to create %s: %d\n", tmpfname, errno); + nerr("ERROR: Failed to create %s: %d\n", tmpfname, errno); free(absrpath); free(tmpfname); return NULL; @@ -312,7 +312,7 @@ FAR struct ftpc_dirlist_s *ftpc_listdir(SESSION handle, ret = ftpc_cmd(session, "CWD %s", absrpath); if (ret != OK) { - nerr("CWD to %s failed\n", absrpath); + nerr("ERROR: CWD to %s failed\n", absrpath); } } @@ -329,7 +329,7 @@ FAR struct ftpc_dirlist_s *ftpc_listdir(SESSION handle, int tmpret = ftpc_cmd(session, "CWD %s", session->currdir); if (tmpret != OK) { - nerr("CWD back to to %s failed\n", session->currdir); + nerr("ERROR: CWD back to to %s failed\n", session->currdir); } } @@ -346,7 +346,7 @@ FAR struct ftpc_dirlist_s *ftpc_listdir(SESSION handle, ftpc_nlstparse(filestream, ftpc_dircount, &nnames); if (!nnames) { - nerr("Nothing found in directory\n"); + nwarn("WARNING: Nothing found in directory\n"); goto errout; } ninfo("nnames: %d\n", nnames); @@ -357,7 +357,7 @@ FAR struct ftpc_dirlist_s *ftpc_listdir(SESSION handle, dirlist = (struct ftpc_dirlist_s *)malloc(allocsize); if (!dirlist) { - nerr("Failed to allocate dirlist\n"); + nerr("ERROR: Failed to allocate dirlist\n"); goto errout; } diff --git a/netutils/ftpc/ftpc_login.c b/netutils/ftpc/ftpc_login.c index 94743421e..5e6e6c6ed 100644 --- a/netutils/ftpc/ftpc_login.c +++ b/netutils/ftpc/ftpc_login.c @@ -89,7 +89,7 @@ int ftpc_login(SESSION handle, FAR struct ftpc_login_s *login) if (!ftpc_connected(session)) { - nerr("Not connected\n"); + nerr("ERROR: Not connected\n"); errcode = ENOTCONN; goto errout_with_err; } @@ -98,7 +98,7 @@ int ftpc_login(SESSION handle, FAR struct ftpc_login_s *login) if (ftpc_loggedin(session)) { - nerr("Already logged in\n"); + nerr("ERROR: Already logged in\n"); errcode = EINVAL; goto errout_with_err; } @@ -123,7 +123,7 @@ int ftpc_login(SESSION handle, FAR struct ftpc_login_s *login) ret = ftpc_relogin(session); if (ret != OK) { - nerr("login failed: %d\n", errno); + nerr("ERROR: login failed: %d\n", errno); goto errout; } @@ -167,7 +167,7 @@ int ftpc_relogin(FAR struct ftpc_session_s *session) ret = ftpc_cmd(session, "USER %s", session->uname); if (ret != OK) { - nerr("USER %s cmd failed: %d\n", session->uname, errno); + nerr("ERROR: USER %s cmd failed: %d\n", session->uname, errno); return ERROR; } @@ -189,7 +189,7 @@ int ftpc_relogin(FAR struct ftpc_session_s *session) ret = ftpc_cmd(session, "PASS %s", session->pwd); if (ret != OK) { - nerr("PASS %s cmd failed: %d\n", session->pwd, errno); + nerr("ERROR: PASS %s cmd failed: %d\n", session->pwd, errno); return ret; } diff --git a/netutils/ftpc/ftpc_putfile.c b/netutils/ftpc/ftpc_putfile.c index f4fc55355..2a29a75b8 100644 --- a/netutils/ftpc/ftpc_putfile.c +++ b/netutils/ftpc/ftpc_putfile.c @@ -334,7 +334,7 @@ static int ftpc_sendfile(struct ftpc_session_s *session, const char *path, ret = ftpc_sockaccept(&session->data); if (ret != OK) { - nerr("Data connection not accepted\n"); + nerr("ERROR: Data connection not accepted\n"); return ERROR; } } @@ -400,7 +400,7 @@ int ftp_putfile(SESSION handle, const char *lname, const char *rname, abslpath = ftpc_abslpath(session, lname); if (!abslpath) { - nerr("ftpc_abslpath(%s) failed: %d\n", errno); + nwarn("WARNING: ftpc_abslpath(%s) failed: %d\n", errno); goto errout; } @@ -409,7 +409,7 @@ int ftp_putfile(SESSION handle, const char *lname, const char *rname, ret = stat(abslpath, &statbuf); if (ret != OK) { - nerr("stat(%s) failed: %d\n", errno); + nwarn("WARNING: stat(%s) failed: %d\n", errno); goto errout_with_abspath; } @@ -417,7 +417,7 @@ int ftp_putfile(SESSION handle, const char *lname, const char *rname, if (S_ISDIR(statbuf.st_mode)) { - nerr("%s is a directory\n", abslpath); + nwarn("WARNING: %s is a directory\n", abslpath); goto errout_with_abspath; } @@ -426,7 +426,7 @@ int ftp_putfile(SESSION handle, const char *lname, const char *rname, finstream = fopen(abslpath, "r"); if (!finstream) { - nerr("fopen() failed: %d\n", errno); + nwarn("WARNING: fopen() failed: %d\n", errno); goto errout_with_abspath; } @@ -442,7 +442,7 @@ int ftp_putfile(SESSION handle, const char *lname, const char *rname, session->offset = ftpc_filesize(session, rname); if (session->offset == (off_t)ERROR) { - nerr("Failed to get size of remote file: %s\n", rname); + nwarn("WARNING: Failed to get size of remote file: %s\n", rname); goto errout_with_instream; } else @@ -454,7 +454,7 @@ int ftp_putfile(SESSION handle, const char *lname, const char *rname, ret = fseek(finstream, session->offset, SEEK_SET); if (ret != OK) { - nerr("fseek failed: %d\n", errno); + nerr("ERROR: fseek failed: %d\n", errno); goto errout_with_instream; } } diff --git a/netutils/ftpc/ftpc_rpwd.c b/netutils/ftpc/ftpc_rpwd.c index 0ce16e3d1..62c5ed3eb 100644 --- a/netutils/ftpc/ftpc_rpwd.c +++ b/netutils/ftpc/ftpc_rpwd.c @@ -100,7 +100,7 @@ FAR char *ftpc_rpwd(SESSION handle) start = strchr(session->reply, '\"'); if (!start) { - nerr("Opening quote not found\n"); + nwarn("WARNING: Opening quote not found\n"); return NULL; } start++; @@ -108,7 +108,7 @@ FAR char *ftpc_rpwd(SESSION handle) end = strchr(start, '\"'); if (!end) { - nerr("Closing quote not found\n"); + nwarn("WARNING: Closing quote not found\n"); return NULL; } @@ -124,7 +124,7 @@ FAR char *ftpc_rpwd(SESSION handle) pwd = (char *)malloc(len + 1); if (!pwd) { - nerr("Failed to allocate string\n"); + nerr("ERROR: Failed to allocate string\n"); return NULL; } diff --git a/netutils/ftpc/ftpc_socket.c b/netutils/ftpc/ftpc_socket.c index 633493f9b..efdbce6bb 100644 --- a/netutils/ftpc/ftpc_socket.c +++ b/netutils/ftpc/ftpc_socket.c @@ -92,7 +92,7 @@ int ftpc_sockinit(FAR struct ftpc_socket_s *sock) sock->sd = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP); if (sock->sd < 0) { - nerr("socket() failed: %d\n", errno); + nerr("ERROR: socket() failed: %d\n", errno); goto errout; } @@ -103,7 +103,7 @@ int ftpc_sockinit(FAR struct ftpc_socket_s *sock) sock->instream = fdopen(sock->sd, "r"); if (!sock->instream) { - nerr("fdopen() failed: %d\n", errno); + nerr("ERROR: fdopen() failed: %d\n", errno); goto errout_with_sd; } @@ -114,7 +114,7 @@ int ftpc_sockinit(FAR struct ftpc_socket_s *sock) sock->outstream = fdopen(sock->sd, "w"); if (!sock->outstream) { - nerr("fdopen() failed: %d\n", errno); + nerr("ERROR: fdopen() failed: %d\n", errno); goto errout_with_instream; } @@ -173,7 +173,7 @@ int ftpc_sockconnect(struct ftpc_socket_s *sock, struct sockaddr_in *addr) ret = connect(sock->sd, (struct sockaddr *)addr, sizeof(struct sockaddr)); if (ret < 0) { - nerr("connect() failed: %d\n", errno); + nerr("ERROR: connect() failed: %d\n", errno); return ERROR; } @@ -182,7 +182,7 @@ int ftpc_sockconnect(struct ftpc_socket_s *sock, struct sockaddr_in *addr) ret = ftpc_sockgetsockname(sock, &sock->laddr); if (ret < 0) { - nerr("ftpc_sockgetsockname() failed: %d\n", errno); + nerr("ERROR: ftpc_sockgetsockname() failed: %d\n", errno); return ERROR; } @@ -250,7 +250,7 @@ int ftpc_sockaccept(FAR struct ftpc_socket_s *sock) sock->sd = accept(sock->sd, &addr, &addrlen); if (sock->sd == -1) { - nerr("accept() failed: %d\n", errno); + nerr("ERROR: accept() failed: %d\n", errno); return ERROR; } @@ -263,7 +263,7 @@ int ftpc_sockaccept(FAR struct ftpc_socket_s *sock) sock->instream = fdopen(sock->sd, "r"); if (!sock->instream) { - nerr("fdopen() failed: %d\n", errno); + nerr("ERROR: fdopen() failed: %d\n", errno); goto errout_with_sd; } @@ -272,7 +272,7 @@ int ftpc_sockaccept(FAR struct ftpc_socket_s *sock) sock->outstream = fdopen(sock->sd, "w"); if (!sock->outstream) { - nerr("fdopen() failed: %d\n", errno); + nerr("ERROR: fdopen() failed: %d\n", errno); goto errout_with_instream; } @@ -310,7 +310,7 @@ int ftpc_socklisten(struct ftpc_socket_s *sock) ret = bind(sock->sd, (struct sockaddr *)&sock->laddr, addrlen); if (ret < 0) { - nerr("bind() failed: %d\n", errno); + nerr("ERROR: bind() failed: %d\n", errno); return ERROR; } @@ -363,7 +363,7 @@ int ftpc_sockgetsockname(FAR struct ftpc_socket_s *sock, ret = getsockname(sock->sd, (FAR struct sockaddr *)addr, &len); if (ret < 0) { - nerr("getsockname failed: %d\n", errno); + nerr("ERROR: getsockname failed: %d\n", errno); return ERROR; } return OK; diff --git a/netutils/ftpc/ftpc_transfer.c b/netutils/ftpc/ftpc_transfer.c index 0834f00ac..10ef51a10 100644 --- a/netutils/ftpc/ftpc_transfer.c +++ b/netutils/ftpc/ftpc_transfer.c @@ -111,7 +111,7 @@ static int ftp_pasvmode(struct ftpc_session_s *session, if (!FTPC_HAS_PASV(session)) { - nerr("Host doesn't support passive mode\n"); + nwarn("WARNING: Host doesn't support passive mode\n"); return ERROR; } @@ -143,7 +143,7 @@ static int ftp_pasvmode(struct ftpc_session_s *session, &tmpap[3], &tmpap[4], &tmpap[5]); if (nscan != 6) { - nerr("Error parsing PASV reply: '%s'\n", session->reply); + nwarn("WARNING: Error parsing PASV reply: '%s'\n", session->reply); return ERROR; } @@ -255,7 +255,7 @@ int ftpc_xfrinit(FAR struct ftpc_session_s *session) if (!ftpc_connected(session)) { - nerr("Not connected\n"); + nerr("ERROR: Not connected\n"); goto errout; } @@ -264,7 +264,7 @@ int ftpc_xfrinit(FAR struct ftpc_session_s *session) ret = ftpc_sockinit(&session->data); if (ret != OK) { - nerr("ftpc_sockinit() failed: %d\n", errno); + nerr("ERROR: ftpc_sockinit() failed: %d\n", errno); goto errout; } @@ -281,7 +281,7 @@ int ftpc_xfrinit(FAR struct ftpc_session_s *session) ret = ftp_pasvmode(session, addrport); if (ret != OK) { - nerr("ftp_pasvmode() failed: %d\n", errno); + nerr("ERROR: ftp_pasvmode() failed: %d\n", errno); goto errout_with_data; } @@ -296,7 +296,7 @@ int ftpc_xfrinit(FAR struct ftpc_session_s *session) ret = ftpc_sockconnect(&session->data, &addr); if (ret < 0) { - nerr("ftpc_sockconnect() failed: %d\n", errno); + nerr("ERROR: ftpc_sockconnect() failed: %d\n", errno); goto errout_with_data; } } @@ -316,7 +316,7 @@ int ftpc_xfrinit(FAR struct ftpc_session_s *session) paddr[3], pport[0], pport[1]); if (ret < 0) { - nerr("ftpc_cmd() failed: %d\n", errno); + nerr("ERROR: ftpc_cmd() failed: %d\n", errno); goto errout_with_data; } } @@ -475,7 +475,7 @@ void ftpc_timeout(int argc, uint32_t arg1, ...) { FAR struct ftpc_session_s *session = (FAR struct ftpc_session_s *)arg1; - nllerr("Timeout!\n"); + nllerr("ERROR: Timeout!\n"); DEBUGASSERT(argc == 1 && session); kill(session->pid, CONFIG_FTP_SIGNAL); } diff --git a/netutils/ftpd/ftpd.c b/netutils/ftpd/ftpd.c index a15871487..038f572d8 100644 --- a/netutils/ftpd/ftpd.c +++ b/netutils/ftpd/ftpd.c @@ -304,7 +304,7 @@ static FAR struct ftpd_account_s *ftpd_account_new(FAR const char *user, ret = (struct ftpd_account_s *)zalloc(allocsize); if (!ret) { - nerr("Failed to allocate account\n"); + nerr("ERROR: Failed to allocate account\n"); return NULL; } @@ -875,7 +875,7 @@ static int ftpd_accept(int sd, FAR void *addr, FAR socklen_t *addrlen, #ifdef CONFIG_DEBUG_NET if (ret != -ETIMEDOUT) { - nerr("ftpd_rxpoll() failed: %d\n", ret); + nerr("ERROR: ftpd_rxpoll() failed: %d\n", ret); } #endif return ret; @@ -888,7 +888,7 @@ static int ftpd_accept(int sd, FAR void *addr, FAR socklen_t *addrlen, if (acceptsd < 0) { int errval = errno; - nerr("accept() failed: %d\n", errval); + nerr("ERROR: accept() failed: %d\n", errval); return -errval; } @@ -926,7 +926,7 @@ static ssize_t ftpd_recv(int sd, FAR void *data, size_t size, int timeout) { int errval = errno; - nerr("recv() failed: %d\n", errval); + nerr("ERROR: recv() failed: %d\n", errval); return -errval; } @@ -959,7 +959,7 @@ static ssize_t ftpd_send(int sd, FAR const void *data, size_t size, int timeout) if (ret < 0) { ssize_t errval = errno; - nerr("send() failed: %d\n", errval); + nerr("ERROR: send() failed: %d\n", errval); return -errval; } @@ -1020,7 +1020,7 @@ static int ftpd_dataopen(FAR struct ftpd_session_s *session) if (session->data.sd < 0) { int errval = errno; - nerr("socket() failed: %d\n", errval); + nerr("ERROR: socket() failed: %d\n", errval); (void)ftpd_response(session->cmd.sd, session->txtimeout, g_respfmt1, 451, ' ', "Socket error !"); return -errval; @@ -1032,7 +1032,7 @@ static int ftpd_dataopen(FAR struct ftpd_session_s *session) if (ret < 0) { int errval = errno; - nerr("connect() failed: %d\n", errval); + nerr("ERROR: connect() failed: %d\n", errval); (void)ftpd_response(session->cmd.sd, session->txtimeout, g_respfmt1, 451, ' ', "Connect error !"); (void)ftpd_dataclose(session); @@ -1060,7 +1060,7 @@ static int ftpd_dataopen(FAR struct ftpd_session_s *session) &session->data.addrlen, -1); if (sd < 0) { - nerr("ftpd_accept() failed: %d\n", sd); + nerr("ERROR: ftpd_accept() failed: %d\n", sd); (void)ftpd_response(session->cmd.sd, session->txtimeout, g_respfmt1, 451, ' ', "Accept error !"); (void)ftpd_dataclose(session); @@ -1121,7 +1121,7 @@ static FAR struct ftpd_server_s *ftpd_openserver(int port) server = (FAR struct ftpd_server_s *)zalloc(sizeof(struct ftpd_server_s)); if (!server) { - nerr("Failed to allocate server\n"); + nerr("ERROR: Failed to allocate server\n"); return NULL; } @@ -1660,7 +1660,7 @@ static off_t ftpd_offsatoi(FAR const char *filename, off_t offset) if (!outstream) { int errval = errno; - nerr("Failed to open %s: %d\n", filename, errval); + nerr("ERROR: Failed to open %s: %d\n", filename, errval); return -errval; } @@ -1820,7 +1820,7 @@ static int ftpd_stream(FAR struct ftpd_session_s *session, int cmdtype) seekpos = ftpd_offsatoi(path, session->restartpos); if (seekpos < 0) { - nerr("ftpd_offsatoi failed: %d\n", seekpos); + nerr("ERROR: ftpd_offsatoi failed: %d\n", seekpos); errval = -seekpos; } } @@ -1829,7 +1829,7 @@ static int ftpd_stream(FAR struct ftpd_session_s *session, int cmdtype) seekpos = session->restartpos; if (seekpos < 0) { - nerr("Bad restartpos: %d\n", seekpos); + nerr("ERROR: Bad restartpos: %d\n", seekpos); errval = EINVAL; } } @@ -1842,7 +1842,7 @@ static int ftpd_stream(FAR struct ftpd_session_s *session, int cmdtype) if (seekoffs < 0) { errval = errno; - nerr("lseek failed: %d\n", errval); + nerr("ERROR: lseek failed: %d\n", errval); } } @@ -1867,7 +1867,7 @@ static int ftpd_stream(FAR struct ftpd_session_s *session, int cmdtype) g_respfmt1, 150, ' ', "Opening data connection"); if (ret < 0) { - nerr("ftpd_response failed: %d\n", ret); + nerr("ERROR: ftpd_response failed: %d\n", ret); goto errout_with_session; } @@ -1916,7 +1916,7 @@ static int ftpd_stream(FAR struct ftpd_session_s *session, int cmdtype) if (rdbytes < 0) { - nerr("Read failed: rdbytes=%d errval=%d\n", rdbytes, errval); + nerr("ERROR: Read failed: rdbytes=%d errval=%d\n", rdbytes, errval); (void)ftpd_response(session->cmd.sd, session->txtimeout, g_respfmt1, 550, ' ', "Data read error !"); ret = -errval; @@ -1971,7 +1971,7 @@ static int ftpd_stream(FAR struct ftpd_session_s *session, int cmdtype) if (wrbytes < 0) { errval = -wrbytes; - nerr("ftpd_send failed: %d\n", errval); + nerr("ERROR: ftpd_send failed: %d\n", errval); } } else @@ -1982,7 +1982,7 @@ static int ftpd_stream(FAR struct ftpd_session_s *session, int cmdtype) if (wrbytes < 0) { errval = errno; - nerr("write() failed: %d\n", errval); + nerr("ERROR: write() failed: %d\n", errval); } } @@ -1994,7 +1994,7 @@ static int ftpd_stream(FAR struct ftpd_session_s *session, int cmdtype) if (wrbytes != ((ssize_t)buflen)) { - nerr("Write failed: wrbytes=%d errval=%d\n", wrbytes, errval); + nerr("ERROR: Write failed: wrbytes=%d errval=%d\n", wrbytes, errval); (void)ftpd_response(session->cmd.sd, session->txtimeout, g_respfmt1, 550, ' ', "Data send error !"); ret = -errval; @@ -2332,7 +2332,7 @@ static int fptd_listscan(FAR struct ftpd_session_s *session, FAR char *path, if (!dir) { int errval = errno; - nerr("dir() failed\n", errval); + nerr("ERROR: dir() failed\n", errval); return -errval; } @@ -2684,7 +2684,7 @@ static int ftpd_command_port(FAR struct ftpd_session_s *session) "Illegal PORT command"); if (ret < 0) { - nerr("ftpd_response failed: %d\n", ret); + nerr("ERROR: ftpd_response failed: %d\n", ret); return ret; } } @@ -2863,7 +2863,7 @@ static int ftpd_command_eprt(FAR struct ftpd_session_s *session) else #endif { - nerr("Unrecognized family: %d\n", family); + nerr("ERROR: Unrecognized family: %d\n", family); family = AF_UNSPEC; } @@ -3132,7 +3132,7 @@ static int ftpd_command_pasv(FAR struct ftpd_session_s *session) else #endif { - nerr("Unsupported family\n"); + nerr("ERROR: Unsupported family\n"); } session->data.addr.in4.sin_port = 0; @@ -3890,7 +3890,7 @@ static int ftpd_startworker(pthread_startroutine_t handler, FAR void *arg, ret = pthread_attr_init(&attr); if (ret != 0) { - nerr("pthread_attr_init() failed: %d\n", ret); + nerr("ERROR: pthread_attr_init() failed: %d\n", ret); goto errout; } @@ -3899,7 +3899,7 @@ static int ftpd_startworker(pthread_startroutine_t handler, FAR void *arg, ret = pthread_attr_setstacksize(&attr, stacksize); if (ret != 0) { - nerr("pthread_attr_setstacksize() failed: %d\n", ret); + nerr("ERROR: pthread_attr_setstacksize() failed: %d\n", ret); goto errout_with_attr; } @@ -3908,7 +3908,7 @@ static int ftpd_startworker(pthread_startroutine_t handler, FAR void *arg, ret = pthread_create(&threadid, &attr, handler, arg); if (ret != 0) { - nerr("pthread_create() failed: %d\n", ret); + nerr("ERROR: pthread_create() failed: %d\n", ret); goto errout_with_attr; } @@ -3917,7 +3917,7 @@ static int ftpd_startworker(pthread_startroutine_t handler, FAR void *arg, ret = pthread_detach(threadid); if (ret != 0) { - nerr("pthread_detach() failed: %d\n", ret); + nerr("ERROR: pthread_detach() failed: %d\n", ret); } errout_with_attr: @@ -4035,7 +4035,7 @@ static FAR void *ftpd_worker(FAR void *arg) g_respfmt1, 220, ' ', CONFIG_FTPD_SERVERID); if (ret < 0) { - nerr("ftpd_response() failed: %d\n", ret); + nerr("ERROR: ftpd_response() failed: %d\n", ret); ftpd_freesession(session); return NULL; } @@ -4126,7 +4126,7 @@ static FAR void *ftpd_worker(FAR void *arg) ret = ftpd_command(session); if (ret < 0) { - nerr("Disconnected by the command handler: %d\n", ret); + nerr("ERROR: Disconnected by the command handler: %d\n", ret); break; } } @@ -4203,7 +4203,7 @@ int ftpd_adduser(FTPD_SESSION handle, uint8_t accountflags, newaccount = ftpd_account_new(user, accountflags); if (!newaccount) { - nerr("Failed to allocte memory to the account\n"); + nerr("ERROR: Failed to allocte memory to the account\n"); ret = -ENOMEM; goto errout; } @@ -4211,14 +4211,14 @@ int ftpd_adduser(FTPD_SESSION handle, uint8_t accountflags, ret = ftpd_account_setpassword(newaccount, passwd); if (ret < 0) { - nerr("ftpd_account_setpassword failed: %d\n", ret); + nerr("ERROR: ftpd_account_setpassword failed: %d\n", ret); goto errout_with_account; } ret = ftpd_account_sethome(newaccount, home); if (ret < 0) { - nerr("ftpd_account_sethome failed: %d\n", ret); + nerr("ERROR: ftpd_account_sethome failed: %d\n", ret); goto errout_with_account; } @@ -4226,7 +4226,7 @@ int ftpd_adduser(FTPD_SESSION handle, uint8_t accountflags, ret = ftpd_account_add(server, newaccount); if (ret < 0) { - nerr("ftpd_account_add failed: %d\n", ret); + nerr("ERROR: ftpd_account_add failed: %d\n", ret); goto errout_with_account; } @@ -4276,7 +4276,7 @@ int ftpd_session(FTPD_SESSION handle, int timeout) session = (FAR struct ftpd_session_s *)zalloc(sizeof(struct ftpd_session_s)); if (!session) { - nerr("Failed to allocate session\n"); + nerr("ERROR: Failed to allocate session\n"); ret = -ENOMEM; goto errout; } @@ -4312,7 +4312,7 @@ int ftpd_session(FTPD_SESSION handle, int timeout) session->cmd.buffer = (FAR char *)malloc(session->cmd.buflen); if (!session->cmd.buffer) { - nerr("Failed to allocate command buffer\n"); + nerr("ERROR: Failed to allocate command buffer\n"); ret = -ENOMEM; goto errout_with_session; } @@ -4322,7 +4322,7 @@ int ftpd_session(FTPD_SESSION handle, int timeout) session->data.buffer = (FAR char *)malloc(session->data.buflen); if (!session->data.buffer) { - nerr("Failed to allocate data buffer\n"); + nerr("ERROR: Failed to allocate data buffer\n"); ret = -ENOMEM; goto errout_with_session; } @@ -4338,7 +4338,7 @@ int ftpd_session(FTPD_SESSION handle, int timeout) #ifdef CONFIG_DEBUG_NET if (session->cmd.sd != -ETIMEDOUT) { - nerr("ftpd_accept() failed: %d\n", session->cmd.sd); + nerr("ERROR: ftpd_accept() failed: %d\n", session->cmd.sd); } #endif ret = session->cmd.sd; @@ -4351,7 +4351,7 @@ int ftpd_session(FTPD_SESSION handle, int timeout) CONFIG_FTPD_WORKERSTACKSIZE); if (ret < 0) { - nerr("ftpd_startworker() failed: %d\n", ret); + nerr("ERROR: ftpd_startworker() failed: %d\n", ret); goto errout_with_session; } diff --git a/netutils/netlib/netlib_listenon.c b/netutils/netlib/netlib_listenon.c index 84b4ebd27..c9a645bd7 100644 --- a/netutils/netlib/netlib_listenon.c +++ b/netutils/netlib/netlib_listenon.c @@ -87,7 +87,7 @@ int netlib_listenon(uint16_t portno) listensd = socket(PF_INET, SOCK_STREAM, 0); if (listensd < 0) { - nerr("socket failure: %d\n", errno); + nerr("ERROR: socket failure: %d\n", errno); return ERROR; } @@ -97,7 +97,7 @@ int netlib_listenon(uint16_t portno) optval = 1; if (setsockopt(listensd, SOL_SOCKET, SO_REUSEADDR, (void*)&optval, sizeof(int)) < 0) { - nerr("setsockopt SO_REUSEADDR failure: %d\n", errno); + nerr("ERROR: setsockopt SO_REUSEADDR failure: %d\n", errno); goto errout_with_socket; } #endif @@ -110,7 +110,7 @@ int netlib_listenon(uint16_t portno) if (bind(listensd, (struct sockaddr*)&myaddr, sizeof(struct sockaddr_in)) < 0) { - nerr("bind failure: %d\n", errno); + nerr("ERROR: bind failure: %d\n", errno); goto errout_with_socket; } @@ -118,7 +118,7 @@ int netlib_listenon(uint16_t portno) if (listen(listensd, 5) < 0) { - nerr("listen failure %d\n", errno); + nerr("ERROR: listen failure %d\n", errno); goto errout_with_socket; } diff --git a/netutils/netlib/netlib_server.c b/netutils/netlib/netlib_server.c index 24f2be852..b08171352 100644 --- a/netutils/netlib/netlib_server.c +++ b/netutils/netlib/netlib_server.c @@ -109,7 +109,7 @@ void netlib_server(uint16_t portno, pthread_startroutine_t handler, int stacksiz acceptsd = accept(listensd, (struct sockaddr*)&myaddr, &addrlen); if (acceptsd < 0) { - nerr("accept failure: %d\n", errno); + nerr("ERROR: accept failure: %d\n", errno); break; } @@ -127,7 +127,7 @@ void netlib_server(uint16_t portno, pthread_startroutine_t handler, int stacksiz if (ret < 0) { close(acceptsd); - nerr("setsockopt SO_LINGER failure: %d\n", errno); + nerr("ERROR: setsockopt SO_LINGER failure: %d\n", errno); break; } #endif @@ -145,7 +145,7 @@ void netlib_server(uint16_t portno, pthread_startroutine_t handler, int stacksiz /* Close the connection */ close(acceptsd); - nerr("pthread_create failed\n"); + nerr("ERROR: pthread_create failed\n"); if (ret == EAGAIN) { diff --git a/netutils/tftpc/tftpc_get.c b/netutils/tftpc/tftpc_get.c index 28fd438cf..08a458c14 100644 --- a/netutils/tftpc/tftpc_get.c +++ b/netutils/tftpc/tftpc_get.c @@ -93,7 +93,7 @@ static inline ssize_t tftp_write(int fd, const uint8_t *buf, size_t len) if (nbyteswritten < 0) { - nerr("write failed: %d\n", errno); + nerr("ERROR: write failed: %d\n", errno); return ERROR; } @@ -169,7 +169,7 @@ int tftpget(FAR const char *remote, FAR const char *local, in_addr_t addr, packet = (FAR uint8_t*)zalloc(TFTP_IOBUFSIZE); if (!packet) { - nerr("packet memory allocation failure\n"); + nerr("ERROR: packet memory allocation failure\n"); set_errno(ENOMEM); goto errout; } @@ -179,7 +179,7 @@ int tftpget(FAR const char *remote, FAR const char *local, in_addr_t addr, fd = open(local, O_WRONLY|O_CREAT|O_TRUNC, 0666); if (fd < 0) { - nerr("open failed: %d\n", errno); + nerr("ERROR: open failed: %d\n", errno); goto errout_with_packet; } diff --git a/netutils/tftpc/tftpc_packets.c b/netutils/tftpc/tftpc_packets.c index 39cbe6f13..519d64eac 100644 --- a/netutils/tftpc/tftpc_packets.c +++ b/netutils/tftpc/tftpc_packets.c @@ -104,7 +104,7 @@ int tftp_sockinit(struct sockaddr_in *server, in_addr_t addr) sd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); if (sd < 0) { - nerr("socket failed: %d\n", errno); + nerr("ERROR: socket failed: %d\n", errno); return ERROR; } @@ -115,7 +115,7 @@ int tftp_sockinit(struct sockaddr_in *server, in_addr_t addr) ret = setsockopt(sd, SOL_SOCKET, SO_RCVTIMEO, &timeo, sizeof(struct timeval)); if (ret < 0) { - nerr("setsockopt failed: %d\n", errno); + nerr("ERROR: setsockopt failed: %d\n", errno); } /* Initialize the server address structure */ @@ -262,7 +262,7 @@ ssize_t tftp_recvfrom(int sd, void *buf, size_t len, struct sockaddr_in *from) if (errno == EAGAIN) { - nerr("recvfrom timed out\n"); + nerr("ERROR: recvfrom timed out\n"); return ERROR; } @@ -270,7 +270,7 @@ ssize_t tftp_recvfrom(int sd, void *buf, size_t len, struct sockaddr_in *from) else if (errno != EINTR) { - nerr("recvfrom failed: %d\n", errno); + nerr("ERROR: recvfrom failed: %d\n", errno); return ERROR; } } @@ -314,7 +314,7 @@ ssize_t tftp_sendto(int sd, const void *buf, size_t len, struct sockaddr_in *to) if (errno != EINTR) { - nerr("sendto failed: %d\n", errno); + nerr("ERROR: sendto failed: %d\n", errno); return ERROR; } } diff --git a/netutils/tftpc/tftpc_put.c b/netutils/tftpc/tftpc_put.c index 05808e4ce..2c5f1dc24 100644 --- a/netutils/tftpc/tftpc_put.c +++ b/netutils/tftpc/tftpc_put.c @@ -95,7 +95,7 @@ static inline ssize_t tftp_read(int fd, uint8_t *buf, size_t buflen) if (nbytesread < 0) { - nerr("read failed: %d\n", errno); + nerr("ERROR: read failed: %d\n", errno); return ERROR; } @@ -156,7 +156,7 @@ int tftp_mkdatapacket(int fd, off_t offset, uint8_t *packet, uint16_t blockno) tmp = lseek(fd, offset, SEEK_SET); if (tmp == (off_t)-1) { - nerr("lseek failed: %d\n", errno); + nerr("ERROR: lseek failed: %d\n", errno); return ERROR; } @@ -218,15 +218,15 @@ static int tftp_rcvack(int sd, uint8_t *packet, struct sockaddr_in *server, if (nbytes == 0) { - nerr("Connection lost: %d bytes\n", nbytes); + nerr("ERROR: Connection lost: %d bytes\n", nbytes); } else if (nbytes > 0) { - nerr("Short packet: %d bytes\n", nbytes); + nerr("ERROR: Short packet: %d bytes\n", nbytes); } else { - nerr("Recveid failure\n"); + nerr("ERROR: Recvfrom failure\n"); } /* Break out to bump up the retry count */ @@ -301,7 +301,7 @@ static int tftp_rcvack(int sd, uint8_t *packet, struct sockaddr_in *server, /* We have tried TFTP_RETRIES times */ - nerr("Timeout, Waiting for ACK\n"); + nerr("ERROR: Timeout, Waiting for ACK\n"); return ERROR; /* Will never get here */ } @@ -341,7 +341,7 @@ int tftpput(const char *local, const char *remote, in_addr_t addr, bool binary) packet = (uint8_t*)zalloc(TFTP_IOBUFSIZE); if (!packet) { - nerr("packet memory allocation failure\n"); + nerr("ERROR: packet memory allocation failure\n"); set_errno(ENOMEM); goto errout; } @@ -351,7 +351,7 @@ int tftpput(const char *local, const char *remote, in_addr_t addr, bool binary) fd = open(local, O_RDONLY); if (fd < 0) { - nerr("open failed: %d\n", errno); + nerr("ERROR: open failed: %d\n", errno); goto errout_with_packet; } @@ -387,7 +387,7 @@ int tftpput(const char *local, const char *remote, in_addr_t addr, bool binary) break; } - nerr("Re-sending request\n"); + nwarn("WARNING: Re-sending request\n"); /* We are going to loop and re-send the request packet. Check the * retry count so that we do not loop forever. @@ -395,7 +395,7 @@ int tftpput(const char *local, const char *remote, in_addr_t addr, bool binary) if (++retry > TFTP_RETRIES) { - nerr("Retry count exceeded\n"); + nerr("ERROR: Retry count exceeded\n"); set_errno(ETIMEDOUT); goto errout_with_sd; } @@ -462,7 +462,7 @@ int tftpput(const char *local, const char *remote, in_addr_t addr, bool binary) if (++retry > TFTP_RETRIES) { - nerr("Retry count exceeded\n"); + nerr("ERROR: Retry count exceeded\n"); set_errno(ETIMEDOUT); goto errout_with_sd; } diff --git a/netutils/thttpd/libhttpd.c b/netutils/thttpd/libhttpd.c index 2157a6828..907f5213a 100644 --- a/netutils/thttpd/libhttpd.c +++ b/netutils/thttpd/libhttpd.c @@ -224,7 +224,7 @@ static int initialize_listen_socket(httpd_sockaddr *saP) #ifdef CONFIG_DEBUG_FEATURES_FEATURES if (!sockaddr_check(saP)) { - nerr("unknown sockaddr family on listen socket\n"); + nerr("ERROR: unknown sockaddr family on listen socket\n"); return -1; } #endif @@ -235,7 +235,7 @@ static int initialize_listen_socket(httpd_sockaddr *saP) listen_fd = socket(saP->sin_family, SOCK_STREAM, 0); if (listen_fd < 0) { - nerr("socket failed: %d\n", errno); + nerr("ERROR: socket failed: %d\n", errno); return -1; } @@ -244,14 +244,14 @@ static int initialize_listen_socket(httpd_sockaddr *saP) on = 1; if (setsockopt(listen_fd, SOL_SOCKET, SO_REUSEADDR, (char *)&on, sizeof(on)) < 0) { - nerr("setsockopt(SO_REUSEADDR) failed: %d\n", errno); + nerr("ERROR: setsockopt(SO_REUSEADDR) failed: %d\n", errno); } /* Bind to it. */ if (bind(listen_fd, (struct sockaddr*)saP, sockaddr_len(saP)) < 0) { - nerr("bind to %s failed: %d\n", httpd_ntoa(saP), errno); + nerr("ERROR: bind to %s failed: %d\n", httpd_ntoa(saP), errno); (void)close(listen_fd); return -1; } @@ -261,14 +261,14 @@ static int initialize_listen_socket(httpd_sockaddr *saP) flags = fcntl(listen_fd, F_GETFL, 0); if (flags == -1) { - nerr("fcntl(F_GETFL) failed: %d\n", errno); + nerr("ERROR: fcntl(F_GETFL) failed: %d\n", errno); (void)close(listen_fd); return -1; } if (fcntl(listen_fd, F_SETFL, flags | O_NDELAY) < 0) { - nerr("fcntl(O_NDELAY) failed: %d\n", errno); + nerr("ERROR: fcntl(O_NDELAY) failed: %d\n", errno); (void)close(listen_fd); return -1; } @@ -277,7 +277,7 @@ static int initialize_listen_socket(httpd_sockaddr *saP) if (listen(listen_fd, CONFIG_THTTPD_LISTEN_BACKLOG) < 0) { - nerr("listen failed: %d\n", errno); + nerr("ERROR: listen failed: %d\n", errno); (void)close(listen_fd); return -1; } @@ -297,7 +297,8 @@ static void add_response(httpd_conn *hc, const char *str) if (resplen > CONFIG_THTTPD_IOBUFFERSIZE) { - nerr("resplen(%d) > buffer size(%d)\n", resplen, CONFIG_THTTPD_IOBUFFERSIZE); + nwarn("WARNING: resplen(%d) > buffer size(%d)\n", + resplen, CONFIG_THTTPD_IOBUFFERSIZE); resplen = CONFIG_THTTPD_IOBUFFERSIZE; len = resplen - hc->buflen; } @@ -733,6 +734,7 @@ static int auth_check2(httpd_conn *hc, char *dirname) send_authenticate(hc, dirname); return -1; } + *authpass++ = '\0'; /* If there are more fields, cut them off. */ @@ -776,8 +778,8 @@ static int auth_check2(httpd_conn *hc, char *dirname) { /* The file exists but we can't open it? Disallow access. */ - nerr("%s auth file %s could not be opened: %d\n", - httpd_ntoa(&hc->client_addr), authpath, errno); + nerr("ERROR: %s auth file %s could not be opened: %d\n", + httpd_ntoa(&hc->client_addr), authpath, errno); httpd_send_err(hc, 403, err403title, "", ERROR_FORM(err403form, @@ -1009,7 +1011,7 @@ static int vhost_map(httpd_conn *hc) sz = sizeof(sa); if (getsockname(hc->conn_fd, &sa.sa, &sz) < 0) { - nerr("getsockname: %d\n", errno); + nerr("ERROR: getsockname: %d\n", errno); return 0; } hc->vhostname = httpd_ntoa(&sa); @@ -1588,7 +1590,7 @@ static void ls_child(int argc, char **argv) fp = fdopen(hc->conn_fd, "w"); if (fp == NULL) { - nerr("fdopen: %d\n", errno); + nerr("ERROR: fdopen: %d\n", errno); INTERNALERROR("fdopen"); httpd_send_err(hc, 500, err500title, "", err500form, hc->encodedurl); httpd_write_response(hc); @@ -1630,7 +1632,7 @@ static void ls_child(int argc, char **argv) if (!names || !nameptrs) { - nerr("out of memory reallocating directory names\n"); + nerr("ERROR: out of memory reallocating directory names\n"); exit(1); } @@ -1817,7 +1819,7 @@ static int ls(httpd_conn *hc) dirp = opendir(hc->expnfilename); if (dirp == NULL) { - nerr("opendir %s: %d\n", hc->expnfilename, errno); + nerr("ERROR: opendir %s: %d\n", hc->expnfilename, errno); httpd_send_err(hc, 404, err404title, "", err404form, hc->encodedurl); return -1; } @@ -1851,7 +1853,7 @@ static int ls(httpd_conn *hc) (main_t)ls_child, (FAR char * const *)argv); if (child < 0) { - nerr("task_create: %d\n", errno); + nerr("ERROR: task_create: %d\n", errno); closedir(dirp); INTERNALERROR("task_create"); httpd_send_err(hc, 500, err500title, "", err500form, hc->encodedurl); @@ -1859,7 +1861,8 @@ static int ls(httpd_conn *hc) } closedir(dirp); - nerr("spawned indexing task %d for directory '%s'\n", child, hc->expnfilename); + nerr("ERROR: spawned indexing task %d for directory '%s'\n", + child, hc->expnfilename); /* Schedule a kill for the child task, in case it runs too long */ @@ -1867,7 +1870,7 @@ static int ls(httpd_conn *hc) client_data.i = child; if (tmr_create(NULL, cgi_kill, client_data, CONFIG_THTTPD_CGI_TIMELIMIT * 1000L, 0) == NULL) { - nerr("tmr_create(cgi_kill ls) failed\n"); + nerr("ERROR: tmr_create(cgi_kill ls) failed\n"); exit(1); } #endif @@ -1918,8 +1921,8 @@ static int check_referer(httpd_conn *hc) cp = ""; } - nerr("%s non-local referer \"%s%s\" \"%s\"\n", - httpd_ntoa(&hc->client_addr), cp, hc->encodedurl, hc->referer); + ninfo("%s non-local referer \"%s%s\" \"%s\"\n", + httpd_ntoa(&hc->client_addr), cp, hc->encodedurl, hc->referer); httpd_send_err(hc, 403, err403title, "", ERROR_FORM(err403form, "You must supply a local referer to get URL '%s' from this server.\n"), @@ -2092,7 +2095,7 @@ FAR httpd_server *httpd_initialize(FAR httpd_sockaddr *sa) hs = (FAR httpd_server *)zalloc(sizeof(httpd_server)); if (!hs) { - nerr("out of memory allocating an httpd_server\n"); + nerr("ERROR: out of memory allocating an httpd_server\n"); return NULL; } @@ -2105,7 +2108,7 @@ FAR httpd_server *httpd_initialize(FAR httpd_sockaddr *sa) if (!hs->hostname) { - nerr("out of memory copying hostname\n"); + nerr("ERROR: out of memory copying hostname\n"); return NULL; } @@ -2116,7 +2119,7 @@ FAR httpd_server *httpd_initialize(FAR httpd_sockaddr *sa) hs->listen_fd = initialize_listen_socket(sa); if (hs->listen_fd == -1) { - nerr("Failed to create listen socket\n"); + nerr("ERROR: Failed to create listen socket\n"); free_httpd_server(hs); return NULL; } @@ -2125,7 +2128,7 @@ FAR httpd_server *httpd_initialize(FAR httpd_sockaddr *sa) /* Done initializing. */ - nerr("%s starting on port %d\n", CONFIG_THTTPD_SERVER_SOFTWARE, (int)CONFIG_THTTPD_PORT); + ninfo("%s starting on port %d\n", CONFIG_THTTPD_SERVER_SOFTWARE, (int)CONFIG_THTTPD_PORT); return hs; } @@ -2204,7 +2207,7 @@ void httpd_send_err(httpd_conn *hc, int status, const char *title, const char *e /* Try virtual host error page. */ - nerr("title: \"%s\" form: \"%s\"\n", title, form); + ninfo("title: \"%s\" form: \"%s\"\n", title, form); #ifdef CONFIG_THTTPD_VHOST if (hc->hostdir[0] != '\0') @@ -2303,14 +2306,14 @@ int httpd_get_conn(httpd_server *hs, int listen_fd, httpd_conn *hc) return GC_NO_MORE; } - nerr("accept failed: %d\n", errno); + nerr("ERROR: accept failed: %d\n", errno); return GC_FAIL; } #ifdef CONFIG_DEBUG_FEATURES_FEATURES if (!sockaddr_check(&sa)) { - nerr("unknown sockaddr family\n"); + nerr("ERROR: unknown sockaddr family\n"); close(hc->conn_fd); hc->conn_fd = -1; return GC_FAIL; @@ -2788,8 +2791,8 @@ int httpd_parse_request(httpd_conn *hc) { if (strlen(hc->accept) > CONFIG_THTTPD_MAXREALLOC) { - nerr("%s way too much Accept: data\n", - httpd_ntoa(&hc->client_addr)); + nerr("ERROR: %s way too much Accept: data\n", + httpd_ntoa(&hc->client_addr)); continue; } httpd_realloc_str(&hc->accept, &hc->maxaccept, strlen(hc->accept) + 2 + strlen(cp)); @@ -2809,8 +2812,8 @@ int httpd_parse_request(httpd_conn *hc) { if (strlen(hc->accepte) > CONFIG_THTTPD_MAXREALLOC) { - nerr("%s way too much Accept-Encoding: data\n", - httpd_ntoa(&hc->client_addr)); + nerr("ERROR: %s way too much Accept-Encoding: data\n", + httpd_ntoa(&hc->client_addr)); continue; } httpd_realloc_str(&hc->accepte, &hc->maxaccepte, strlen(hc->accepte) + 2 + strlen(cp)); @@ -2833,7 +2836,9 @@ int httpd_parse_request(httpd_conn *hc) cp = &buf[18]; hc->if_modified_since = tdate_parse(cp); if (hc->if_modified_since == (time_t) - 1) - nerr("unparsable time: %s\n", cp); + { + nerr("ERROR: unparsable time: %s\n", cp); + } } else if (strncasecmp(buf, "Cookie:", 7) == 0) { @@ -2878,7 +2883,7 @@ int httpd_parse_request(httpd_conn *hc) hc->range_if = tdate_parse(cp); if (hc->range_if == (time_t) - 1) { - nerr("unparsable time: %s\n", cp); + nerr("ERROR: unparsable time: %s\n", cp); } } else if (strncasecmp(buf, "Content-Type:", 13) == 0) @@ -2940,7 +2945,7 @@ int httpd_parse_request(httpd_conn *hc) ; /* ignore */ else { - nerr("unknown request header: %s\n", buf); + nwarn("WARNING: unknown request header: %s\n", buf); } #endif /* LOG_UNKNOWN_HEADERS */ } @@ -3058,7 +3063,7 @@ int httpd_parse_request(httpd_conn *hc) #endif else { - nerr("%s URL \"%s\" goes outside the web tree\n", + nwarn("WARNING: %s URL \"%s\" goes outside the web tree\n", httpd_ntoa(&hc->client_addr), hc->encodedurl); httpd_send_err(hc, 403, err403title, "", ERROR_FORM(err403form, @@ -3152,8 +3157,8 @@ int httpd_start_request(httpd_conn *hc, struct timeval *nowP) if (!(hc->sb.st_mode & (S_IROTH | S_IXOTH))) { - nerr("%s URL \"%s\" resolves to a non world-readable file\n", - httpd_ntoa(&hc->client_addr), hc->encodedurl); + nwarn("WARNING: %s URL \"%s\" resolves to a non world-readable file\n", + httpd_ntoa(&hc->client_addr), hc->encodedurl); httpd_send_err(hc, 403, err403title, "", ERROR_FORM(err403form, "The requested URL '%s' resolves to a file that is not world-readable.\n"), @@ -3218,8 +3223,8 @@ int httpd_start_request(httpd_conn *hc, struct timeval *nowP) if (!(hc->sb.st_mode & S_IROTH)) { - nerr("%s URL \"%s\" tried to index a non-readable directory\n", - httpd_ntoa(&hc->client_addr), hc->encodedurl); + nwarn("WARNING: %s URL \"%s\" tried to index a non-readable directory\n", + httpd_ntoa(&hc->client_addr), hc->encodedurl); httpd_send_err(hc, 403, err403title, "", ERROR_FORM(err403form, "The requested URL '%s' resolves to a directory that has indexing disabled.\n"), @@ -3248,8 +3253,8 @@ int httpd_start_request(httpd_conn *hc, struct timeval *nowP) #else /* CONFIG_THTTPD_GENERATE_INDICES */ /* Indexing is disabled */ - nerr("%s URL \"%s\" tried to index a directory with indexing disabled\n", - httpd_ntoa(&hc->client_addr), hc->encodedurl); + nwarn("WARNING: %s URL \"%s\" tried to index a directory with indexing disabled\n", + httpd_ntoa(&hc->client_addr), hc->encodedurl); httpd_send_err(hc, 403, err403title, "", ERROR_FORM(err403form, "The requested URL '%s' is a directory, and directory indexing is disabled on this server.\n"), @@ -3279,8 +3284,8 @@ int httpd_start_request(httpd_conn *hc, struct timeval *nowP) if (!(hc->sb.st_mode & (S_IROTH | S_IXOTH))) { - nerr("%s URL \"%s\" resolves to a non-world-readable index file\n", - httpd_ntoa(&hc->client_addr), hc->encodedurl); + nwarn("WARNING: %s URL \"%s\" resolves to a non-world-readable index file\n", + httpd_ntoa(&hc->client_addr), hc->encodedurl); httpd_send_err(hc, 403, err403title, "", ERROR_FORM(err403form, "The requested URL '%s' resolves to an index file that is not world-readable.\n"), @@ -3315,8 +3320,8 @@ int httpd_start_request(httpd_conn *hc, struct timeval *nowP) { if (strcmp(hc->expnfilename, CONFIG_THTTPD_AUTH_FILE) == 0) { - nerr("%s URL \"%s\" tried to retrieve an auth file\n", - httpd_ntoa(&hc->client_addr), hc->encodedurl); + nwarn("WARNING: %s URL \"%s\" tried to retrieve an auth file\n", + httpd_ntoa(&hc->client_addr), hc->encodedurl); httpd_send_err(hc, 403, err403title, "", ERROR_FORM(err403form, "The requested URL '%s' is an authorization file, retrieving it is not permitted.\n"), @@ -3329,8 +3334,8 @@ int httpd_start_request(httpd_conn *hc, struct timeval *nowP) CONFIG_THTTPD_AUTH_FILE) == 0 && hc->expnfilename[expnlen - sizeof(CONFIG_THTTPD_AUTH_FILE)] == '/') { - nerr("%s URL \"%s\" tried to retrieve an auth file\n", - httpd_ntoa(&hc->client_addr), hc->encodedurl); + nwarn("WARNING: %s URL \"%s\" tried to retrieve an auth file\n", + httpd_ntoa(&hc->client_addr), hc->encodedurl); httpd_send_err(hc, 403, err403title, "", ERROR_FORM(err403form, "The requested URL '%s' is an authorization file, retrieving it is not permitted.\n"), @@ -3360,8 +3365,8 @@ int httpd_start_request(httpd_conn *hc, struct timeval *nowP) if (hc->sb.st_mode & S_IXOTH) { - nerr("%s URL \"%s\" is executable but isn't CGI\n", - httpd_ntoa(&hc->client_addr), hc->encodedurl); + nwarn("WARNING: %s URL \"%s\" is executable but isn't CGI\n", + httpd_ntoa(&hc->client_addr), hc->encodedurl); httpd_send_err(hc, 403, err403title, "", ERROR_FORM(err403form, "The requested URL '%s' resolves to a file which is marked executable but is not a CGI file; retrieving it is forbidden.\n"), @@ -3371,8 +3376,8 @@ int httpd_start_request(httpd_conn *hc, struct timeval *nowP) if (hc->pathinfo[0] != '\0') { - nerr("%s URL \"%s\" has pathinfo but isn't CGI\n", - httpd_ntoa(&hc->client_addr), hc->encodedurl); + nwarn("WARNING: %s URL \"%s\" has pathinfo but isn't CGI\n", + httpd_ntoa(&hc->client_addr), hc->encodedurl); httpd_send_err(hc, 403, err403title, "", ERROR_FORM(err403form, "The requested URL '%s' resolves to a file plus CGI-style pathinfo, but the file is not a valid CGI file.\n"), @@ -3465,7 +3470,7 @@ int httpd_read(int fd, const void *buf, size_t nbytes) } else if (errno != EINTR) { - nerr("Error sending: %d\n", errno); + nerr("ERROR: Error sending: %d\n", errno); return nread; } } @@ -3497,7 +3502,7 @@ int httpd_write(int fd, const void *buf, size_t nbytes) } else if (errno != EINTR) { - nerr("Error sending: %d\n", errno); + nerr("ERROR: Error sending: %d\n", errno); return nwritten; } } diff --git a/netutils/thttpd/thttpd.c b/netutils/thttpd/thttpd.c index 425bba4e7..d6c641f5c 100644 --- a/netutils/thttpd/thttpd.c +++ b/netutils/thttpd/thttpd.c @@ -194,7 +194,7 @@ static int handle_newconnect(FAR struct timeval *tv, int listen_fd) * back here. */ - nerr("No free connections\n"); + nerr("ERROR: No free connections\n"); tmr_run(tv); return -1; } @@ -206,7 +206,7 @@ static int handle_newconnect(FAR struct timeval *tv, int listen_fd) conn->hc = NEW(httpd_conn, 1); if (conn->hc == NULL) { - nerr("out of memory allocating an httpd_conn\n"); + nerr("ERROR: out of memory allocating an httpd_conn\n"); exit(1); } @@ -294,7 +294,7 @@ static void handle_read(struct connect_s *conn, struct timeval *tv) return; } - nerr("read(fd=%d) failed: %d\n", hc->conn_fd, errno); + nerr("ERROR: read(fd=%d) failed: %d\n", hc->conn_fd, errno); BADREQUEST("read"); goto errout_with_400; } @@ -372,7 +372,8 @@ static void handle_read(struct connect_s *conn, struct timeval *tv) actual = lseek(hc->file_fd, conn->offset, SEEK_SET); if (actual != conn->offset) { - nerr("fseek to %d failed: offset=%d errno=%d\n", conn->offset, actual, errno); + nerr("ERROR: fseek to %d failed: offset=%d errno=%d\n", + conn->offset, actual, errno); BADREQUEST("lseek"); goto errout_with_400; } @@ -434,7 +435,7 @@ static void handle_send(struct connect_s *conn, struct timeval *tv) nread = read_buffer(conn); if (nread < 0) { - nerr("File read error: %d\n", errno); + nerr("ERROR: File read error: %d\n", errno); goto errout_clear_connection; } ninfo("Read %d bytes, buflen %d\n", nread, hc->buflen); @@ -450,7 +451,8 @@ static void handle_send(struct connect_s *conn, struct timeval *tv) nwritten = httpd_write(hc->conn_fd, hc->buffer, hc->buflen); if (nwritten < 0) { - nerr("Error sending %s: %d\n", hc->encodedurl, errno); + nerr("ERROR: Error sending %s: %d\n", + hc->encodedurl, errno); goto errout_clear_connection; } @@ -476,7 +478,7 @@ static void handle_send(struct connect_s *conn, struct timeval *tv) return; errout_clear_connection: - nerr("Clear connection\n"); + ninfo("Clear connection\n"); clear_connection(conn, tv); return; } @@ -556,7 +558,8 @@ static void clear_connection(struct connect_s *conn, struct timeval *tv) { return; } - nerr("tmr_create(linger_clear_connection) failed\n"); + + nerr("ERROR: tmr_create(linger_clear_connection) failed\n"); } /* Either we are done lingering, we shouldn't linger, or we failed to setup the linger */ @@ -594,7 +597,8 @@ static void idle(ClientData client_data, struct timeval *nowP) case CNST_READING: if (nowP->tv_sec - conn->active_at >= CONFIG_THTTPD_IDLE_READ_LIMIT_SEC) { - nerr("%s connection timed out reading\n", httpd_ntoa(&conn->hc->client_addr)); + nerr("ERROR: %s connection timed out reading\n", + httpd_ntoa(&conn->hc->client_addr)); httpd_send_err(conn->hc, 408, httpd_err408title, "", httpd_err408form, ""); finish_connection(conn, nowP); @@ -604,7 +608,8 @@ static void idle(ClientData client_data, struct timeval *nowP) case CNST_SENDING: if (nowP->tv_sec - conn->active_at >= CONFIG_THTTPD_IDLE_SEND_LIMIT_SEC) { - nerr("%s connection timed out sending\n", httpd_ntoa(&conn->hc->client_addr)); + nerr("ERROR: %s connection timed out sending\n", + httpd_ntoa(&conn->hc->client_addr)); clear_connection(conn, nowP); } break; @@ -682,7 +687,7 @@ int thttpd_main(int argc, char **argv) fw = fdwatch_initialize(CONFIG_NSOCKET_DESCRIPTORS); if (!fw) { - nerr("fdwatch initialization failure\n"); + nerr("ERROR: fdwatch initialization failure\n"); exit(1); } @@ -691,7 +696,8 @@ int thttpd_main(int argc, char **argv) #ifdef CONFIG_THTTPD_DATADIR if (chdir(CONFIG_THTTPD_DATADIR) < 0) { - nerr("chdir to %s: %d\n", CONFIG_THTTPD_DATADIR, errno); + ninfo("chdir to %s: %d\n", + CONFIG_THTTPD_DATADIR, errno); exit(1); } #endif @@ -706,7 +712,7 @@ int thttpd_main(int argc, char **argv) hs = httpd_initialize(&sa); if (!hs) { - nerr("httpd_initialize() failed\n"); + nerr("ERROR: httpd_initialize() failed\n"); exit(1); } @@ -714,7 +720,7 @@ int thttpd_main(int argc, char **argv) if (tmr_create(NULL, occasional, JunkClientData, CONFIG_THTTPD_OCCASIONAL_MSEC * 1000L, 1) == NULL) { - nerr("tmr_create(occasional) failed\n"); + nerr("ERROR: tmr_create(occasional) failed\n"); exit(1); } @@ -722,7 +728,7 @@ int thttpd_main(int argc, char **argv) if (tmr_create(NULL, idle, JunkClientData, 5 * 1000L, 1) == NULL) { - nerr("tmr_create(idle) failed\n"); + nerr("ERROR: tmr_create(idle) failed\n"); exit(1); } @@ -732,7 +738,7 @@ int thttpd_main(int argc, char **argv) connects = NEW(struct connect_s, AVAILABLE_FDS); if (connects == NULL) { - nerr("Out of memory allocating a struct connect_s\n"); + nerr("ERROR: Out of memory allocating a struct connect_s\n"); exit(1); } @@ -772,7 +778,7 @@ int thttpd_main(int argc, char **argv) continue; } - nerr("fdwatch failed: %d\n", errno); + nerr("ERROR: fdwatch failed: %d\n", errno); exit(1); } @@ -855,7 +861,7 @@ int thttpd_main(int argc, char **argv) /* The main loop terminated */ shut_down(); - nerr("Exiting\n"); + ninfo("Exiting\n"); exit(0); } diff --git a/netutils/thttpd/thttpd_alloc.c b/netutils/thttpd/thttpd_alloc.c index 1f04a4727..bb9501bf2 100644 --- a/netutils/thttpd/thttpd_alloc.c +++ b/netutils/thttpd/thttpd_alloc.c @@ -82,7 +82,8 @@ void httpd_memstats(void) { static struct mallinfo mm; - nerr("%d allocations (%lu bytes), %d freed\n", g_nallocations, (unsigned long)g_allocated, g_nfreed); + ninfo("%d allocations (%lu bytes), %d freed\n", + g_nallocations, (unsigned long)g_allocated, g_nfreed); /* Get the current memory usage */ @@ -91,7 +92,7 @@ void httpd_memstats(void) #else (void)mallinfo(&mm); #endif - nerr("arena: %08x ordblks: %08x mxordblk: %08x uordblks: %08x fordblks: %08x\n", + ninfo("arena: %08x ordblks: %08x mxordblk: %08x uordblks: %08x fordblks: %08x\n", mm.arena, mm.ordblks, mm.mxordblk, mm.uordblks, mm.fordblks); } #endif @@ -106,7 +107,7 @@ FAR void *httpd_malloc(size_t nbytes) void *ptr = malloc(nbytes); if (!ptr) { - nerr("Allocation of %d bytes failed\n", nbytes); + nerr("ERROR: Allocation of %d bytes failed\n", nbytes); } else { @@ -125,7 +126,7 @@ FAR void *httpd_realloc(FAR void *oldptr, size_t oldsize, size_t newsize) void *ptr = realloc(oldptr, newsize); if (!ptr) { - nerr("Re-allocation from %d to %d bytes failed\n", + nerr("ERROR: Re-allocation from %d to %d bytes failed\n", oldsize, newsize); } else @@ -155,7 +156,7 @@ FAR char *httpd_strdup(const char *str) FAR char *newstr = strdup(str); if (!newstr) { - nerr("strdup of %s failed\n", str); + nerr("ERROR: strdup of %s failed\n", str); } else { @@ -191,7 +192,8 @@ void httpd_realloc_str(char **pstr, size_t *maxsize, size_t size) if (!*pstr) { - nerr("out of memory reallocating a string to %d bytes\n", *maxsize); + nerr("ERROR: out of memory reallocating a string to %d bytes\n", + *maxsize); exit(1); } } diff --git a/netutils/thttpd/thttpd_cgi.c b/netutils/thttpd/thttpd_cgi.c index a04ef07da..5e57190f7 100644 --- a/netutils/thttpd/thttpd_cgi.c +++ b/netutils/thttpd/thttpd_cgi.c @@ -378,7 +378,7 @@ static inline int cgi_interpose_input(struct cgi_conn_s *cc) { if (errno != EINTR) { - nllerr("read failed: %d\n", errno); + nllerr("ERROR: read failed: %d\n", errno); return 1; } } @@ -391,7 +391,7 @@ static inline int cgi_interpose_input(struct cgi_conn_s *cc) nllinfo("nbytes_written: %d\n", nbytes_written); if (nbytes_written != nbytes_read) { - nllerr("httpd_write failed\n"); + nllerr("ERROR: httpd_write failed\n"); return 1; } cgi_dumpbuffer("Sent to CGI:", cc->inbuf.buffer, nbytes_written); @@ -469,7 +469,7 @@ static inline int cgi_interpose_output(struct cgi_conn_s *cc) { if (errno != EAGAIN) { - nllerr("read: %d\n", errno); + nllerr("ERROR: read: %d\n", errno); } return 1; } @@ -651,7 +651,7 @@ static inline int cgi_interpose_output(struct cgi_conn_s *cc) { if (errno != EAGAIN) { - nllerr("read: %d\n", errno); + nllerr("ERROR: read: %d\n", errno); } return 1; } @@ -1034,13 +1034,14 @@ int cgi(httpd_conn *hc) (main_t)cgi_child, (FAR char * const *)argv); if (child < 0) { - nerr("task_create: %d\n", errno); + nerr("ERROR: task_create: %d\n", errno); INTERNALERROR("task_create"); - httpd_send_err(hc, 500, err500title, "", err500form, hc->encodedurl); + httpd_send_err(hc, 500, err500title, "", err500form, + hc->encodedurl); goto errout_with_sem; } - nerr("Started CGI task %d for file '%s'\n", child, hc->expnfilename); + ninfo("Started CGI task %d for file '%s'\n", child, hc->expnfilename); /* Wait for the CGI threads to become initialized */ @@ -1052,7 +1053,8 @@ int cgi(httpd_conn *hc) else { NOTIMPLEMENTED("CGI"); - httpd_send_err(hc, 501, err501title, "", err501form, httpd_method_str(hc->method)); + httpd_send_err(hc, 501, err501title, "", err501form, + httpd_method_str(hc->method)); goto errout_with_sem; } @@ -1072,10 +1074,10 @@ static void cgi_kill(ClientData client_data, struct timeval *nowP) /* task_delete() is a very evil API. It can leave memory stranded! */ - nllerr("Killing CGI child: %d\n", pid); + nllinfo("Killing CGI child: %d\n", pid); if (task_delete(pid) != 0) { - nllerr("task_delete() failed: %d\n", errno); + nllerr("ERROR: task_delete() failed: %d\n", errno); } } #endif diff --git a/netutils/webclient/webclient.c b/netutils/webclient/webclient.c index 2e8a283c5..30c40dc19 100644 --- a/netutils/webclient/webclient.c +++ b/netutils/webclient/webclient.c @@ -396,12 +396,13 @@ static int wget_gethostip(FAR char *hostname, in_addr_t *ipv4addr) he = gethostbyname(hostname); if (he == NULL) { - nerr("gethostbyname failed: %d\n", h_errno); + nwarn("WARNING: gethostbyname failed: %d\n", h_errno); return -ENOENT; } else if (he->h_addrtype != AF_INET) { - nerr("gethostbyname returned an address of type: %d\n", he->h_addrtype); + nwarn("WARNING: gethostbyname returned an address of type: %d\n", + he->h_addrtype); return -ENOEXEC; } @@ -465,7 +466,7 @@ static int wget_base(FAR const char *url, FAR char *buffer, int buflen, ws.filename, CONFIG_WEBCLIENT_MAXFILENAME); if (ret != 0) { - nerr("ERROR: Malformed HTTP URL: %s\n", url); + nwarn("WARNING: Malformed HTTP URL: %s\n", url); set_errno(-ret); return ERROR; } @@ -516,7 +517,7 @@ static int wget_base(FAR const char *url, FAR char *buffer, int buflen, { /* Could not resolve host (or malformed IP address) */ - nerr("ERROR: Failed to resolve hostname\n"); + nwarn("WARNING: Failed to resolve hostname\n"); ret = -EHOSTUNREACH; goto errout_with_errno; } diff --git a/netutils/webserver/httpd.c b/netutils/webserver/httpd.c index b0ed45204..6dfae92ff 100644 --- a/netutils/webserver/httpd.c +++ b/netutils/webserver/httpd.c @@ -516,7 +516,8 @@ static int httpd_sendfile(struct httpd_state *pstate) if (httpd_openindex(pstate) != OK) { - nerr("[%d] '%s' not found\n", pstate->ht_sockfd, pstate->ht_filename); + nwarn("WARNING: [%d] '%s' not found\n", + pstate->ht_sockfd, pstate->ht_filename); return httpd_senderror(pstate, 404); } @@ -577,7 +578,7 @@ static inline int httpd_parse(struct httpd_state *pstate) if (o == pstate->ht_buffer + sizeof pstate->ht_buffer) { - nerr("[%d] ht_buffer overflow\n"); + nerr("ERROR: [%d] ht_buffer overflow\n"); return 413; } @@ -588,20 +589,21 @@ static inline int httpd_parse(struct httpd_state *pstate) sizeof pstate->ht_buffer - (o - pstate->ht_buffer), 0); if (r == 0) { - nerr("[%d] connection lost\n", pstate->ht_sockfd); + nwarn("WARNING: [%d] connection lost\n", pstate->ht_sockfd); return ERROR; } #if CONFIG_NETUTILS_HTTPD_TIMEOUT > 0 if (r == -1 && errno == EWOULDBLOCK) { - nerr("[%d] recv timeout\n"); + nwarn("WARNING: [%d] recv timeout\n"); return 408; } #endif if (r == -1) { - nerr("[%d] recv failed: %d\n", pstate->ht_sockfd, errno); + nerr("ERROR: [%d] recv failed: %d\n", + pstate->ht_sockfd, errno); return 400; } @@ -625,7 +627,7 @@ static inline int httpd_parse(struct httpd_state *pstate) if (*end != '\n') { - nerr("[%d] expected CRLF\n"); + nwarn("WARNING: [%d] expected CRLF\n"); return 400; } @@ -638,7 +640,7 @@ static inline int httpd_parse(struct httpd_state *pstate) case STATE_METHOD: if (0 != strncmp(start, "GET ", 4)) { - nerr("[%d] method not supported\n"); + nwarn("WARNING: [%d] method not supported\n"); return 501; } @@ -647,7 +649,7 @@ static inline int httpd_parse(struct httpd_state *pstate) if (0 != strcmp(v, " HTTP/1.0") && 0 != strcmp(v, " HTTP/1.1")) { - nerr("[%d] HTTP version not supported\n"); + nwarn("WARNING: [%d] HTTP version not supported\n"); return 505; } @@ -655,7 +657,7 @@ static inline int httpd_parse(struct httpd_state *pstate) if (v - start >= sizeof pstate->ht_filename) { - nerr("[%d] ht_filename overflow\n"); + nerr("ERROR: [%d] ht_filename overflow\n"); return 414; } @@ -680,7 +682,7 @@ static inline int httpd_parse(struct httpd_state *pstate) if (*start == '\0' || *v == '\0') { - nerr("[%d] header parse error\n"); + nwarn("WARNING: [%d] header parse error\n"); return 400; } @@ -688,7 +690,7 @@ static inline int httpd_parse(struct httpd_state *pstate) if (0 == strcasecmp(start, "Content-Length") && 0 != atoi(v)) { - nerr("[%d] non-zero request length\n"); + nwarn("WARNING: [%d] non-zero request length\n"); return 413; } #ifndef CONFIG_NETUTILS_HTTPD_KEEPALIVE_DISABLE @@ -815,7 +817,7 @@ static void single_server(uint16_t portno, pthread_startroutine_t handler, int s if (acceptsd < 0) { - nerr("accept failure: %d\n", errno); + nerr("ERROR: accept failure: %d\n", errno); break; } @@ -829,7 +831,7 @@ static void single_server(uint16_t portno, pthread_startroutine_t handler, int s if (setsockopt(acceptsd, SOL_SOCKET, SO_LINGER, &ling, sizeof(struct linger)) < 0) { close(acceptsd); - nerr("setsockopt SO_LINGER failure: %d\n", errno); + nerr("ERROR: setsockopt SO_LINGER failure: %d\n", errno); break;; } #endif @@ -842,7 +844,7 @@ static void single_server(uint16_t portno, pthread_startroutine_t handler, int s if (setsockopt(acceptsd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(struct timeval)) < 0) { close(acceptsd); - nerr("setsockopt SO_RCVTIMEO failure: %d\n", errno); + nerr("ERROR: setsockopt SO_RCVTIMEO failure: %d\n", errno); break;; } #endif From a63d306549fce6b137c3bd4b2406fd61a9bfc625 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 14 Jun 2016 18:23:49 -0600 Subject: [PATCH 54/74] apps/examples: Change some *err() message to *info() messages if what was a *dbg() message does not indicate and error condition. --- examples/cc3000/telnetd_daemon.c | 20 +++---- examples/cc3000/telnetd_driver.c | 16 +++--- examples/discover/discover_main.c | 2 +- examples/ltdc/dma2d.c | 88 +++++++++++++++---------------- examples/ltdc/ltdc_main.c | 56 ++++++++++---------- examples/nxterm/nxterm_toolbar.c | 2 +- examples/tcpecho/tcpecho_main.c | 10 ++-- examples/xmlrpc/xmlrpc_main.c | 14 ++--- 8 files changed, 104 insertions(+), 104 deletions(-) diff --git a/examples/cc3000/telnetd_daemon.c b/examples/cc3000/telnetd_daemon.c index 64d93cc29..6793fc512 100644 --- a/examples/cc3000/telnetd_daemon.c +++ b/examples/cc3000/telnetd_daemon.c @@ -125,7 +125,7 @@ static int telnetd_daemon(int argc, char *argv[]) if (listensd < 0) { int errval = errno; - nerr("socket failure: %d\n", errval); + nerr("ERROR: socket failure: %d\n", errval); return -errval; } @@ -135,7 +135,7 @@ static int telnetd_daemon(int argc, char *argv[]) optval = 1; if (setsockopt(listensd, SOL_SOCKET, SO_REUSEADDR, (void*)&optval, sizeof(int)) < 0) { - nerr("setsockopt SO_REUSEADDR failure: %d\n", errno); + nerr("ERROR: setsockopt SO_REUSEADDR failure: %d\n", errno); goto errout_with_socket; } #endif @@ -148,7 +148,7 @@ static int telnetd_daemon(int argc, char *argv[]) if (bind(listensd, (struct sockaddr*)&myaddr, sizeof(struct sockaddr_in)) < 0) { - nerr("bind failure: %d\n", errno); + nerr("ERROR: bind failure: %d\n", errno); goto errout_with_socket; } @@ -156,7 +156,7 @@ static int telnetd_daemon(int argc, char *argv[]) if (listen(listensd, 5) < 0) { - nerr("listen failure %d\n", errno); + nerr("ERROR: listen failure %d\n", errno); goto errout_with_socket; } @@ -181,7 +181,7 @@ static int telnetd_daemon(int argc, char *argv[]) acceptsd = accept(listensd, (struct sockaddr*)&myaddr, &addrlen); if (acceptsd < 0) { - nllerr("accept failed: %d\n", errno); + nllerr("ERROR: accept failed: %d\n", errno); goto errout_with_socket; } @@ -192,7 +192,7 @@ static int telnetd_daemon(int argc, char *argv[]) ling.l_linger = 30; /* timeout is seconds */ if (setsockopt(acceptsd, SOL_SOCKET, SO_LINGER, &ling, sizeof(struct linger)) < 0) { - nllerr("setsockopt failed: %d\n", errno); + nllerr("ERROR: setsockopt failed: %d\n", errno); goto errout_with_acceptsd; } #endif @@ -203,7 +203,7 @@ static int telnetd_daemon(int argc, char *argv[]) devpath = telnetd_driver(acceptsd, daemon); if (devpath == NULL) { - nllerr("telnetd_driver failed\n"); + nllerr("ERROR: telnetd_driver failed\n"); goto errout_with_acceptsd; } @@ -213,7 +213,7 @@ static int telnetd_daemon(int argc, char *argv[]) drvrfd = open(devpath, O_RDWR); if (drvrfd < 0) { - nllerr("Failed to open %s: %d\n", devpath, errno); + nllerr("ERROR: Failed to open %s: %d\n", devpath, errno); goto errout_with_acceptsd; } @@ -243,7 +243,7 @@ static int telnetd_daemon(int argc, char *argv[]) daemon->entry, NULL); if (pid < 0) { - nllerr("Failed start the telnet session: %d\n", errno); + nllerr("ERROR: Failed start the telnet session: %d\n", errno); goto errout_with_acceptsd; } @@ -325,7 +325,7 @@ int telnetd_start(FAR struct telnetd_config_s *config) { int errval = errno; free(daemon); - nerr("Failed to start the telnet daemon: %d\n", errval); + nerr("ERROR: Failed to start the telnet daemon: %d\n", errval); return -errval; } diff --git a/examples/cc3000/telnetd_driver.c b/examples/cc3000/telnetd_driver.c index 9a68190b2..513486fc8 100644 --- a/examples/cc3000/telnetd_driver.c +++ b/examples/cc3000/telnetd_driver.c @@ -397,7 +397,7 @@ static void telnetd_sendopt(FAR struct telnetd_dev_s *priv, uint8_t option, telnetd_dumpbuffer("Send optbuf", optbuf, 4); if (send(priv->td_psock, optbuf, 4, 0) < 0) { - nllerr("Failed to send TELNET_IAC\n"); + nllerr("ERROR: Failed to send TELNET_IAC\n"); } } @@ -498,7 +498,7 @@ static int telnetd_close(FAR struct file *filep) ret = asprintf(&devpath, TELNETD_DEVFMT, priv->td_minor); if (ret < 0) { - nllerr("Failed to allocate the driver path\n"); + nllerr("ERROR: Failed to allocate the driver path\n"); } else { @@ -507,7 +507,7 @@ static int telnetd_close(FAR struct file *filep) ret = unregister_driver(devpath); if (ret < 0) { - nllerr("Failed to unregister the driver %s: %d\n", devpath, ret); + nllerr("ERROR: Failed to unregister the driver %s: %d\n", devpath, ret); } free(devpath); @@ -645,7 +645,7 @@ static ssize_t telnetd_write(FAR struct file *filep, FAR const char *buffer, siz ret = send(priv->td_psock, priv->td_txbuffer, ncopied, 0); if (ret < 0) { - nllerr("psock_send failed '%s': %d\n", priv->td_txbuffer, ret); + nllerr("ERROR: psock_send failed '%s': %d\n", priv->td_txbuffer, ret); return ret; } @@ -662,7 +662,7 @@ static ssize_t telnetd_write(FAR struct file *filep, FAR const char *buffer, siz ret = send(priv->td_psock, priv->td_txbuffer, ncopied, 0); if (ret < 0) { - nllerr("psock_send failed '%s': %d\n", priv->td_txbuffer, ret); + nllerr("ERROR: psock_send failed '%s': %d\n", priv->td_txbuffer, ret); return ret; } } @@ -750,7 +750,7 @@ FAR char *telnetd_driver(long sd, FAR struct telnetd_s *daemon) priv = (FAR struct telnetd_dev_s*)malloc(sizeof(struct telnetd_dev_s)); if (!priv) { - nllerr("Failed to allocate the driver data structure\n"); + nllerr("ERROR: Failed to allocate the driver data structure\n"); return NULL; } @@ -786,7 +786,7 @@ FAR char *telnetd_driver(long sd, FAR struct telnetd_s *daemon) ret = asprintf(&devpath, TELNETD_DEVFMT, priv->td_minor); if (ret < 0) { - nllerr("Failed to allocate the driver path\n"); + nllerr("ERROR: Failed to allocate the driver path\n"); goto errout_with_dev; } @@ -795,7 +795,7 @@ FAR char *telnetd_driver(long sd, FAR struct telnetd_s *daemon) ret = register_driver(devpath, &g_telnetdfops, 0666, priv); if (ret < 0) { - nllerr("Failed to register the driver %s: %d\n", devpath, ret); + nllerr("ERROR: Failed to register the driver %s: %d\n", devpath, ret); goto errout_with_devpath; } diff --git a/examples/discover/discover_main.c b/examples/discover/discover_main.c index 5272b681a..d37250515 100644 --- a/examples/discover/discover_main.c +++ b/examples/discover/discover_main.c @@ -178,7 +178,7 @@ int discover_main(int argc, char *argv[]) if (discover_start(NULL) < 0) { - nerr("Could not start discover daemon.\n"); + nerr("ERROR: Could not start discover daemon.\n"); return ERROR; } diff --git a/examples/ltdc/dma2d.c b/examples/ltdc/dma2d.c index 3afafc46b..deceea121 100644 --- a/examples/ltdc/dma2d.c +++ b/examples/ltdc/dma2d.c @@ -92,7 +92,7 @@ static FAR struct dma2d_surface *ltdc_create_dma2d_surface(uint16_t xres, if (!sur->dma2d) { - err("up_dma2dcreatelayer failed\n"); + err("ERROR: up_dma2dcreatelayer failed\n"); free(sur); sur = NULL; } @@ -102,7 +102,7 @@ static FAR struct dma2d_surface *ltdc_create_dma2d_surface(uint16_t xres, if (ret != OK) { - err("getvideoinfo() failed\n"); + err("ERROR: getvideoinfo() failed\n"); } else { @@ -110,7 +110,7 @@ static FAR struct dma2d_surface *ltdc_create_dma2d_surface(uint16_t xres, if (ret != OK) { - err("getplaneinfo() failed\n"); + err("ERROR: getplaneinfo() failed\n"); } } @@ -419,7 +419,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - err("setalpha() failed\n"); + err("ERROR: setalpha() failed\n"); _exit(1); } @@ -429,7 +429,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK || alpha != 127) { - err("getalpha() failed\n"); + err("ERROR: getalpha() failed\n"); _exit(1); } @@ -439,7 +439,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - err("setblendmode() failed\n"); + err("ERROR: setblendmode() failed\n"); _exit(1); } @@ -449,7 +449,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK || blendmode != DMA2D_BLEND_ALPHA) { - err("getblendmode() failed\n"); + err("ERROR: getblendmode() failed\n"); _exit(1); } @@ -475,7 +475,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - err("ltdc getclut() failed\n"); + err("ERROR: ltdc getclut() failed\n"); _exit(1); } @@ -499,7 +499,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - err("getclut() failed\n"); + err("ERROR: getclut() failed\n"); _exit(1); } @@ -515,7 +515,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - err("setclut() failed\n"); + err("ERROR: setclut() failed\n"); _exit(1); } @@ -523,7 +523,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - err("getclut() failed\n"); + err("ERROR: getclut() failed\n"); _exit(1); } @@ -538,7 +538,7 @@ static void ltdc_dma2d_interface(void) memcmp(cmap->red, cmap->green, 256)) #endif { - err("unexpected clut content\n"); + err("ERROR: unexpected clut content\n"); _exit(1); } @@ -548,7 +548,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - err("ltdc getclut() failed\n"); + err("ERROR: ltdc getclut() failed\n"); _exit(1); } @@ -563,7 +563,7 @@ static void ltdc_dma2d_interface(void) memcmp(cmap->red, cmap->green, 256)) #endif { - err("unexpected clut content\n"); + err("ERROR: unexpected clut content\n"); _exit(1); } @@ -575,7 +575,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - err("ltdc setclut() failed\n"); + err("ERROR: ltdc setclut() failed\n"); _exit(1); } @@ -585,7 +585,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - err("getclut() failed\n"); + err("ERROR: getclut() failed\n"); _exit(1); } @@ -600,7 +600,7 @@ static void ltdc_dma2d_interface(void) memcmp(cmap->blue, cmapltdc->blue, LTDC_EXAMPLE_NCOLORS)) #endif { - err("clut of ltdc layer and related dma2d layer are different\n"); + err("ERROR: clut of ltdc layer and related dma2d layer are different\n"); _exit(1); } else @@ -617,11 +617,11 @@ static void ltdc_dma2d_interface(void) if (ret == OK) { - err("setclut() failed, expected error if first color exceeds 256\n"); + err("ERROR: setclut() failed, expected error if first color exceeds 256\n"); } else { - err("setclut() Ok, unsupported cmap detected\n"); + info("setclut() Ok, unsupported cmap detected\n"); } /* Check expected getclut error */ @@ -630,11 +630,11 @@ static void ltdc_dma2d_interface(void) if (ret == OK) { - err("getclut() failed, expected error if first color exceeds 256\n"); + err("ERROR: getclut() failed, expected error if first color exceeds 256\n"); } else { - err("getclut() Ok, unsupported cmap detected\n"); + info("getclut() Ok, unsupported cmap detected\n"); } cmap->first = 0; @@ -645,7 +645,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - err("ltdc setclut() failed\n"); + err("ERROR: ltdc setclut() failed\n"); _exit(1); } @@ -672,7 +672,7 @@ static void ltdc_dma2d_fillarea(void) #ifdef CONFIG_STM32_DMA2D_L8 if (active->vinfo.fmt == FB_FMT_RGB8) { - err("skipped, output to layer with CLUT pixel format not supported\n"); + warn("WARNING: skipped, output to layer with CLUT pixel format not supported\n"); return; } #endif @@ -702,11 +702,11 @@ static void ltdc_dma2d_fillarea(void) if (ret == OK) { - err("ok, driver detects wrong positioning\n"); + info("ok, driver detects wrong positioning\n"); } else { - err("fail, wrong positioning can overflow layer buffer\n"); + err("ERROR: fail, wrong positioning can overflow layer buffer\n"); } info("check if the dma2d driver recognized when positioning overflows the" @@ -727,11 +727,11 @@ static void ltdc_dma2d_fillarea(void) if (ret == OK) { - err("ok, driver detects wrong positioning\n"); + info("ok, driver detects wrong positioning\n"); } else { - err("fail, wrong positioning can overflow layer buffer\n"); + err("ERROR: fail, wrong positioning can overflow layer buffer\n"); } /* Flip with non blend */ @@ -832,7 +832,7 @@ static void ltdc_dma2d_blitsimple(void) #ifdef CONFIG_STM32_DMA2D_L8 if (active->vinfo.fmt == FB_FMT_RGB8) { - err("skipped, output to layer with CLUT pixel format not supported\n"); + warn("WARNING: skipped, output to layer with CLUT pixel format not supported\n"); return; } #endif @@ -963,7 +963,7 @@ static void ltdc_dma2d_blitpositioning(void) #ifdef CONFIG_STM32_DMA2D_L8 if (active->vinfo.fmt == FB_FMT_RGB8) { - err("skipped, output to layer with CLUT pixel format not supported\n"); + warn("WARNING: skipped, output to layer with CLUT pixel format not supported\n"); return; } #endif @@ -1227,7 +1227,7 @@ static void ltdc_dma2d_blendsimple(void) #ifdef CONFIG_STM32_DMA2D_L8 if (active->vinfo.fmt == FB_FMT_RGB8) { - err("skipped, output to layer with CLUT pixel format not supported\n"); + warn("WARNING: skipped, output to layer with CLUT pixel format not supported\n"); return; } #endif @@ -1390,7 +1390,7 @@ static void ltdc_dma2d_blitdynamiclayer(void) #ifdef CONFIG_STM32_DMA2D_L8 if (active->vinfo.fmt == FB_FMT_RGB8) { - err("skipped, output to layer with CLUT pixel format not supported\n"); + warn("WARNING: skipped, output to layer with CLUT pixel format not supported\n"); return; } #endif @@ -1404,7 +1404,7 @@ static void ltdc_dma2d_blitdynamiclayer(void) _exit(1); } - err("create background dma2d surface: %p\n", back); + info("create background dma2d surface: %p\n", back); fore = ltdc_create_dma2d_surface(active->vinfo.xres/2, active->vinfo.yres/2, active->vinfo.fmt); @@ -1415,7 +1415,7 @@ static void ltdc_dma2d_blitdynamiclayer(void) _exit(1); } - err("create foreground dma2d surface: %p\n", fore); + info("create foreground dma2d surface: %p\n", fore); /* Wrong positioning detection */ @@ -1424,7 +1424,7 @@ static void ltdc_dma2d_blitdynamiclayer(void) forearea.xres = fore->vinfo.xres; forearea.yres = fore->vinfo.yres; - err("check if the ltdc driver recognized when positioning overflows the whole" + info("check if the ltdc driver recognized when positioning overflows the whole" " layer buffer\n"); if (active->layer->blit(active->layer, @@ -1458,11 +1458,11 @@ static void ltdc_dma2d_blitdynamiclayer(void) if (ret == OK) { - err("ok, driver detects wrong positioning\n"); + info("ok, driver detects wrong positioning\n"); } else { - err("fail, wrong positioning can overflow layer buffer\n"); + err("ERROR: fail, wrong positioning can overflow layer buffer\n"); } info("check if the dma2d driver recognized when positioning overflows the" @@ -1502,11 +1502,11 @@ static void ltdc_dma2d_blitdynamiclayer(void) if (ret == OK) { - err("ok, driver detects wrong positioning\n"); + info("ok, driver detects wrong positioning\n"); } else { - err("fail, wrong positioning can overflow layer buffer\n"); + err("ERROR: fail, wrong positioning can overflow layer buffer\n"); } /* Initialize the dma2d fullscreen background layer */ @@ -1662,7 +1662,7 @@ static void ltdc_dma2d_blenddynamiclayer(void) #ifdef CONFIG_STM32_DMA2D_L8 if (active->vinfo.fmt == FB_FMT_RGB8) { - err("skipped, output to layer with CLUT pixel format not supported\n"); + warn("WARNING: skipped, output to layer with CLUT pixel format not supported\n"); return; } #endif @@ -1746,11 +1746,11 @@ static void ltdc_dma2d_blenddynamiclayer(void) if (ret == OK) { - err("ok, driver detects wrong positioning\n"); + info("ok, driver detects wrong positioning\n"); } else { - err("fail, wrong positioning can overflow layer buffer\n"); + err("ERROR: fail, wrong positioning can overflow layer buffer\n"); } info("check if the dma2d driver recognized when positioning overflows the" @@ -1806,11 +1806,11 @@ static void ltdc_dma2d_blenddynamiclayer(void) if (ret == OK) { - err("ok, driver detects wrong positioning\n"); + info("ok, driver detects wrong positioning\n"); } else { - err("fail, wrong positioning can overflow layer buffer\n"); + err("ERROR: fail, wrong positioning can overflow layer buffer\n"); } /* Initialize the dma2d fullscreen background layer */ @@ -1987,7 +1987,7 @@ static void ltdc_dma2d_blitflippositioning(void) #ifdef CONFIG_STM32_DMA2D_L8 if (active->vinfo.fmt == FB_FMT_RGB8 || inactive->vinfo.fmt == FB_FMT_RGB8) { - err("skipped, output to layer with CLUT pixel format not supported\n"); + warn("WARNING: skipped, output to layer with CLUT pixel format not supported\n"); return; } #endif diff --git a/examples/ltdc/ltdc_main.c b/examples/ltdc/ltdc_main.c index 5621331d3..d6db6d4f9 100644 --- a/examples/ltdc/ltdc_main.c +++ b/examples/ltdc/ltdc_main.c @@ -96,19 +96,19 @@ static int ltdc_init_surface(int lid, uint32_t mode) if (!sur->layer) { - err("up_ltdcgetlayer() failed\n"); + err("ERROR: up_ltdcgetlayer() failed\n"); return -1; } if (sur->layer->getvideoinfo(sur->layer, &sur->vinfo) != OK) { - err("getvideoinfo() failed\n"); + err("ERROR: getvideoinfo() failed\n"); return -1; } if (sur->layer->getplaneinfo(sur->layer, 0, &sur->pinfo) != OK) { - err("getplaneinfo() failed\n"); + err("ERROR: getplaneinfo() failed\n"); return -1; } @@ -133,7 +133,7 @@ static int ltdc_init_surface(int lid, uint32_t mode) if (sur->layer->getlid(sur->layer, &lid, LTDC_LAYER_DMA2D) != OK) { - err("getlid() failed\n"); + err("ERROR: getlid() failed\n"); return -1; } @@ -141,7 +141,7 @@ static int ltdc_init_surface(int lid, uint32_t mode) if (sur->dma2d == NULL) { - err("up_dma2dgetlayer() failed\n"); + err("ERROR: up_dma2dgetlayer() failed\n"); return -1; } #endif @@ -176,14 +176,14 @@ static void ltdc_setget_test(void) if (ret != OK) { - err("setalpha() failed\n"); + err("ERROR: setalpha() failed\n"); } ret = sur->layer->getalpha(sur->layer, &alpha); if (ret != OK || alpha != 0x7f) { - err("getalpha() failed\n"); + err("ERROR: getalpha() failed\n"); } /* setcolor */ @@ -192,14 +192,14 @@ static void ltdc_setget_test(void) if (ret != OK) { - err("setcolor() failed\n"); + err("ERROR: setcolor() failed\n"); } ret = sur->layer->getcolor(sur->layer, &color); if (ret != OK || color != 0x11223344) { - err("getcolor() failed\n"); + err("ERROR: getcolor() failed\n"); } /* setcolorkey */ @@ -208,14 +208,14 @@ static void ltdc_setget_test(void) if (ret != OK) { - err("setcolorkey() failed\n"); + err("ERROR: setcolorkey() failed\n"); } ret = sur->layer->getcolorkey(sur->layer, &color); if (ret != OK || color != 0x55667788) { - err("getcolorkey() failed\n"); + err("ERROR: getcolorkey() failed\n"); } /* setblendmode */ @@ -224,14 +224,14 @@ static void ltdc_setget_test(void) if (ret != OK) { - err("setblendmode() failed\n"); + err("ERROR: setblendmode() failed\n"); } ret = sur->layer->getblendmode(sur->layer, &mode); if (ret != OK || mode != LTDC_BLEND_NONE) { - err("getblendmode() failed\n"); + err("ERROR: getblendmode() failed\n"); } /* setarea */ @@ -246,7 +246,7 @@ static void ltdc_setget_test(void) if (ret != OK) { - err("setarea() failed\n"); + err("ERROR: setarea() failed\n"); } ret = sur->layer->getarea(sur->layer, &area, &xpos, &ypos); @@ -255,7 +255,7 @@ static void ltdc_setget_test(void) area.xpos != sur->vinfo.xres/4 || area.ypos != sur->vinfo.yres/4 || area.xres != sur->vinfo.xres/2 || area.yres != sur->vinfo.yres/2) { - err("getarea() failed\n"); + err("ERROR: getarea() failed\n"); } #ifdef CONFIG_FB_CMAP @@ -275,7 +275,7 @@ static void ltdc_setget_test(void) if (ret != OK) { - err("setclut() failed\n"); + err("ERROR: setclut() failed\n"); } /* Clear all colors to black */ @@ -291,7 +291,7 @@ static void ltdc_setget_test(void) if (ret != OK) { - err("getclut() failed\n"); + err("ERROR: getclut() failed\n"); } #ifdef CONFIG_FB_TRANSPARENCY @@ -305,7 +305,7 @@ static void ltdc_setget_test(void) ltdc_cmpcolor(g_cmap.green, cmap->green, LTDC_EXAMPLE_NCOLORS)) #endif { - err("getclut() failed, unexpected cmap content\n"); + err("ERROR: getclut() failed, unexpected cmap content\n"); } ltdc_deletecmap(cmap); @@ -318,7 +318,7 @@ static void ltdc_setget_test(void) if (ret != OK) { - err("setclut() failed\n"); + err("ERROR: setclut() failed\n"); } } #endif @@ -1728,7 +1728,7 @@ FAR struct fb_cmap_s * ltdc_createcmap(uint16_t ncolors) if (!clut) { - err("malloc() failed\n"); + err("ERROR: malloc() failed\n"); free(cmap); return NULL;; } @@ -1805,7 +1805,7 @@ uint32_t ltdc_color(FAR struct fb_videoinfo_s *vinfo, uint8_t color) break; #endif default: - err("Unsupported pixel format %d\n", vinfo->fmt); + err("ERROR: Unsupported pixel format %d\n", vinfo->fmt); value = 0; break; } @@ -2059,13 +2059,13 @@ struct surface * ltdc_get_surface(uint32_t mode) if (ret != OK) { - err("getlid() failed\n"); + err("ERROR: getlid() failed\n"); _exit(1); } if (lid < 0 || lid > 1) { - err("invalid layer id %d\n", lid); + err("ERROR: invalid layer id %d\n", lid); _exit(1); } @@ -2086,7 +2086,7 @@ int ltdc_main(int argc, char *argv[]) if (up_fbinitialize(0) < 0) { - err("up_fbinitialize() failed\n"); + err("ERROR: up_fbinitialize() failed\n"); return -1; } @@ -2094,19 +2094,19 @@ int ltdc_main(int argc, char *argv[]) if (!fbtable) { - err("up_fbgetvplane() failed\n"); + err("ERROR: up_fbgetvplane() failed\n"); return -1; } if (fbtable->getvideoinfo(fbtable, &vinfo)<0) { - err("getvideoinfo failed\n"); + err("ERROR: getvideoinfo failed\n"); return -1; } if (fbtable->getplaneinfo(fbtable, 0, &pinfo)<0) { - err("getplaneinfo failed\n"); + err("ERROR: getplaneinfo failed\n"); return -1; } @@ -2122,7 +2122,7 @@ int ltdc_main(int argc, char *argv[]) { if (fbtable->putcmap(fbtable, &g_cmap) != OK) { - err("putcmap() failed\n"); + err("ERROR: putcmap() failed\n"); return -1; } } diff --git a/examples/nxterm/nxterm_toolbar.c b/examples/nxterm/nxterm_toolbar.c index c927c88c9..0428ac1e4 100644 --- a/examples/nxterm/nxterm_toolbar.c +++ b/examples/nxterm/nxterm_toolbar.c @@ -125,7 +125,7 @@ static void nxtool_redraw(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect, ret = nxtk_filltoolbar(hwnd, rect, color); if (ret < 0) { - gerr("nxtk_filltoolbar failed: %d\n", errno); + gerr("ERROR: nxtk_filltoolbar failed: %d\n", errno); } } diff --git a/examples/tcpecho/tcpecho_main.c b/examples/tcpecho/tcpecho_main.c index 1b43650ed..f2a76af15 100644 --- a/examples/tcpecho/tcpecho_main.c +++ b/examples/tcpecho/tcpecho_main.c @@ -224,7 +224,7 @@ static int tcpecho_server(void) return ERROR; } - nerr("start listening on port: %d\n", CONFIG_EXAMPLES_TCPECHO_PORT); + ninfo("start listening on port: %d\n", CONFIG_EXAMPLES_TCPECHO_PORT); ret = listen(listenfd, CONFIG_EXAMPLES_TCPECHO_BACKLOG); if (ret < 0) @@ -253,7 +253,7 @@ static int tcpecho_server(void) clilen = sizeof(cliaddr); connfd = accept(listenfd, (struct sockaddr*)&cliaddr, &clilen); - nerr("new client: %s\n", inet_ntoa(cliaddr.sin_addr)); + ninfo("new client: %s\n", inet_ntoa(cliaddr.sin_addr)); for (i = 1; i < CONFIG_EXAMPLES_TCPECHO_NCONN; i++) { @@ -299,7 +299,7 @@ static int tcpecho_server(void) { /* connection reset by client */ - nerr("client[%d] aborted connection\n", i); + nwarn("WARNING: client[%d] aborted connection\n", i); close(sockfd); client[i].fd = -1; @@ -315,7 +315,7 @@ static int tcpecho_server(void) { /* connection closed by client */ - nerr("client[%d] closed connection\n", i); + nwarn("WARNING: client[%d] closed connection\n", i); close(sockfd); client[i].fd = -1; @@ -324,7 +324,7 @@ static int tcpecho_server(void) { if (strcmp(buf, "exit\r\n") == 0) { - nerr("client[%d] closed connection\n", i); + nwarn("WARNING: client[%d] closed connection\n", i); close(sockfd); client[i].fd = -1; } diff --git a/examples/xmlrpc/xmlrpc_main.c b/examples/xmlrpc/xmlrpc_main.c index 9ce8cff91..6ddc3d65a 100644 --- a/examples/xmlrpc/xmlrpc_main.c +++ b/examples/xmlrpc/xmlrpc_main.c @@ -193,16 +193,16 @@ static void xmlrpc_handler(int fd) tv.tv_sec = 1; tv.tv_usec = 0; - nerr("[%d] select...\n", fd); + ninfo("[%d] select...\n", fd); ret = select(fd + 1, &rfds, NULL, NULL, &tv); - nerr("[%d] data ready\n", fd); + ninfo("[%d] data ready\n", fd); if (ret > 0) { if (FD_ISSET(fd, &rfds)) { len = recv(fd, &buffer[max], 1024, 0); - nerr("[%d] %d bytes received\n", fd, len); + ninfo("[%d] %d bytes received\n", fd, len); if (len > 0) { @@ -225,7 +225,7 @@ static void xmlrpc_handler(int fd) { /* Timeout... */ - nerr("[%d] timeout\n", fd); + nerr("ERROR: [%d] timeout\n", fd); ret = -1; break; } @@ -378,7 +378,7 @@ int xmlrpc_main(int argc, char *argv[]) if (xmlrpc_netinit() < 0) { - nerr("Could not initialize the network interface\n"); + nerr("ERROR: Could not initialize the network interface\n"); return ERROR; } @@ -407,11 +407,11 @@ int xmlrpc_main(int argc, char *argv[]) { break; } - nerr("Connection accepted: %d\n", connfd); + ninfo("Connection accepted: %d\n", connfd); xmlrpc_handler(connfd); close(connfd); - nerr("[%d] connection closed\n", connfd); + ninfo("[%d] connection closed\n", connfd); } close(listenfd); From cc03ecefc8f57b0486f41187df63b25aa5112515 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 16 Jun 2016 11:44:22 -0600 Subject: [PATCH 55/74] Rename err() to _err() --- examples/elf/elf_main.c | 4 +-- examples/helloxx/helloxx_main.cxx | 2 +- examples/ltdc/dma2d.c | 52 +++++++++++++-------------- examples/ltdc/ltdc_main.c | 56 ++++++++++++++--------------- examples/nxflat/nxflat_main.c | 4 +-- examples/pca9635/pca9635_main.c | 2 +- examples/posix_spawn/spawn_main.c | 4 +-- netutils/pppd/pppd.c | 17 ++++----- nshlib/nsh_console.c | 2 +- nshlib/nsh_telnetd.c | 2 +- system/i2c/i2c_main.c | 2 +- system/ubloxmodem/ubloxmodem_main.c | 2 +- 12 files changed, 75 insertions(+), 74 deletions(-) diff --git a/examples/elf/elf_main.c b/examples/elf/elf_main.c index 7e5ff2074..0b72f61ca 100644 --- a/examples/elf/elf_main.c +++ b/examples/elf/elf_main.c @@ -107,7 +107,7 @@ #ifdef CONFIG_CPP_HAVE_VARARGS # ifdef CONFIG_DEBUG_FEATURES # define message(format, ...) info(format, ##__VA_ARGS__) -# define errmsg(format, ...) err(format, ##__VA_ARGS__) +# define errmsg(format, ...) _err(format, ##__VA_ARGS__) # else # define message(format, ...) printf(format, ##__VA_ARGS__) # define errmsg(format, ...) fprintf(stderr, format, ##__VA_ARGS__) @@ -115,7 +115,7 @@ #else # ifdef CONFIG_DEBUG_FEATURES # define message info -# define errmsg err +# define errmsg _err # else # define message printf # define errmsg printf diff --git a/examples/helloxx/helloxx_main.cxx b/examples/helloxx/helloxx_main.cxx index 95dcfdcda..1e6a5dbb7 100644 --- a/examples/helloxx/helloxx_main.cxx +++ b/examples/helloxx/helloxx_main.cxx @@ -63,7 +63,7 @@ #endif #ifdef CONFIG_DEBUG_CXX -# define cxxdbg err +# define cxxdbg _err # define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO # define cxxinfo info diff --git a/examples/ltdc/dma2d.c b/examples/ltdc/dma2d.c index deceea121..ee17a7442 100644 --- a/examples/ltdc/dma2d.c +++ b/examples/ltdc/dma2d.c @@ -92,7 +92,7 @@ static FAR struct dma2d_surface *ltdc_create_dma2d_surface(uint16_t xres, if (!sur->dma2d) { - err("ERROR: up_dma2dcreatelayer failed\n"); + _err("ERROR: up_dma2dcreatelayer failed\n"); free(sur); sur = NULL; } @@ -102,7 +102,7 @@ static FAR struct dma2d_surface *ltdc_create_dma2d_surface(uint16_t xres, if (ret != OK) { - err("ERROR: getvideoinfo() failed\n"); + _err("ERROR: getvideoinfo() failed\n"); } else { @@ -110,7 +110,7 @@ static FAR struct dma2d_surface *ltdc_create_dma2d_surface(uint16_t xres, if (ret != OK) { - err("ERROR: getplaneinfo() failed\n"); + _err("ERROR: getplaneinfo() failed\n"); } } @@ -419,7 +419,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - err("ERROR: setalpha() failed\n"); + _err("ERROR: setalpha() failed\n"); _exit(1); } @@ -429,7 +429,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK || alpha != 127) { - err("ERROR: getalpha() failed\n"); + _err("ERROR: getalpha() failed\n"); _exit(1); } @@ -439,7 +439,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - err("ERROR: setblendmode() failed\n"); + _err("ERROR: setblendmode() failed\n"); _exit(1); } @@ -449,7 +449,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK || blendmode != DMA2D_BLEND_ALPHA) { - err("ERROR: getblendmode() failed\n"); + _err("ERROR: getblendmode() failed\n"); _exit(1); } @@ -475,7 +475,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - err("ERROR: ltdc getclut() failed\n"); + _err("ERROR: ltdc getclut() failed\n"); _exit(1); } @@ -499,7 +499,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - err("ERROR: getclut() failed\n"); + _err("ERROR: getclut() failed\n"); _exit(1); } @@ -515,7 +515,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - err("ERROR: setclut() failed\n"); + _err("ERROR: setclut() failed\n"); _exit(1); } @@ -523,7 +523,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - err("ERROR: getclut() failed\n"); + _err("ERROR: getclut() failed\n"); _exit(1); } @@ -538,7 +538,7 @@ static void ltdc_dma2d_interface(void) memcmp(cmap->red, cmap->green, 256)) #endif { - err("ERROR: unexpected clut content\n"); + _err("ERROR: unexpected clut content\n"); _exit(1); } @@ -548,7 +548,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - err("ERROR: ltdc getclut() failed\n"); + _err("ERROR: ltdc getclut() failed\n"); _exit(1); } @@ -563,7 +563,7 @@ static void ltdc_dma2d_interface(void) memcmp(cmap->red, cmap->green, 256)) #endif { - err("ERROR: unexpected clut content\n"); + _err("ERROR: unexpected clut content\n"); _exit(1); } @@ -575,7 +575,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - err("ERROR: ltdc setclut() failed\n"); + _err("ERROR: ltdc setclut() failed\n"); _exit(1); } @@ -585,7 +585,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - err("ERROR: getclut() failed\n"); + _err("ERROR: getclut() failed\n"); _exit(1); } @@ -600,7 +600,7 @@ static void ltdc_dma2d_interface(void) memcmp(cmap->blue, cmapltdc->blue, LTDC_EXAMPLE_NCOLORS)) #endif { - err("ERROR: clut of ltdc layer and related dma2d layer are different\n"); + _err("ERROR: clut of ltdc layer and related dma2d layer are different\n"); _exit(1); } else @@ -617,7 +617,7 @@ static void ltdc_dma2d_interface(void) if (ret == OK) { - err("ERROR: setclut() failed, expected error if first color exceeds 256\n"); + _err("ERROR: setclut() failed, expected error if first color exceeds 256\n"); } else { @@ -630,7 +630,7 @@ static void ltdc_dma2d_interface(void) if (ret == OK) { - err("ERROR: getclut() failed, expected error if first color exceeds 256\n"); + _err("ERROR: getclut() failed, expected error if first color exceeds 256\n"); } else { @@ -645,7 +645,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - err("ERROR: ltdc setclut() failed\n"); + _err("ERROR: ltdc setclut() failed\n"); _exit(1); } @@ -706,7 +706,7 @@ static void ltdc_dma2d_fillarea(void) } else { - err("ERROR: fail, wrong positioning can overflow layer buffer\n"); + _err("ERROR: fail, wrong positioning can overflow layer buffer\n"); } info("check if the dma2d driver recognized when positioning overflows the" @@ -731,7 +731,7 @@ static void ltdc_dma2d_fillarea(void) } else { - err("ERROR: fail, wrong positioning can overflow layer buffer\n"); + _err("ERROR: fail, wrong positioning can overflow layer buffer\n"); } /* Flip with non blend */ @@ -1462,7 +1462,7 @@ static void ltdc_dma2d_blitdynamiclayer(void) } else { - err("ERROR: fail, wrong positioning can overflow layer buffer\n"); + _err("ERROR: fail, wrong positioning can overflow layer buffer\n"); } info("check if the dma2d driver recognized when positioning overflows the" @@ -1506,7 +1506,7 @@ static void ltdc_dma2d_blitdynamiclayer(void) } else { - err("ERROR: fail, wrong positioning can overflow layer buffer\n"); + _err("ERROR: fail, wrong positioning can overflow layer buffer\n"); } /* Initialize the dma2d fullscreen background layer */ @@ -1750,7 +1750,7 @@ static void ltdc_dma2d_blenddynamiclayer(void) } else { - err("ERROR: fail, wrong positioning can overflow layer buffer\n"); + _err("ERROR: fail, wrong positioning can overflow layer buffer\n"); } info("check if the dma2d driver recognized when positioning overflows the" @@ -1810,7 +1810,7 @@ static void ltdc_dma2d_blenddynamiclayer(void) } else { - err("ERROR: fail, wrong positioning can overflow layer buffer\n"); + _err("ERROR: fail, wrong positioning can overflow layer buffer\n"); } /* Initialize the dma2d fullscreen background layer */ diff --git a/examples/ltdc/ltdc_main.c b/examples/ltdc/ltdc_main.c index d6db6d4f9..f95240523 100644 --- a/examples/ltdc/ltdc_main.c +++ b/examples/ltdc/ltdc_main.c @@ -96,19 +96,19 @@ static int ltdc_init_surface(int lid, uint32_t mode) if (!sur->layer) { - err("ERROR: up_ltdcgetlayer() failed\n"); + _err("ERROR: up_ltdcgetlayer() failed\n"); return -1; } if (sur->layer->getvideoinfo(sur->layer, &sur->vinfo) != OK) { - err("ERROR: getvideoinfo() failed\n"); + _err("ERROR: getvideoinfo() failed\n"); return -1; } if (sur->layer->getplaneinfo(sur->layer, 0, &sur->pinfo) != OK) { - err("ERROR: getplaneinfo() failed\n"); + _err("ERROR: getplaneinfo() failed\n"); return -1; } @@ -133,7 +133,7 @@ static int ltdc_init_surface(int lid, uint32_t mode) if (sur->layer->getlid(sur->layer, &lid, LTDC_LAYER_DMA2D) != OK) { - err("ERROR: getlid() failed\n"); + _err("ERROR: getlid() failed\n"); return -1; } @@ -141,7 +141,7 @@ static int ltdc_init_surface(int lid, uint32_t mode) if (sur->dma2d == NULL) { - err("ERROR: up_dma2dgetlayer() failed\n"); + _err("ERROR: up_dma2dgetlayer() failed\n"); return -1; } #endif @@ -176,14 +176,14 @@ static void ltdc_setget_test(void) if (ret != OK) { - err("ERROR: setalpha() failed\n"); + _err("ERROR: setalpha() failed\n"); } ret = sur->layer->getalpha(sur->layer, &alpha); if (ret != OK || alpha != 0x7f) { - err("ERROR: getalpha() failed\n"); + _err("ERROR: getalpha() failed\n"); } /* setcolor */ @@ -192,14 +192,14 @@ static void ltdc_setget_test(void) if (ret != OK) { - err("ERROR: setcolor() failed\n"); + _err("ERROR: setcolor() failed\n"); } ret = sur->layer->getcolor(sur->layer, &color); if (ret != OK || color != 0x11223344) { - err("ERROR: getcolor() failed\n"); + _err("ERROR: getcolor() failed\n"); } /* setcolorkey */ @@ -208,14 +208,14 @@ static void ltdc_setget_test(void) if (ret != OK) { - err("ERROR: setcolorkey() failed\n"); + _err("ERROR: setcolorkey() failed\n"); } ret = sur->layer->getcolorkey(sur->layer, &color); if (ret != OK || color != 0x55667788) { - err("ERROR: getcolorkey() failed\n"); + _err("ERROR: getcolorkey() failed\n"); } /* setblendmode */ @@ -224,14 +224,14 @@ static void ltdc_setget_test(void) if (ret != OK) { - err("ERROR: setblendmode() failed\n"); + _err("ERROR: setblendmode() failed\n"); } ret = sur->layer->getblendmode(sur->layer, &mode); if (ret != OK || mode != LTDC_BLEND_NONE) { - err("ERROR: getblendmode() failed\n"); + _err("ERROR: getblendmode() failed\n"); } /* setarea */ @@ -246,7 +246,7 @@ static void ltdc_setget_test(void) if (ret != OK) { - err("ERROR: setarea() failed\n"); + _err("ERROR: setarea() failed\n"); } ret = sur->layer->getarea(sur->layer, &area, &xpos, &ypos); @@ -255,7 +255,7 @@ static void ltdc_setget_test(void) area.xpos != sur->vinfo.xres/4 || area.ypos != sur->vinfo.yres/4 || area.xres != sur->vinfo.xres/2 || area.yres != sur->vinfo.yres/2) { - err("ERROR: getarea() failed\n"); + _err("ERROR: getarea() failed\n"); } #ifdef CONFIG_FB_CMAP @@ -275,7 +275,7 @@ static void ltdc_setget_test(void) if (ret != OK) { - err("ERROR: setclut() failed\n"); + _err("ERROR: setclut() failed\n"); } /* Clear all colors to black */ @@ -291,7 +291,7 @@ static void ltdc_setget_test(void) if (ret != OK) { - err("ERROR: getclut() failed\n"); + _err("ERROR: getclut() failed\n"); } #ifdef CONFIG_FB_TRANSPARENCY @@ -305,7 +305,7 @@ static void ltdc_setget_test(void) ltdc_cmpcolor(g_cmap.green, cmap->green, LTDC_EXAMPLE_NCOLORS)) #endif { - err("ERROR: getclut() failed, unexpected cmap content\n"); + _err("ERROR: getclut() failed, unexpected cmap content\n"); } ltdc_deletecmap(cmap); @@ -318,7 +318,7 @@ static void ltdc_setget_test(void) if (ret != OK) { - err("ERROR: setclut() failed\n"); + _err("ERROR: setclut() failed\n"); } } #endif @@ -1728,7 +1728,7 @@ FAR struct fb_cmap_s * ltdc_createcmap(uint16_t ncolors) if (!clut) { - err("ERROR: malloc() failed\n"); + _err("ERROR: malloc() failed\n"); free(cmap); return NULL;; } @@ -1805,7 +1805,7 @@ uint32_t ltdc_color(FAR struct fb_videoinfo_s *vinfo, uint8_t color) break; #endif default: - err("ERROR: Unsupported pixel format %d\n", vinfo->fmt); + _err("ERROR: Unsupported pixel format %d\n", vinfo->fmt); value = 0; break; } @@ -2059,13 +2059,13 @@ struct surface * ltdc_get_surface(uint32_t mode) if (ret != OK) { - err("ERROR: getlid() failed\n"); + _err("ERROR: getlid() failed\n"); _exit(1); } if (lid < 0 || lid > 1) { - err("ERROR: invalid layer id %d\n", lid); + _err("ERROR: invalid layer id %d\n", lid); _exit(1); } @@ -2086,7 +2086,7 @@ int ltdc_main(int argc, char *argv[]) if (up_fbinitialize(0) < 0) { - err("ERROR: up_fbinitialize() failed\n"); + _err("ERROR: up_fbinitialize() failed\n"); return -1; } @@ -2094,19 +2094,19 @@ int ltdc_main(int argc, char *argv[]) if (!fbtable) { - err("ERROR: up_fbgetvplane() failed\n"); + _err("ERROR: up_fbgetvplane() failed\n"); return -1; } if (fbtable->getvideoinfo(fbtable, &vinfo)<0) { - err("ERROR: getvideoinfo failed\n"); + _err("ERROR: getvideoinfo failed\n"); return -1; } if (fbtable->getplaneinfo(fbtable, 0, &pinfo)<0) { - err("ERROR: getplaneinfo failed\n"); + _err("ERROR: getplaneinfo failed\n"); return -1; } @@ -2122,7 +2122,7 @@ int ltdc_main(int argc, char *argv[]) { if (fbtable->putcmap(fbtable, &g_cmap) != OK) { - err("ERROR: putcmap() failed\n"); + _err("ERROR: putcmap() failed\n"); return -1; } } diff --git a/examples/nxflat/nxflat_main.c b/examples/nxflat/nxflat_main.c index be4081041..b742959d5 100644 --- a/examples/nxflat/nxflat_main.c +++ b/examples/nxflat/nxflat_main.c @@ -103,7 +103,7 @@ #ifdef CONFIG_CPP_HAVE_VARARGS # ifdef CONFIG_DEBUG_FEATURES # define message(format, ...) info(format, ##__VA_ARGS__) -# define errmsg(format, ...) err(format, ##__VA_ARGS__) +# define errmsg(format, ...) _err(format, ##__VA_ARGS__) # else # define message(format, ...) printf(format, ##__VA_ARGS__) # define errmsg(format, ...) fprintf(stderr, format, ##__VA_ARGS__) @@ -111,7 +111,7 @@ #else # ifdef CONFIG_DEBUG_FEATURES # define message info -# define errmsg err +# define errmsg _err # else # define message printf # define errmsg printf diff --git a/examples/pca9635/pca9635_main.c b/examples/pca9635/pca9635_main.c index 7584fdb0e..c8bdf939b 100644 --- a/examples/pca9635/pca9635_main.c +++ b/examples/pca9635/pca9635_main.c @@ -98,7 +98,7 @@ int pca9635_main(int argc, char *argv[]) ret = ioctl(fd, PWMIOC_SETLED_BRIGHTNESS, (unsigned long)&ledbright); if (ret < 0) { - err("ERROR: ioctl(PWMIOC_SETLED_BRIGHTNESS) failed: %d\n", errno); + _err("ERROR: ioctl(PWMIOC_SETLED_BRIGHTNESS) failed: %d\n", errno); } } diff --git a/examples/posix_spawn/spawn_main.c b/examples/posix_spawn/spawn_main.c index 577a4793c..9212060f7 100644 --- a/examples/posix_spawn/spawn_main.c +++ b/examples/posix_spawn/spawn_main.c @@ -110,7 +110,7 @@ #ifdef CONFIG_CPP_HAVE_VARARGS # ifdef CONFIG_DEBUG_FEATURES # define message(format, ...) info(format, ##__VA_ARGS__) -# define errmsg(format, ...) err(format, ##__VA_ARGS__) +# define errmsg(format, ...) _err(format, ##__VA_ARGS__) # else # define message(format, ...) printf(format, ##__VA_ARGS__) # define errmsg(format, ...) fprintf(stderr, format, ##__VA_ARGS__) @@ -118,7 +118,7 @@ #else # ifdef CONFIG_DEBUG_FEATURES # define message info -# define errmsg err +# define errmsg _err # else # define message printf # define errmsg printf diff --git a/netutils/pppd/pppd.c b/netutils/pppd/pppd.c index 64e272740..eef3fb0cc 100644 --- a/netutils/pppd/pppd.c +++ b/netutils/pppd/pppd.c @@ -102,7 +102,8 @@ static int make_nonblock(int fd) static int tun_alloc(char *dev) { struct ifreq ifr; - int fd, err; + int fd; + int errcode; if ((fd = open("/dev/tun", O_RDWR)) < 0) { @@ -111,10 +112,10 @@ static int tun_alloc(char *dev) printf("tun fd:%i\n", fd); - if ((err = make_nonblock(fd)) < 0) + if ((errcode = make_nonblock(fd)) < 0) { close(fd); - return err; + return errcode; } memset(&ifr, 0, sizeof(ifr)); @@ -124,10 +125,10 @@ static int tun_alloc(char *dev) strncpy(ifr.ifr_name, dev, IFNAMSIZ); } - if ((err = ioctl(fd, TUNSETIFF, (unsigned long)&ifr)) < 0) + if ((errcode = ioctl(fd, TUNSETIFF, (unsigned long)&ifr)) < 0) { close(fd); - return err; + return errcode; } strcpy(dev, ifr.ifr_name); @@ -142,17 +143,17 @@ static int tun_alloc(char *dev) static int open_tty(char *dev) { int fd; - int err; + int errcode; if ((fd = open(dev, O_RDWR)) < 0) { return fd; } - if ((err = make_nonblock(fd)) < 0) + if ((errcode = make_nonblock(fd)) < 0) { close(fd); - return err; + return errcode; } printf("tty fd:%i\n", fd); diff --git a/nshlib/nsh_console.c b/nshlib/nsh_console.c index 7544d226a..e47bb2a2f 100644 --- a/nshlib/nsh_console.c +++ b/nshlib/nsh_console.c @@ -183,7 +183,7 @@ static ssize_t nsh_consolewrite(FAR struct nsh_vtbl_s *vtbl, ret = fwrite(buffer, 1, nbytes, pstate->cn_outstream); if (ret < 0) { - err("ERROR: [%d] Failed to send buffer: %d\n", + _err("ERROR: [%d] Failed to send buffer: %d\n", pstate->cn_outfd, errno); } return ret; diff --git a/nshlib/nsh_telnetd.c b/nshlib/nsh_telnetd.c index f4e1da0f7..3972c3c80 100644 --- a/nshlib/nsh_telnetd.c +++ b/nshlib/nsh_telnetd.c @@ -205,7 +205,7 @@ int nsh_telnetstart(void) ret = telnetd_start(&config); if (ret < 0) { - err("ERROR: Failed to tart the Telnet daemon: %d\n", ret); + _err("ERROR: Failed to tart the Telnet daemon: %d\n", ret); } return ret; diff --git a/system/i2c/i2c_main.c b/system/i2c/i2c_main.c index 286739c3a..5fc238bf5 100644 --- a/system/i2c/i2c_main.c +++ b/system/i2c/i2c_main.c @@ -426,7 +426,7 @@ ssize_t i2ctool_write(FAR struct i2ctool_s *i2ctool, FAR const void *buffer, siz ret = fwrite(buffer, 1, nbytes, OUTSTREAM(i2ctool)); if (ret < 0) { - err("ERROR: [%d] Failed to send buffer: %d\n", OUTFD(i2ctool), errno); + _err("ERROR: [%d] Failed to send buffer: %d\n", OUTFD(i2ctool), errno); } return ret; diff --git a/system/ubloxmodem/ubloxmodem_main.c b/system/ubloxmodem/ubloxmodem_main.c index 2a8a74dbd..3598e7027 100644 --- a/system/ubloxmodem/ubloxmodem_main.c +++ b/system/ubloxmodem/ubloxmodem_main.c @@ -59,7 +59,7 @@ ****************************************************************************/ #ifdef CONFIG_MODEM_U_BLOX_DEBUG -# define m_err err +# define m_err _err # define m_warn llwarn # define m_info info # define m_llerr llerr From 509853906338b4e2e1d9038b7959a3f17314f59b Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 16 Jun 2016 12:12:34 -0600 Subject: [PATCH 56/74] Add _ to front of remaining debug macros --- examples/chat/chat_main.c | 16 +- examples/elf/elf_main.c | 8 +- examples/fstest/Makefile | 2 +- examples/helloxx/helloxx_main.cxx | 4 +- examples/ltdc/dma2d.c | 340 +++++++++--------- examples/ltdc/ltdc_main.c | 248 ++++++------- examples/nxflat/nxflat_main.c | 8 +- examples/nxflat/tests/pthread/Makefile | 2 +- examples/pca9635/pca9635_main.c | 2 +- examples/posix_spawn/spawn_main.c | 8 +- netutils/chat/chat.c | 34 +- nshlib/nsh_console.c | 2 +- nshlib/nsh_fscmds.c | 2 +- nshlib/nsh_parse.c | 4 +- nshlib/nsh_telnetd.c | 6 +- platform/arduino-due/sam_cxxinitialize.c | 2 +- platform/cloudctrl/stm32_cxxinitialize.c | 2 +- platform/fire-stm32v2/stm32_cxxinitialize.c | 2 +- platform/mikroe-stm32f4/stm32_cxxinitialize.c | 2 +- platform/nucleo-144/stm32_cxxinitialize.c | 2 +- platform/nucleo-f303re/stm32_cxxinitialize.c | 2 +- platform/nucleo-f4x1re/stm32_cxxinitialize.c | 2 +- platform/nucleo-l476rg/stm32_cxxinitialize.c | 2 +- .../olimex-stm32-h405/stm32_cxxinitialize.c | 2 +- .../olimex-stm32-h407/stm32_cxxinitialize.c | 2 +- .../olimex-stm32-p207/stm32_cxxinitialize.c | 2 +- .../olimexino-stm32/stm32_cxxinitialize.c | 2 +- platform/pcduino-a10/a1x_cxxinitialize.c | 2 +- platform/sabre-6quad/imx_cxxinitialize.c | 2 +- platform/sam3u-ek/sam_cxxinitialized.c | 2 +- platform/sam4e-ek/sam_cxxinitialize.c | 2 +- platform/sam4l-xplained/sam_cxxinitialize.c | 2 +- .../sam4s-xplained-pro/sam_cxxinitialize.c | 2 +- platform/sam4s-xplained/sam_cxxinitialize.c | 2 +- platform/sama5d2-xult/sam_cxxinitialize.c | 2 +- platform/sama5d3-xplained/sam_cxxinitialize.c | 2 +- platform/sama5d3x-ek/sam_cxxinitialize.c | 2 +- platform/sama5d4-ek/sam_cxxinitialize.c | 2 +- platform/samd20-xplained/sam_cxxinitialize.c | 2 +- platform/samd21-xplained/sam_cxxinitialize.c | 2 +- platform/same70-xplained/sam_cxxinitialize.c | 2 +- platform/saml21-xplained/sam_cxxinitialize.c | 2 +- platform/samv71-xult/sam_cxxinitialize.c | 2 +- platform/shenzhou/stm32_cxxinitialize.c | 2 +- platform/spark/stm32_cxxinitialize.c | 2 +- platform/stm3220g-eval/stm32_cxxinitialize.c | 2 +- platform/stm3240g-eval/stm32_cxxinitialize.c | 2 +- .../stm32f3discovery/stm32_cxxinitialize.c | 2 +- .../stm32f429i-disco/stm32_cxxinitialize.c | 2 +- .../stm32f4discovery/stm32_cxxinitialize.c | 2 +- .../stm32f746g-disco/stm32_cxxinitialize.c | 2 +- .../stm32l476vg-disco/stm32_cxxinitialize.c | 2 +- .../stm32ldiscovery/stm32_cxxinitialize.c | 2 +- platform/teensy-lc/kl_cxxinitialize.c | 2 +- .../viewtool-stm32f107/stm32_cxxinitialize.c | 2 +- system/i2c/i2c_main.c | 2 +- system/ubloxmodem/ubloxmodem_main.c | 12 +- system/zmodem/zm_receive.c | 2 +- 58 files changed, 391 insertions(+), 391 deletions(-) diff --git a/examples/chat/chat_main.c b/examples/chat/chat_main.c index a6799db73..b094abafa 100644 --- a/examples/chat/chat_main.c +++ b/examples/chat/chat_main.c @@ -128,7 +128,7 @@ static int chat_script_preset(FAR struct chat_app* priv, int script_number) { int ret = 0; - info("preset script %d\n", script_number); + _info("preset script %d\n", script_number); switch (script_number) { @@ -340,11 +340,11 @@ int chat_main(int argc, FAR char** argv) priv.script_dynalloc = false; strncpy(priv.tty, CONFIG_EXAMPLES_CHAT_TTY_DEVNODE, CHAT_TTYNAME_SIZE-1); - info("parsing the arguments\n"); + _info("parsing the arguments\n"); ret = chat_parse_args((FAR struct chat_app*) &priv); if (ret < 0) { - info("Command line parsing failed: code %d, errno %d\n", ret, errno); + _info("Command line parsing failed: code %d, errno %d\n", ret, errno); chat_show_usage(); exit_code = EXIT_FAILURE; goto with_script; @@ -357,20 +357,20 @@ int chat_main(int argc, FAR char** argv) goto no_script; } - info("opening %s\n", priv.tty); + _info("opening %s\n", priv.tty); priv.ctl.fd = open(priv.tty, O_RDWR); if (priv.ctl.fd < 0) { - info("Failed to open %s: %d\n", priv.tty, errno); + _info("Failed to open %s: %d\n", priv.tty, errno); exit_code = EXIT_FAILURE; goto with_script; } - info("setting up character device\n"); + _info("setting up character device\n"); ret = chat_chardev(&priv); if (ret < 0) { - info("Failed to open %s: %d\n", priv.tty, errno); + _info("Failed to open %s: %d\n", priv.tty, errno); exit_code = EXIT_FAILURE; goto with_tty_dev; } @@ -390,6 +390,6 @@ no_script: fflush(stderr); fflush(stdout); - info("Exit code %d\n", exit_code); + _info("Exit code %d\n", exit_code); return exit_code; } diff --git a/examples/elf/elf_main.c b/examples/elf/elf_main.c index 0b72f61ca..247620dd2 100644 --- a/examples/elf/elf_main.c +++ b/examples/elf/elf_main.c @@ -106,16 +106,16 @@ #ifdef CONFIG_CPP_HAVE_VARARGS # ifdef CONFIG_DEBUG_FEATURES -# define message(format, ...) info(format, ##__VA_ARGS__) -# define errmsg(format, ...) _err(format, ##__VA_ARGS__) +# define message(format, ...) _info(format, ##__VA_ARGS__) +# define errmsg(format, ...) _err(format, ##__VA_ARGS__) # else # define message(format, ...) printf(format, ##__VA_ARGS__) # define errmsg(format, ...) fprintf(stderr, format, ##__VA_ARGS__) # endif #else # ifdef CONFIG_DEBUG_FEATURES -# define message info -# define errmsg _err +# define message _info +# define errmsg _err # else # define message printf # define errmsg printf diff --git a/examples/fstest/Makefile b/examples/fstest/Makefile index 9fb9c9434..b95ec2e03 100644 --- a/examples/fstest/Makefile +++ b/examples/fstest/Makefile @@ -35,7 +35,7 @@ -include $(TOPDIR)/Make.defs -# Generic file system stress test appliation info +# Generic file system stress test application info APPNAME = fstest PRIORITY = SCHED_PRIORITY_DEFAULT diff --git a/examples/helloxx/helloxx_main.cxx b/examples/helloxx/helloxx_main.cxx index 1e6a5dbb7..f91e9a9a5 100644 --- a/examples/helloxx/helloxx_main.cxx +++ b/examples/helloxx/helloxx_main.cxx @@ -63,10 +63,10 @@ #endif #ifdef CONFIG_DEBUG_CXX -# define cxxdbg _err +# define cxxdbg _err # define cxxllerr llerr # ifdef CONFIG_DEBUG_INFO -# define cxxinfo info +# define cxxinfo _info # define cxxllinfo llinfo # else # define cxxinfo(x...) diff --git a/examples/ltdc/dma2d.c b/examples/ltdc/dma2d.c index ee17a7442..ea3cc0be4 100644 --- a/examples/ltdc/dma2d.c +++ b/examples/ltdc/dma2d.c @@ -92,7 +92,7 @@ static FAR struct dma2d_surface *ltdc_create_dma2d_surface(uint16_t xres, if (!sur->dma2d) { - _err("ERROR: up_dma2dcreatelayer failed\n"); + _err("ERROR: up_dma2dcreatelayer failed\n"); free(sur); sur = NULL; } @@ -102,7 +102,7 @@ static FAR struct dma2d_surface *ltdc_create_dma2d_surface(uint16_t xres, if (ret != OK) { - _err("ERROR: getvideoinfo() failed\n"); + _err("ERROR: getvideoinfo() failed\n"); } else { @@ -110,7 +110,7 @@ static FAR struct dma2d_surface *ltdc_create_dma2d_surface(uint16_t xres, if (ret != OK) { - _err("ERROR: getplaneinfo() failed\n"); + _err("ERROR: getplaneinfo() failed\n"); } } @@ -123,7 +123,7 @@ static FAR struct dma2d_surface *ltdc_create_dma2d_surface(uint16_t xres, { int lid; sur->dma2d->getlid(sur->dma2d, &lid); - info("dma2d layer %d is created with: " + _info("dma2d layer %d is created with: " "layer = %p, xres = %d, yres = %d, fb start address = %p, " "fb size = %d, fmt = %d, bpp = %d\n", lid, sur->dma2d, sur->vinfo.xres, sur->vinfo.yres, @@ -411,7 +411,7 @@ static void ltdc_dma2d_interface(void) #endif FAR struct dma2d_layer_s *dma2d = active->dma2d; - info("Perform simple dma2d interface test\n"); + _info("Perform simple dma2d interface test\n"); /* test setalpha */ @@ -419,7 +419,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - _err("ERROR: setalpha() failed\n"); + _err("ERROR: setalpha() failed\n"); _exit(1); } @@ -429,7 +429,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK || alpha != 127) { - _err("ERROR: getalpha() failed\n"); + _err("ERROR: getalpha() failed\n"); _exit(1); } @@ -439,7 +439,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - _err("ERROR: setblendmode() failed\n"); + _err("ERROR: setblendmode() failed\n"); _exit(1); } @@ -449,7 +449,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK || blendmode != DMA2D_BLEND_ALPHA) { - _err("ERROR: getblendmode() failed\n"); + _err("ERROR: getblendmode() failed\n"); _exit(1); } @@ -475,20 +475,20 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - _err("ERROR: ltdc getclut() failed\n"); + _err("ERROR: ltdc getclut() failed\n"); _exit(1); } for (i = 0; i < LTDC_EXAMPLE_NCOLORS; i++) { #ifdef CONFIG_FB_TRANSPARENCY - info("ltdc color %d, %02x:%02x:%02x:%02x\n", i, + _info("ltdc color %d, %02x:%02x:%02x:%02x\n", i, cmapltdc->transp[i], cmapltdc->red[i], cmapltdc->green[i], cmapltdc->blue[i]); #else - info("ltdc color %d, %02x:%02x:%02x\n", i, + _info("ltdc color %d, %02x:%02x:%02x\n", i, cmapltdc->red[i], cmapltdc->green[i], cmapltdc->blue[i]); @@ -499,7 +499,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - _err("ERROR: getclut() failed\n"); + _err("ERROR: getclut() failed\n"); _exit(1); } @@ -509,13 +509,13 @@ static void ltdc_dma2d_interface(void) #ifdef CONFIG_FB_TRANSPARENCY memset(cmap->transp, 0, 256); #endif - info("set color lookup table to black\n"); + _info("set color lookup table to black\n"); ret = dma2d->setclut(dma2d, cmap); if (ret != OK) { - _err("ERROR: setclut() failed\n"); + _err("ERROR: setclut() failed\n"); _exit(1); } @@ -523,7 +523,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - _err("ERROR: getclut() failed\n"); + _err("ERROR: getclut() failed\n"); _exit(1); } @@ -538,7 +538,7 @@ static void ltdc_dma2d_interface(void) memcmp(cmap->red, cmap->green, 256)) #endif { - _err("ERROR: unexpected clut content\n"); + _err("ERROR: unexpected clut content\n"); _exit(1); } @@ -548,7 +548,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - _err("ERROR: ltdc getclut() failed\n"); + _err("ERROR: ltdc getclut() failed\n"); _exit(1); } @@ -563,7 +563,7 @@ static void ltdc_dma2d_interface(void) memcmp(cmap->red, cmap->green, 256)) #endif { - _err("ERROR: unexpected clut content\n"); + _err("ERROR: unexpected clut content\n"); _exit(1); } @@ -575,7 +575,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - _err("ERROR: ltdc setclut() failed\n"); + _err("ERROR: ltdc setclut() failed\n"); _exit(1); } @@ -585,7 +585,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - _err("ERROR: getclut() failed\n"); + _err("ERROR: getclut() failed\n"); _exit(1); } @@ -600,12 +600,12 @@ static void ltdc_dma2d_interface(void) memcmp(cmap->blue, cmapltdc->blue, LTDC_EXAMPLE_NCOLORS)) #endif { - _err("ERROR: clut of ltdc layer and related dma2d layer are different\n"); + _err("ERROR: clut of ltdc layer and related dma2d layer are different\n"); _exit(1); } else { - info("ok, changing the clut by the ltdc layer also changed the clut of " + _info("ok, changing the clut by the ltdc layer also changed the clut of " "the dma2d layer as expected.\n"); } @@ -617,11 +617,11 @@ static void ltdc_dma2d_interface(void) if (ret == OK) { - _err("ERROR: setclut() failed, expected error if first color exceeds 256\n"); + _err("ERROR: setclut() failed, expected error if first color exceeds 256\n"); } else { - info("setclut() Ok, unsupported cmap detected\n"); + _info("setclut() Ok, unsupported cmap detected\n"); } /* Check expected getclut error */ @@ -630,11 +630,11 @@ static void ltdc_dma2d_interface(void) if (ret == OK) { - _err("ERROR: getclut() failed, expected error if first color exceeds 256\n"); + _err("ERROR: getclut() failed, expected error if first color exceeds 256\n"); } else { - info("getclut() Ok, unsupported cmap detected\n"); + _info("getclut() Ok, unsupported cmap detected\n"); } cmap->first = 0; @@ -645,7 +645,7 @@ static void ltdc_dma2d_interface(void) if (ret != OK) { - _err("ERROR: ltdc setclut() failed\n"); + _err("ERROR: ltdc setclut() failed\n"); _exit(1); } @@ -672,7 +672,7 @@ static void ltdc_dma2d_fillarea(void) #ifdef CONFIG_STM32_DMA2D_L8 if (active->vinfo.fmt == FB_FMT_RGB8) { - warn("WARNING: skipped, output to layer with CLUT pixel format not supported\n"); + _warn("WARNING: skipped, output to layer with CLUT pixel format not supported\n"); return; } #endif @@ -684,7 +684,7 @@ static void ltdc_dma2d_fillarea(void) area.xres = active->vinfo.xres; area.yres = active->vinfo.yres; - info("check if the ltdc driver recognized when positioning overflows the whole" + _info("check if the ltdc driver recognized when positioning overflows the whole" " layer buffer\n"); if (active->layer->fillarea(active->layer, &area, 0) != OK) @@ -702,14 +702,14 @@ static void ltdc_dma2d_fillarea(void) if (ret == OK) { - info("ok, driver detects wrong positioning\n"); + _info("ok, driver detects wrong positioning\n"); } else { - _err("ERROR: fail, wrong positioning can overflow layer buffer\n"); + _err("ERROR: fail, wrong positioning can overflow layer buffer\n"); } - info("check if the dma2d driver recognized when positioning overflows the" + _info("check if the dma2d driver recognized when positioning overflows the" " whole layer buffer\n"); if (active->dma2d->fillarea(active->dma2d, &area, 0) != OK) @@ -727,31 +727,31 @@ static void ltdc_dma2d_fillarea(void) if (ret == OK) { - info("ok, driver detects wrong positioning\n"); + _info("ok, driver detects wrong positioning\n"); } else { - _err("ERROR: fail, wrong positioning can overflow layer buffer\n"); + _err("ERROR: fail, wrong positioning can overflow layer buffer\n"); } /* Flip with non blend */ - info("Perform fillarea test\n"); + _info("Perform fillarea test\n"); - info("Ensure that the active layer is opaque\n"); + _info("Ensure that the active layer is opaque\n"); active->layer->setalpha(active->layer, 0xff); - info("Disable blend mode for the active layer\n"); + _info("Disable blend mode for the active layer\n"); active->layer->setblendmode(active->layer, LTDC_BLEND_NONE); - info("Set the active layer to fullscreen black\n"); + _info("Set the active layer to fullscreen black\n"); ltdc_drawcolor(&active->vinfo, active->pinfo.fbmem, active->vinfo.xres, active->vinfo.yres, ltdc_color(&active->vinfo, LTDC_BLACK)); - info("Flip the top layer to the active visible layer\n"); + _info("Flip the top layer to the active visible layer\n"); active->layer->update(active->layer, LTDC_UPDATE_ACTIVATE|LTDC_SYNC_VBLANK); - info("Draw a red rectangle in top left quarter of the screen\n"); + _info("Draw a red rectangle in top left quarter of the screen\n"); area.xpos = 0; area.ypos = 0; @@ -763,12 +763,12 @@ static void ltdc_dma2d_fillarea(void) usleep(1000000); - info("Set the active layer to fullscreen black\n"); + _info("Set the active layer to fullscreen black\n"); ltdc_drawcolor(&active->vinfo, active->pinfo.fbmem, active->vinfo.xres, active->vinfo.yres, ltdc_color(&active->vinfo, LTDC_BLACK)); - info("Draw a green rectangle in top right quarter of the screen\n"); + _info("Draw a green rectangle in top right quarter of the screen\n"); area.xpos = active->vinfo.xres/2; area.ypos = 0; @@ -778,12 +778,12 @@ static void ltdc_dma2d_fillarea(void) usleep(1000000); - info("Set the active layer to fullscreen black\n"); + _info("Set the active layer to fullscreen black\n"); ltdc_drawcolor(&active->vinfo, active->pinfo.fbmem, active->vinfo.xres, active->vinfo.yres, ltdc_color(&active->vinfo, LTDC_BLACK)); - info("Draw a white rectangle in bottom left quarter of the screen\n"); + _info("Draw a white rectangle in bottom left quarter of the screen\n"); area.xpos = 0; area.ypos = active->vinfo.yres/2; @@ -791,11 +791,11 @@ static void ltdc_dma2d_fillarea(void) active->layer->fillarea(active->layer, &area, ltdc_color(&active->vinfo, LTDC_WHITE)); - info("Draw a blue rectangle in bottom right quarter of the screen\n"); + _info("Draw a blue rectangle in bottom right quarter of the screen\n"); usleep(1000000); - info("Set the active layer to fullscreen black\n"); + _info("Set the active layer to fullscreen black\n"); ltdc_drawcolor(&active->vinfo, active->pinfo.fbmem, active->vinfo.xres, active->vinfo.yres, ltdc_color(&active->vinfo, LTDC_BLACK)); @@ -808,7 +808,7 @@ static void ltdc_dma2d_fillarea(void) usleep(1000000); - info("Set the active layer to fullscreen black\n"); + _info("Set the active layer to fullscreen black\n"); ltdc_drawcolor(&active->vinfo, active->pinfo.fbmem, active->vinfo.xres, active->vinfo.yres, ltdc_color(&active->vinfo, LTDC_BLACK)); @@ -832,37 +832,37 @@ static void ltdc_dma2d_blitsimple(void) #ifdef CONFIG_STM32_DMA2D_L8 if (active->vinfo.fmt == FB_FMT_RGB8) { - warn("WARNING: skipped, output to layer with CLUT pixel format not supported\n"); + _warn("WARNING: skipped, output to layer with CLUT pixel format not supported\n"); return; } #endif /* Flip with non blend */ - info("Perform simple blit operation\n"); + _info("Perform simple blit operation\n"); - info("active->pinfo.fbmem = %p\n", active->pinfo.fbmem); - info("inactive->pinfo.fbmem = %p\n", inactive->pinfo.fbmem); + _info("active->pinfo.fbmem = %p\n", active->pinfo.fbmem); + _info("inactive->pinfo.fbmem = %p\n", inactive->pinfo.fbmem); - info("Ensure that both ltdc layer are opaque\n"); + _info("Ensure that both ltdc layer are opaque\n"); active->layer->setalpha(active->layer, 0xff); inactive->layer->setalpha(inactive->layer, 0xff); - info("Disable blend mode for ltdc both layer\n"); + _info("Disable blend mode for ltdc both layer\n"); active->layer->setblendmode(active->layer, LTDC_BLEND_NONE); inactive->layer->setblendmode(inactive->layer, LTDC_BLEND_NONE); /* Fullscreen blit */ - info("Set the active layer to fullscreen black\n"); + _info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); - info("Flip the top layer to the active visible layer\n"); + _info("Flip the top layer to the active visible layer\n"); inactive->layer->update(active->layer, LTDC_UPDATE_ACTIVATE|LTDC_SYNC_VBLANK); ltdc_simple_draw(&inactive->vinfo, &inactive->pinfo); - info("Blit the whole bottom layer to the top layer\n"); + _info("Blit the whole bottom layer to the top layer\n"); area.xpos = 0; area.ypos = 0; area.xres = inactive->vinfo.xres; @@ -873,7 +873,7 @@ static void ltdc_dma2d_blitsimple(void) /* Top left to the middle blit */ - info("Set the active layer to fullscreen black\n"); + _info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); area.xpos = 0; @@ -881,7 +881,7 @@ static void ltdc_dma2d_blitsimple(void) area.xres = inactive->vinfo.xres/2; area.yres = inactive->vinfo.yres/2; - info("Blit the top left red rectangle from the bottom layer with the" + _info("Blit the top left red rectangle from the bottom layer with the" " top layer\n"); active->layer->blit(active->layer, active->vinfo.xres/4, @@ -891,7 +891,7 @@ static void ltdc_dma2d_blitsimple(void) /* Top right to the middle blit */ - info("Set the active layer to fullscreen black\n"); + _info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); area.xpos = inactive->vinfo.xres/2; @@ -899,7 +899,7 @@ static void ltdc_dma2d_blitsimple(void) area.xres = inactive->vinfo.xres/2; area.yres = inactive->vinfo.yres/2; - info("Blit the top right green rectangle from the bottom layer with the" + _info("Blit the top right green rectangle from the bottom layer with the" " top layer\n"); active->layer->blit(active->layer, active->vinfo.xres/4, @@ -909,7 +909,7 @@ static void ltdc_dma2d_blitsimple(void) /* Bottom left to the middle blit */ - info("Set the active layer to fullscreen black\n"); + _info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); area.xpos = 0; @@ -917,7 +917,7 @@ static void ltdc_dma2d_blitsimple(void) area.xres = inactive->vinfo.xres/2; area.yres = inactive->vinfo.yres/2; - info("Blit the bottom left white rectangle from the bottom layer with the" + _info("Blit the bottom left white rectangle from the bottom layer with the" " top layer\n"); active->layer->blit(active->layer, active->vinfo.xres/4, @@ -927,7 +927,7 @@ static void ltdc_dma2d_blitsimple(void) /* Bottom right to the middle blit */ - info("Set the active layer to fullscreen black\n"); + _info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); area.xpos = inactive->vinfo.xres/2; @@ -935,7 +935,7 @@ static void ltdc_dma2d_blitsimple(void) area.xres = inactive->vinfo.xres/2; area.yres = inactive->vinfo.yres/2; - info("Blit the bottom right blue rectangle from the bottom layer with the" + _info("Blit the bottom right blue rectangle from the bottom layer with the" " top layer\n"); active->layer->blit(active->layer, active->vinfo.xres/4, @@ -963,29 +963,29 @@ static void ltdc_dma2d_blitpositioning(void) #ifdef CONFIG_STM32_DMA2D_L8 if (active->vinfo.fmt == FB_FMT_RGB8) { - warn("WARNING: skipped, output to layer with CLUT pixel format not supported\n"); + _warn("WARNING: skipped, output to layer with CLUT pixel format not supported\n"); return; } #endif /* Set layer in the middle of the screen */ - info("active->pinfo.fbmem = %p\n", active->pinfo.fbmem); - info("inactive->pinfo.fbmem = %p\n", inactive->pinfo.fbmem); + _info("active->pinfo.fbmem = %p\n", active->pinfo.fbmem); + _info("inactive->pinfo.fbmem = %p\n", inactive->pinfo.fbmem); - info("Ensure that both ltdc layer opaque\n"); + _info("Ensure that both ltdc layer opaque\n"); active->layer->setalpha(active->layer, 0xff); inactive->layer->setalpha(inactive->layer, 0xff); - info("Disable blend mode for both ltdc layer\n"); + _info("Disable blend mode for both ltdc layer\n"); active->layer->setblendmode(active->layer, LTDC_BLEND_NONE); inactive->layer->setblendmode(inactive->layer, LTDC_BLEND_NONE); /* Fullscreen blit */ - info("Set the active layer to fullscreen black\n"); + _info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); - info("Flip the top layer to the active visible layer\n"); + _info("Flip the top layer to the active visible layer\n"); inactive->layer->update(active->layer, LTDC_UPDATE_ACTIVATE|LTDC_SYNC_VBLANK); @@ -993,7 +993,7 @@ static void ltdc_dma2d_blitpositioning(void) ltdc_simple_draw(&inactive->vinfo, &inactive->pinfo); - info("Perform positioning test\n"); + _info("Perform positioning test\n"); area.xres = inactive->vinfo.xres/2; area.yres = inactive->vinfo.yres/2; @@ -1073,14 +1073,14 @@ static void ltdc_dma2d_blitpositioning(void) usleep(5); } - info("Perform move test\n"); + _info("Perform move test\n"); area.xpos = inactive->vinfo.xres/4; area.ypos = inactive->vinfo.yres/4; area.xres = inactive->vinfo.xres/2; area.yres = inactive->vinfo.yres/2; - info("Set the active layer to fullscreen black\n"); + _info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); /* Move right */ @@ -1138,14 +1138,14 @@ static void ltdc_dma2d_blitpositioning(void) usleep(5); } - info("Perform reference positioning test\n"); + _info("Perform reference positioning test\n"); area.xres = inactive->vinfo.xres/2; area.yres = inactive->vinfo.yres/2; area.xpos = inactive->vinfo.xres/4; area.ypos = inactive->vinfo.yres/4; - info("Set the active layer to fullscreen black\n"); + _info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); /* Move right */ @@ -1227,35 +1227,35 @@ static void ltdc_dma2d_blendsimple(void) #ifdef CONFIG_STM32_DMA2D_L8 if (active->vinfo.fmt == FB_FMT_RGB8) { - warn("WARNING: skipped, output to layer with CLUT pixel format not supported\n"); + _warn("WARNING: skipped, output to layer with CLUT pixel format not supported\n"); return; } #endif - info("Perform simple blend operation\n"); + _info("Perform simple blend operation\n"); - info("active->pinfo.fbmem = %p\n", active->pinfo.fbmem); - info("inactive->pinfo.fbmem = %p\n", inactive->pinfo.fbmem); + _info("active->pinfo.fbmem = %p\n", active->pinfo.fbmem); + _info("inactive->pinfo.fbmem = %p\n", inactive->pinfo.fbmem); - info("Ensure that both ltdc layer are opaque\n"); + _info("Ensure that both ltdc layer are opaque\n"); active->layer->setalpha(active->layer, 0xff); inactive->layer->setalpha(inactive->layer, 0xff); - info("Enable alpha blend mode for both dma2d layer\n"); + _info("Enable alpha blend mode for both dma2d layer\n"); active->dma2d->setblendmode(active->dma2d, DMA2D_BLEND_ALPHA); inactive->dma2d->setblendmode(inactive->dma2d, DMA2D_BLEND_ALPHA); /* Fullscreen blend */ - info("Set the active layer to fullscreen black\n"); + _info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); - info("Flip the top layer to the active visible layer\n"); + _info("Flip the top layer to the active visible layer\n"); active->layer->update(active->layer, LTDC_UPDATE_ACTIVATE|LTDC_UPDATE_SIM|LTDC_SYNC_VBLANK); ltdc_simple_draw(&inactive->vinfo, &inactive->pinfo); - info("Blend the whole bottom layer to the top layer\n"); + _info("Blend the whole bottom layer to the top layer\n"); area.xpos = 0; area.ypos = 0; @@ -1274,7 +1274,7 @@ static void ltdc_dma2d_blendsimple(void) /* Blend top left to the middle */ - info("Set the active layer to fullscreen black\n"); + _info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); area.xpos = 0; @@ -1282,7 +1282,7 @@ static void ltdc_dma2d_blendsimple(void) area.xres = inactive->vinfo.xres/2; area.yres = inactive->vinfo.yres/2; - info("Blend the top left red rectangle from the bottom layer with the middle" + _info("Blend the top left red rectangle from the bottom layer with the middle" " of the top layer\n"); for (alpha = 0; alpha < 255 ; alpha++) @@ -1297,7 +1297,7 @@ static void ltdc_dma2d_blendsimple(void) /* Top right to the middle blit */ - info("Set the active layer to fullscreen black\n"); + _info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); area.xpos = inactive->vinfo.xres/2; @@ -1305,7 +1305,7 @@ static void ltdc_dma2d_blendsimple(void) area.xres = inactive->vinfo.xres/2; area.yres = inactive->vinfo.yres/2; - info("Blend the top right green rectangle from the bottom layer with the" + _info("Blend the top right green rectangle from the bottom layer with the" " middle of the top layer\n"); for (alpha = 0; alpha < 255 ; alpha++) @@ -1320,7 +1320,7 @@ static void ltdc_dma2d_blendsimple(void) /* Bottom left to the middle blit */ - info("Set the active layer to fullscreen black\n"); + _info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); area.xpos = 0; @@ -1328,7 +1328,7 @@ static void ltdc_dma2d_blendsimple(void) area.xres = inactive->vinfo.xres/2; area.yres = inactive->vinfo.yres/2; - info("Blit the bottom left white rectangle from the bottom layer with the" + _info("Blit the bottom left white rectangle from the bottom layer with the" " middle of the top layer\n"); for (alpha = 0; alpha < 255 ; alpha++) @@ -1343,7 +1343,7 @@ static void ltdc_dma2d_blendsimple(void) /* Bottom right to the middle blit */ - info("Set the active layer to fullscreen black\n"); + _info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); area.xpos = inactive->vinfo.xres/2; @@ -1351,7 +1351,7 @@ static void ltdc_dma2d_blendsimple(void) area.xres = inactive->vinfo.xres/2; area.yres = inactive->vinfo.yres/2; - info("Blit the bottom right blue rectangle from the bottom layer with the" + _info("Blit the bottom right blue rectangle from the bottom layer with the" " middle of the top layer\n"); for (alpha = 0; alpha < 255 ; alpha++) @@ -1364,7 +1364,7 @@ static void ltdc_dma2d_blendsimple(void) usleep(5); } - info("Set the active layer to fullscreen black\n"); + _info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); } #endif /* CONFIG_STM32_LTDC_L2 */ @@ -1390,7 +1390,7 @@ static void ltdc_dma2d_blitdynamiclayer(void) #ifdef CONFIG_STM32_DMA2D_L8 if (active->vinfo.fmt == FB_FMT_RGB8) { - warn("WARNING: skipped, output to layer with CLUT pixel format not supported\n"); + _warn("WARNING: skipped, output to layer with CLUT pixel format not supported\n"); return; } #endif @@ -1404,7 +1404,7 @@ static void ltdc_dma2d_blitdynamiclayer(void) _exit(1); } - info("create background dma2d surface: %p\n", back); + _info("create background dma2d surface: %p\n", back); fore = ltdc_create_dma2d_surface(active->vinfo.xres/2, active->vinfo.yres/2, active->vinfo.fmt); @@ -1415,7 +1415,7 @@ static void ltdc_dma2d_blitdynamiclayer(void) _exit(1); } - info("create foreground dma2d surface: %p\n", fore); + _info("create foreground dma2d surface: %p\n", fore); /* Wrong positioning detection */ @@ -1424,7 +1424,7 @@ static void ltdc_dma2d_blitdynamiclayer(void) forearea.xres = fore->vinfo.xres; forearea.yres = fore->vinfo.yres; - info("check if the ltdc driver recognized when positioning overflows the whole" + _info("check if the ltdc driver recognized when positioning overflows the whole" " layer buffer\n"); if (active->layer->blit(active->layer, @@ -1458,14 +1458,14 @@ static void ltdc_dma2d_blitdynamiclayer(void) if (ret == OK) { - info("ok, driver detects wrong positioning\n"); + _info("ok, driver detects wrong positioning\n"); } else { - _err("ERROR: fail, wrong positioning can overflow layer buffer\n"); + _err("ERROR: fail, wrong positioning can overflow layer buffer\n"); } - info("check if the dma2d driver recognized when positioning overflows the" + _info("check if the dma2d driver recognized when positioning overflows the" " whole layer buffer\n"); forearea.xpos = 0; @@ -1502,11 +1502,11 @@ static void ltdc_dma2d_blitdynamiclayer(void) if (ret == OK) { - info("ok, driver detects wrong positioning\n"); + _info("ok, driver detects wrong positioning\n"); } else { - _err("ERROR: fail, wrong positioning can overflow layer buffer\n"); + _err("ERROR: fail, wrong positioning can overflow layer buffer\n"); } /* Initialize the dma2d fullscreen background layer */ @@ -1522,23 +1522,23 @@ static void ltdc_dma2d_blitdynamiclayer(void) /* Blit test */ - info("Perform simple dma2d blit operation\n"); + _info("Perform simple dma2d blit operation\n"); - info("Ensure that the ltdc layer is opaque\n"); + _info("Ensure that the ltdc layer is opaque\n"); active->layer->setalpha(active->layer, 0xff); - info("Disable blend mode for the ltdc layer\n"); + _info("Disable blend mode for the ltdc layer\n"); active->layer->setblendmode(active->layer, LTDC_BLEND_NONE); - info("Set the active layer to fullscreen black\n"); + _info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); - info("Flip the top layer to the active visible layer\n"); + _info("Flip the top layer to the active visible layer\n"); active->layer->update(active->layer, LTDC_UPDATE_ACTIVATE|LTDC_SYNC_VBLANK); /* Top left to the middle blit */ - info("Set the active layer to fullscreen black\n"); + _info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); area.xpos = 0; @@ -1546,11 +1546,11 @@ static void ltdc_dma2d_blitdynamiclayer(void) area.xres = active->vinfo.xres/2; area.yres = active->vinfo.yres/2; - info("Blit the top left red rectangle from the background layer to the" + _info("Blit the top left red rectangle from the background layer to the" " foreground layer\n"); fore->dma2d->blit(fore->dma2d, 0, 0, back->dma2d, &area); - info("Blit the resulting dma2d layer to the middle of the screen\n"); + _info("Blit the resulting dma2d layer to the middle of the screen\n"); active->layer->blit(active->layer, active->vinfo.xres/4, active->vinfo.yres/4, back->dma2d, &forearea); @@ -1558,7 +1558,7 @@ static void ltdc_dma2d_blitdynamiclayer(void) /* Top right to the middle blit */ - info("Set the active layer to fullscreen black\n"); + _info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); area.xpos = active->vinfo.xres/2; @@ -1566,11 +1566,11 @@ static void ltdc_dma2d_blitdynamiclayer(void) area.xres = active->vinfo.xres/2; area.yres = active->vinfo.yres/2; - info("Blit the top right green rectangle from the background layer to the" + _info("Blit the top right green rectangle from the background layer to the" " foreground layer\n"); fore->dma2d->blit(fore->dma2d, 0, 0, back->dma2d, &area); - info("Blit the resulting dma2d layer to the middle of the screen\n"); + _info("Blit the resulting dma2d layer to the middle of the screen\n"); active->layer->blit(active->layer, active->vinfo.xres/4, active->vinfo.yres/4, fore->dma2d, &forearea); @@ -1578,7 +1578,7 @@ static void ltdc_dma2d_blitdynamiclayer(void) /* Bottom left to the middle blit */ - info("Set the active layer to fullscreen black\n"); + _info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); area.xpos = 0; @@ -1586,11 +1586,11 @@ static void ltdc_dma2d_blitdynamiclayer(void) area.xres = active->vinfo.xres/2; area.yres = active->vinfo.yres/2; - info("Blit the bottom left white rectangle from the background layer to the" + _info("Blit the bottom left white rectangle from the background layer to the" " foreground layer\n"); fore->dma2d->blit(fore->dma2d, 0, 0, back->dma2d, &area); - info("Blit the resulting dma2d layer to the middle of the screen\n"); + _info("Blit the resulting dma2d layer to the middle of the screen\n"); active->layer->blit(active->layer, active->vinfo.xres/4, active->vinfo.yres/4, fore->dma2d, &forearea); @@ -1598,7 +1598,7 @@ static void ltdc_dma2d_blitdynamiclayer(void) /* Bottom right to the middle blit */ - info("Set the active layer to fullscreen black\n"); + _info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); area.xpos = active->vinfo.xres/2; @@ -1606,11 +1606,11 @@ static void ltdc_dma2d_blitdynamiclayer(void) area.xres = active->vinfo.xres/2; area.yres = active->vinfo.yres/2; - info("Blit the bottom right blue rectangle from the background layer to the" + _info("Blit the bottom right blue rectangle from the background layer to the" " foreground layer\n"); fore->dma2d->blit(fore->dma2d, 0, 0, back->dma2d, &area); - info("Blit the resulting dma2d layer to the middle of the screen\n"); + _info("Blit the resulting dma2d layer to the middle of the screen\n"); active->layer->blit(active->layer, active->vinfo.xres/4, active->vinfo.yres/4, fore->dma2d, &forearea); @@ -1618,7 +1618,7 @@ static void ltdc_dma2d_blitdynamiclayer(void) /* Middle to the middle blit */ - info("Set the active layer to fullscreen black\n"); + _info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); @@ -1627,11 +1627,11 @@ static void ltdc_dma2d_blitdynamiclayer(void) area.xres = active->vinfo.xres/2; area.yres = active->vinfo.yres/2; - info("Blit the bottom half rectangle from the background layers to the middle" + _info("Blit the bottom half rectangle from the background layers to the middle" " of the foreground layer\n"); fore->dma2d->blit(fore->dma2d, 0, 0, back->dma2d, &area); - info("Blit the resulting dma2d layer to the middle of the screen\n"); + _info("Blit the resulting dma2d layer to the middle of the screen\n"); active->layer->blit(active->layer, active->vinfo.xres/4, active->vinfo.yres/4, fore->dma2d, &forearea); @@ -1662,7 +1662,7 @@ static void ltdc_dma2d_blenddynamiclayer(void) #ifdef CONFIG_STM32_DMA2D_L8 if (active->vinfo.fmt == FB_FMT_RGB8) { - warn("WARNING: skipped, output to layer with CLUT pixel format not supported\n"); + _warn("WARNING: skipped, output to layer with CLUT pixel format not supported\n"); return; } #endif @@ -1676,7 +1676,7 @@ static void ltdc_dma2d_blenddynamiclayer(void) _exit(1); } - info("create background dma2d surface: %p\n", back); + _info("create background dma2d surface: %p\n", back); fore = ltdc_create_dma2d_surface(active->vinfo.xres/2, active->vinfo.yres/2, active->vinfo.fmt); @@ -1687,11 +1687,11 @@ static void ltdc_dma2d_blenddynamiclayer(void) _exit(1); } - info("create foreground dma2d surface: %p\n", fore); + _info("create foreground dma2d surface: %p\n", fore); /* Wrong positioning detection */ - info("check if the ltdc driver recognized when positioning overflows the whole" + _info("check if the ltdc driver recognized when positioning overflows the whole" " layer buffer\n"); area.xpos = 0; @@ -1746,14 +1746,14 @@ static void ltdc_dma2d_blenddynamiclayer(void) if (ret == OK) { - info("ok, driver detects wrong positioning\n"); + _info("ok, driver detects wrong positioning\n"); } else { - _err("ERROR: fail, wrong positioning can overflow layer buffer\n"); + _err("ERROR: fail, wrong positioning can overflow layer buffer\n"); } - info("check if the dma2d driver recognized when positioning overflows the" + _info("check if the dma2d driver recognized when positioning overflows the" " whole layer buffer\n"); area.xpos = 0; @@ -1806,11 +1806,11 @@ static void ltdc_dma2d_blenddynamiclayer(void) if (ret == OK) { - info("ok, driver detects wrong positioning\n"); + _info("ok, driver detects wrong positioning\n"); } else { - _err("ERROR: fail, wrong positioning can overflow layer buffer\n"); + _err("ERROR: fail, wrong positioning can overflow layer buffer\n"); } /* Initialize the dma2d fullscreen background layer */ @@ -1819,26 +1819,26 @@ static void ltdc_dma2d_blenddynamiclayer(void) /* Blit test */ - info("Perform simple dma2d blend operation\n"); + _info("Perform simple dma2d blend operation\n"); - info("Ensure that the ltdc layer is opaque\n"); + _info("Ensure that the ltdc layer is opaque\n"); active->layer->setalpha(active->layer, 0xff); - info("Disable blend mode for the ltdc layer\n"); + _info("Disable blend mode for the ltdc layer\n"); active->layer->setblendmode(active->layer, LTDC_BLEND_NONE); - info("Enable alpha blend mode for both dma2d layer\n"); + _info("Enable alpha blend mode for both dma2d layer\n"); fore->dma2d->setblendmode(fore->dma2d, DMA2D_BLEND_ALPHA); back->dma2d->setblendmode(back->dma2d, DMA2D_BLEND_ALPHA); - info("Set the active layer to fullscreen black\n"); + _info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); - info("Flip the top layer to the active visible layer\n"); + _info("Flip the top layer to the active visible layer\n"); active->layer->update(active->layer, LTDC_UPDATE_ACTIVATE|LTDC_SYNC_VBLANK); /* Top left to the middle */ - info("Set the active layer to fullscreen black\n"); + _info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); area.xpos = 0; @@ -1846,7 +1846,7 @@ static void ltdc_dma2d_blenddynamiclayer(void) area.xres = active->vinfo.xres/2; area.yres = active->vinfo.yres/2; - info("Blend the top left red rectangle from the background layer with the" + _info("Blend the top left red rectangle from the background layer with the" " middle of the foreground layer\n"); for (alpha = 0; alpha < 255 ; alpha++) @@ -1863,7 +1863,7 @@ static void ltdc_dma2d_blenddynamiclayer(void) /* Top right to the middle blit */ - info("Set the active layer to fullscreen black\n"); + _info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); area.xpos = active->vinfo.xres/2; @@ -1871,7 +1871,7 @@ static void ltdc_dma2d_blenddynamiclayer(void) area.xres = active->vinfo.xres/2; area.yres = active->vinfo.yres/2; - info("Blend the top right green rectangle from the background layer with the" + _info("Blend the top right green rectangle from the background layer with the" " middle of the foreground layer\n"); for (alpha = 0; alpha < 255 ; alpha++) @@ -1888,7 +1888,7 @@ static void ltdc_dma2d_blenddynamiclayer(void) /* Bottom left to the middle blit */ - info("Set the active layer to fullscreen black\n"); + _info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); area.xpos = 0; @@ -1896,7 +1896,7 @@ static void ltdc_dma2d_blenddynamiclayer(void) area.xres = active->vinfo.xres/2; area.yres = active->vinfo.yres/2; - info("Blend the bottom left white rectangle from the background layer with the" + _info("Blend the bottom left white rectangle from the background layer with the" " middle of foreground layer\n"); for (alpha = 0; alpha < 255 ; alpha++) @@ -1913,7 +1913,7 @@ static void ltdc_dma2d_blenddynamiclayer(void) /* Bottom right to the middle blit */ - info("Set the active layer to fullscreen black\n"); + _info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); area.xpos = active->vinfo.xres/2; @@ -1921,7 +1921,7 @@ static void ltdc_dma2d_blenddynamiclayer(void) area.xres = active->vinfo.xres/2; area.yres = active->vinfo.yres/2; - info("Blend the bottom right blue rectangle from the background layer with the" + _info("Blend the bottom right blue rectangle from the background layer with the" " middle of the foreground layer\n"); for (alpha = 0; alpha < 255 ; alpha++) @@ -1938,7 +1938,7 @@ static void ltdc_dma2d_blenddynamiclayer(void) /* Middle to the middle blit */ - info("Set the active layer to fullscreen black\n"); + _info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); @@ -1947,7 +1947,7 @@ static void ltdc_dma2d_blenddynamiclayer(void) area.xres = active->vinfo.xres/2; area.yres = active->vinfo.yres/2; - info("Blend the bottom half screen rectangle from the background layers middle" + _info("Blend the bottom half screen rectangle from the background layers middle" " with the middle of the foreground layer\n"); for (alpha = 0; alpha < 255 ; alpha++) @@ -1987,7 +1987,7 @@ static void ltdc_dma2d_blitflippositioning(void) #ifdef CONFIG_STM32_DMA2D_L8 if (active->vinfo.fmt == FB_FMT_RGB8 || inactive->vinfo.fmt == FB_FMT_RGB8) { - warn("WARNING: skipped, output to layer with CLUT pixel format not supported\n"); + _warn("WARNING: skipped, output to layer with CLUT pixel format not supported\n"); return; } #endif @@ -2002,7 +2002,7 @@ static void ltdc_dma2d_blitflippositioning(void) _exit(1); } - info("create foreground dma2d surface: %p\n", fore); + _info("create foreground dma2d surface: %p\n", fore); back = ltdc_create_dma2d_surface(active->vinfo.xres/2, active->vinfo.yres/2, active->vinfo.fmt); @@ -2013,7 +2013,7 @@ static void ltdc_dma2d_blitflippositioning(void) _exit(1); } - info("create background dma2d surface: %p\n", back); + _info("create background dma2d surface: %p\n", back); image = ltdc_create_dma2d_surface(active->vinfo.xres, active->vinfo.yres, active->vinfo.fmt); @@ -2025,26 +2025,26 @@ static void ltdc_dma2d_blitflippositioning(void) _exit(1); } - info("create the dma2d surface to store the image: %p\n", image); + _info("create the dma2d surface to store the image: %p\n", image); - info("Enable alpha blending for both dma2d layer\n"); + _info("Enable alpha blending for both dma2d layer\n"); fore->dma2d->setblendmode(fore->dma2d, DMA2D_BLEND_ALPHA); back->dma2d->setblendmode(back->dma2d, DMA2D_BLEND_ALPHA); - info("Ensure that both ltdc layer opaque\n"); + _info("Ensure that both ltdc layer opaque\n"); active->layer->setalpha(active->layer, 0xff); inactive->layer->setalpha(inactive->layer, 0xff); - info("Disable blend mode for both ltdc layer\n"); + _info("Disable blend mode for both ltdc layer\n"); active->layer->setblendmode(active->layer, LTDC_BLEND_NONE); inactive->layer->setblendmode(inactive->layer, LTDC_BLEND_NONE); /* Fullscreen blit */ - info("Set the active layer to fullscreen black\n"); + _info("Set the active layer to fullscreen black\n"); ltdc_clearlayer(active, LTDC_BLACK); - info("Flip the top layer to the active visible layer\n"); + _info("Flip the top layer to the active visible layer\n"); inactive->layer->update(active->layer, LTDC_UPDATE_ACTIVATE|LTDC_SYNC_VBLANK); @@ -2052,7 +2052,7 @@ static void ltdc_dma2d_blitflippositioning(void) ltdc_simple_draw(&image->vinfo, &image->pinfo); - info("Perform positioning test\n"); + _info("Perform positioning test\n"); area.xpos = inactive->vinfo.xres/4; area.ypos = inactive->vinfo.yres/4; @@ -2131,7 +2131,7 @@ static void ltdc_dma2d_blitflippositioning(void) ltdc_blendoutline(fore, back); - info("Perform move test\n"); + _info("Perform move test\n"); area.xpos = inactive->vinfo.xres/4; area.ypos = inactive->vinfo.yres/4; @@ -2198,7 +2198,7 @@ static void ltdc_dma2d_blitflippositioning(void) } - info("Perform reference positioning test\n"); + _info("Perform reference positioning test\n"); area.xpos = inactive->vinfo.xres/4; area.ypos = inactive->vinfo.yres/4; @@ -2289,7 +2289,7 @@ static void ltdc_screensaver(void) #ifdef CONFIG_STM32_DMA2D_L8 if (active->vinfo.fmt == FB_FMT_RGB8 || inactive->vinfo.fmt == FB_FMT_RGB8) { - info("skipped, output to layer with CLUT pixel format not supported\n"); + _info("skipped, output to layer with CLUT pixel format not supported\n"); return; } #endif @@ -2305,7 +2305,7 @@ static void ltdc_screensaver(void) _exit(1); } - info("create a scratch dma2d layer: %p\n", scratch); + _info("create a scratch dma2d layer: %p\n", scratch); rect1 = ltdc_create_dma2d_surface(active->vinfo.xres/4, active->vinfo.yres/4, @@ -2317,7 +2317,7 @@ static void ltdc_screensaver(void) _exit(1); } - info("create a dma2d layer for the rectangle 1: %p\n", rect1); + _info("create a dma2d layer for the rectangle 1: %p\n", rect1); rect2 = ltdc_create_dma2d_surface(active->vinfo.xres/4, active->vinfo.yres/4, @@ -2330,7 +2330,7 @@ static void ltdc_screensaver(void) _exit(1); } - info("create a dma2d layer for rectangle 2: %p\n", rect2); + _info("create a dma2d layer for rectangle 2: %p\n", rect2); image = ltdc_create_dma2d_surface(active->vinfo.xres, active->vinfo.yres, @@ -2344,19 +2344,19 @@ static void ltdc_screensaver(void) _exit(1); } - info("create a dma2d layer to store the background image: %p\n", image); + _info("create a dma2d layer to store the background image: %p\n", image); - info("Enable alpha blending for the dma2d layer\n"); + _info("Enable alpha blending for the dma2d layer\n"); scratch->dma2d->setblendmode(scratch->dma2d, DMA2D_BLEND_ALPHA); rect1->dma2d->setblendmode(rect1->dma2d, DMA2D_BLEND_ALPHA); rect2->dma2d->setblendmode(rect2->dma2d, DMA2D_BLEND_ALPHA); /* ltdc layer settings */ - info("Ensure that both ltdc layer opaque\n"); + _info("Ensure that both ltdc layer opaque\n"); active->layer->setalpha(active->layer, 0xff); inactive->layer->setalpha(inactive->layer, 0xff); - info("Disable blend mode for both ltdc layer\n"); + _info("Disable blend mode for both ltdc layer\n"); active->layer->setblendmode(active->layer, LTDC_BLEND_NONE); inactive->layer->setblendmode(inactive->layer, LTDC_BLEND_NONE); @@ -2364,7 +2364,7 @@ static void ltdc_screensaver(void) ltdc_simple_draw(&image->vinfo, &image->pinfo); - info("Perform screensaver\n"); + _info("Perform screensaver\n"); area.xpos = image->vinfo.xres/4 + image->vinfo.xres / 8; area.ypos = image->vinfo.yres/4 + image->vinfo.yres / 8; diff --git a/examples/ltdc/ltdc_main.c b/examples/ltdc/ltdc_main.c index f95240523..4c05f6587 100644 --- a/examples/ltdc/ltdc_main.c +++ b/examples/ltdc/ltdc_main.c @@ -96,23 +96,23 @@ static int ltdc_init_surface(int lid, uint32_t mode) if (!sur->layer) { - _err("ERROR: up_ltdcgetlayer() failed\n"); + _err("ERROR: up_ltdcgetlayer() failed\n"); return -1; } if (sur->layer->getvideoinfo(sur->layer, &sur->vinfo) != OK) { - _err("ERROR: getvideoinfo() failed\n"); + _err("ERROR: getvideoinfo() failed\n"); return -1; } if (sur->layer->getplaneinfo(sur->layer, 0, &sur->pinfo) != OK) { - _err("ERROR: getplaneinfo() failed\n"); + _err("ERROR: getplaneinfo() failed\n"); return -1; } - info("layer %d is configured with: xres = %d, yres = %d," + _info("layer %d is configured with: xres = %d, yres = %d," "fb start address = %p, fb size = %d, fmt = %d, bpp = %d\n", lid, sur->vinfo.xres, sur->vinfo.yres, sur->pinfo.fbmem, sur->pinfo.fblen, sur->vinfo.fmt, sur->pinfo.bpp); @@ -133,7 +133,7 @@ static int ltdc_init_surface(int lid, uint32_t mode) if (sur->layer->getlid(sur->layer, &lid, LTDC_LAYER_DMA2D) != OK) { - _err("ERROR: getlid() failed\n"); + _err("ERROR: getlid() failed\n"); return -1; } @@ -141,7 +141,7 @@ static int ltdc_init_surface(int lid, uint32_t mode) if (sur->dma2d == NULL) { - _err("ERROR: up_dma2dgetlayer() failed\n"); + _err("ERROR: up_dma2dgetlayer() failed\n"); return -1; } #endif @@ -168,7 +168,7 @@ static void ltdc_setget_test(void) FAR struct ltdc_area_s area; FAR struct surface *sur = ltdc_get_surface(LTDC_LAYER_ACTIVE); - info("Perform set and get test\n"); + _info("Perform set and get test\n"); /* setalpha */ @@ -176,14 +176,14 @@ static void ltdc_setget_test(void) if (ret != OK) { - _err("ERROR: setalpha() failed\n"); + _err("ERROR: setalpha() failed\n"); } ret = sur->layer->getalpha(sur->layer, &alpha); if (ret != OK || alpha != 0x7f) { - _err("ERROR: getalpha() failed\n"); + _err("ERROR: getalpha() failed\n"); } /* setcolor */ @@ -192,14 +192,14 @@ static void ltdc_setget_test(void) if (ret != OK) { - _err("ERROR: setcolor() failed\n"); + _err("ERROR: setcolor() failed\n"); } ret = sur->layer->getcolor(sur->layer, &color); if (ret != OK || color != 0x11223344) { - _err("ERROR: getcolor() failed\n"); + _err("ERROR: getcolor() failed\n"); } /* setcolorkey */ @@ -208,14 +208,14 @@ static void ltdc_setget_test(void) if (ret != OK) { - _err("ERROR: setcolorkey() failed\n"); + _err("ERROR: setcolorkey() failed\n"); } ret = sur->layer->getcolorkey(sur->layer, &color); if (ret != OK || color != 0x55667788) { - _err("ERROR: getcolorkey() failed\n"); + _err("ERROR: getcolorkey() failed\n"); } /* setblendmode */ @@ -224,14 +224,14 @@ static void ltdc_setget_test(void) if (ret != OK) { - _err("ERROR: setblendmode() failed\n"); + _err("ERROR: setblendmode() failed\n"); } ret = sur->layer->getblendmode(sur->layer, &mode); if (ret != OK || mode != LTDC_BLEND_NONE) { - _err("ERROR: getblendmode() failed\n"); + _err("ERROR: getblendmode() failed\n"); } /* setarea */ @@ -246,7 +246,7 @@ static void ltdc_setget_test(void) if (ret != OK) { - _err("ERROR: setarea() failed\n"); + _err("ERROR: setarea() failed\n"); } ret = sur->layer->getarea(sur->layer, &area, &xpos, &ypos); @@ -255,7 +255,7 @@ static void ltdc_setget_test(void) area.xpos != sur->vinfo.xres/4 || area.ypos != sur->vinfo.yres/4 || area.xres != sur->vinfo.xres/2 || area.yres != sur->vinfo.yres/2) { - _err("ERROR: getarea() failed\n"); + _err("ERROR: getarea() failed\n"); } #ifdef CONFIG_FB_CMAP @@ -275,7 +275,7 @@ static void ltdc_setget_test(void) if (ret != OK) { - _err("ERROR: setclut() failed\n"); + _err("ERROR: setclut() failed\n"); } /* Clear all colors to black */ @@ -291,7 +291,7 @@ static void ltdc_setget_test(void) if (ret != OK) { - _err("ERROR: getclut() failed\n"); + _err("ERROR: getclut() failed\n"); } #ifdef CONFIG_FB_TRANSPARENCY @@ -305,7 +305,7 @@ static void ltdc_setget_test(void) ltdc_cmpcolor(g_cmap.green, cmap->green, LTDC_EXAMPLE_NCOLORS)) #endif { - _err("ERROR: getclut() failed, unexpected cmap content\n"); + _err("ERROR: getclut() failed, unexpected cmap content\n"); } ltdc_deletecmap(cmap); @@ -318,7 +318,7 @@ static void ltdc_setget_test(void) if (ret != OK) { - _err("ERROR: setclut() failed\n"); + _err("ERROR: setclut() failed\n"); } } #endif @@ -363,22 +363,22 @@ static void ltdc_color_test(void) /* Default Color black */ - info("Set default color to black\n"); + _info("Set default color to black\n"); sur->layer->setcolor(sur->layer, 0xff000000); - info("Update the layer\n"); + _info("Update the layer\n"); sur->layer->update(sur->layer, LTDC_SYNC_VBLANK|LTDC_SYNC_WAIT); /* Set active layer to the upper half of the screen */ - info("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n", + _info("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n", area.xpos, area.ypos, area.xres, area.yres); sur->layer->setarea(sur->layer, &area, area.xpos, area.ypos); - info("Update the layer, should be black outside the colorful rectangle\n"); + _info("Update the layer, should be black outside the colorful rectangle\n"); sur->layer->update(sur->layer, LTDC_SYNC_VBLANK|LTDC_SYNC_WAIT); @@ -386,11 +386,11 @@ static void ltdc_color_test(void) /* Default Color red */ - info("Update the layer, should be red outside the colorful rectangle\n"); + _info("Update the layer, should be red outside the colorful rectangle\n"); sur->layer->setcolor(sur->layer, 0xffff0000); - info("Update the layer\n"); + _info("Update the layer\n"); sur->layer->update(sur->layer, LTDC_SYNC_VBLANK|LTDC_SYNC_WAIT); @@ -398,11 +398,11 @@ static void ltdc_color_test(void) /* Default Color green */ - info("Update the layer, should be green outside the colorful rectangle\n"); + _info("Update the layer, should be green outside the colorful rectangle\n"); sur->layer->setcolor(sur->layer, 0xff00ff00); - info("Update the layer\n"); + _info("Update the layer\n"); sur->layer->update(sur->layer, LTDC_SYNC_VBLANK|LTDC_SYNC_WAIT); @@ -410,11 +410,11 @@ static void ltdc_color_test(void) /* Default Color blue */ - info("Update the layer, should be blue outside the colorful rectangle\n"); + _info("Update the layer, should be blue outside the colorful rectangle\n"); sur->layer->setcolor(sur->layer, 0xff0000ff); - info("Update the layer\n"); + _info("Update the layer\n"); sur->layer->update(sur->layer, LTDC_SYNC_VBLANK|LTDC_SYNC_WAIT); @@ -427,18 +427,18 @@ static void ltdc_color_test(void) area.xres = sur->vinfo.xres; area.yres = sur->vinfo.yres; - info("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n", + _info("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n", area.xpos, area.ypos, area.xres, area.yres); sur->layer->setarea(sur->layer, &area, area.xpos, area.ypos); /* Default Color black */ - info("Set default color to black\n"); + _info("Set default color to black\n"); sur->layer->setcolor(sur->layer, 0); - info("Update the layer\n"); + _info("Update the layer\n"); sur->layer->update(sur->layer, LTDC_SYNC_VBLANK|LTDC_SYNC_WAIT); @@ -468,7 +468,7 @@ static void ltdc_colorkey_test(void) /* Resize active layer */ - info("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n", + _info("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n", area.xpos, area.ypos, area.xres, area.yres); sur->layer->setarea(sur->layer, &area, area.xpos, area.ypos); @@ -479,11 +479,11 @@ static void ltdc_colorkey_test(void) /* Color key white */ - info("Set colorkey to white\n"); + _info("Set colorkey to white\n"); sur->layer->setcolorkey(sur->layer, 0xffffff); - info("Update the layer\n"); + _info("Update the layer\n"); sur->layer->update(sur->layer, LTDC_SYNC_VBLANK|LTDC_SYNC_WAIT); @@ -491,11 +491,11 @@ static void ltdc_colorkey_test(void) /* Color key red */ - info("Set colorkey to red\n"); + _info("Set colorkey to red\n"); sur->layer->setcolorkey(sur->layer, 0xff0000); - info("Update the layer\n"); + _info("Update the layer\n"); sur->layer->update(sur->layer, LTDC_SYNC_VBLANK|LTDC_SYNC_WAIT); @@ -503,11 +503,11 @@ static void ltdc_colorkey_test(void) /* Color key green */ - info("Set colorkey to green\n"); + _info("Set colorkey to green\n"); sur->layer->setcolorkey(sur->layer, 0xff00); - info("Update the layer\n"); + _info("Update the layer\n"); sur->layer->update(sur->layer, LTDC_SYNC_VBLANK|LTDC_SYNC_WAIT); @@ -515,15 +515,15 @@ static void ltdc_colorkey_test(void) /* Color key red */ - info("Set colorkey to blue\n"); + _info("Set colorkey to blue\n"); sur->layer->setcolorkey(sur->layer, 0xff); - info("Update the layer\n"); + _info("Update the layer\n"); sur->layer->update(sur->layer, LTDC_SYNC_VBLANK|LTDC_SYNC_WAIT); - info("Disable colorkey\n"); + _info("Disable colorkey\n"); usleep(1000000); @@ -536,7 +536,7 @@ static void ltdc_colorkey_test(void) area.xres = sur->vinfo.xres; area.yres = sur->vinfo.yres; - info("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n", + _info("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n", area.xpos, area.ypos, area.xres, area.yres); sur->layer->setarea(sur->layer, &area, 0, 0); @@ -545,7 +545,7 @@ static void ltdc_colorkey_test(void) sur->layer->setblendmode(sur->layer, LTDC_BLEND_NONE); - info("Update the layer\n"); + _info("Update the layer\n"); sur->layer->update(sur->layer, LTDC_SYNC_VBLANK|LTDC_SYNC_WAIT); @@ -568,7 +568,7 @@ static void ltdc_area_test(void) struct ltdc_area_s area; FAR struct surface *sur = ltdc_get_surface(LTDC_LAYER_ACTIVE); - info("Perform area test\n"); + _info("Perform area test\n"); ltdc_simple_draw(&sur->vinfo, &sur->pinfo); @@ -581,12 +581,12 @@ static void ltdc_area_test(void) area.xres = sur->vinfo.xres/2; area.yres = sur->vinfo.yres/2; - info("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n", + _info("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n", area.xpos, area.ypos, area.xres, area.yres); sur->layer->setarea(sur->layer, &area, area.xpos, area.ypos); - info("Update the layer, to show the upper left rectangle of the screen\n"); + _info("Update the layer, to show the upper left rectangle of the screen\n"); sur->layer->update(sur->layer, LTDC_SYNC_VBLANK); @@ -599,12 +599,12 @@ static void ltdc_area_test(void) area.xres = sur->vinfo.xres/2; area.yres = sur->vinfo.yres/2; - info("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n", + _info("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n", area.xpos, area.ypos, area.xres, area.yres); sur->layer->setarea(sur->layer, &area, area.xpos, area.ypos); - info("Update the layer, to show the upper right rectangle of the screen\n"); + _info("Update the layer, to show the upper right rectangle of the screen\n"); sur->layer->update(sur->layer, LTDC_SYNC_VBLANK); @@ -617,12 +617,12 @@ static void ltdc_area_test(void) area.xres = sur->vinfo.xres/2; area.yres = sur->vinfo.yres/2; - info("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n", + _info("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n", area.xpos, area.ypos, area.xres, area.yres); sur->layer->setarea(sur->layer, &area, area.xpos, area.ypos); - info("Update the layer, to show the lower left rectangle of the screen\n"); + _info("Update the layer, to show the lower left rectangle of the screen\n"); sur->layer->update(sur->layer, LTDC_SYNC_VBLANK); @@ -635,12 +635,12 @@ static void ltdc_area_test(void) area.xres = sur->vinfo.xres/2; area.yres = sur->vinfo.yres/2; - info("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n", + _info("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n", area.xpos, area.ypos, area.xres, area.yres); sur->layer->setarea(sur->layer, &area, area.xpos, area.ypos); - info("Update the layer, to show the lower right rectangle of the screen\n"); + _info("Update the layer, to show the lower right rectangle of the screen\n"); sur->layer->update(sur->layer, LTDC_SYNC_VBLANK); @@ -648,7 +648,7 @@ static void ltdc_area_test(void) /* Perform layer positioning */ - info("Perform positioning test\n"); + _info("Perform positioning test\n"); /* Set layer in the middle of the screen */ @@ -712,7 +712,7 @@ static void ltdc_area_test(void) /* Perform move */ - info("Perform move test\n"); + _info("Perform move test\n"); /* Set layer in the middle of the screen */ @@ -786,7 +786,7 @@ static void ltdc_area_test(void) /* Perform Reference position */ - info("Perform reference positioning test\n"); + _info("Perform reference positioning test\n"); /* Set layer in the middle of the screen */ @@ -862,12 +862,12 @@ static void ltdc_area_test(void) area.xres = sur->vinfo.xres; area.yres = sur->vinfo.yres; - info("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n", + _info("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n", area.xpos, area.ypos, area.xres, area.yres); sur->layer->setarea(sur->layer, &area, area.xpos, area.ypos); - info("Update the layer to fullscreen\n"); + _info("Update the layer to fullscreen\n"); sur->layer->update(sur->layer, LTDC_SYNC_VBLANK); @@ -893,7 +893,7 @@ static void ltdc_common_test(void) struct ltdc_area_s area; FAR struct surface *sur; - info("Set layer 2 to the active layer, blend with subjacent layer 1\n"); + _info("Set layer 2 to the active layer, blend with subjacent layer 1\n"); sur = ltdc_get_surface(LTDC_LAYER_TOP); @@ -905,7 +905,7 @@ static void ltdc_common_test(void) /* Perform area test */ - info("Perform area test\n"); + _info("Perform area test\n"); /* Set layer in the middle of the screen */ @@ -1026,7 +1026,7 @@ static void ltdc_common_test(void) /* Perform positioning test */ - info("Perform positioning test\n"); + _info("Perform positioning test\n"); /* Set layer in the middle of the screen */ @@ -1145,7 +1145,7 @@ static void ltdc_common_test(void) /* Perform Reference position */ - info("Perform reference positioning test\n"); + _info("Perform reference positioning test\n"); /* Set layer in the middle of the screen */ @@ -1271,7 +1271,7 @@ static void ltdc_common_test(void) area.xres = sur->vinfo.xres; area.yres = sur->vinfo.yres; - info("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n", + _info("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n", area.xpos, area.ypos, area.xres, area.yres); sur->layer->setarea(sur->layer, &area, area.xpos, area.ypos); @@ -1281,7 +1281,7 @@ static void ltdc_common_test(void) sur->layer->setcolorkey(sur->layer, 0); sur->layer->setblendmode(sur->layer, LTDC_BLEND_NONE); - info("Update the layer to fullscreen\n"); + _info("Update the layer to fullscreen\n"); sur->layer->update(sur->layer, LTDC_SYNC_VBLANK); @@ -1306,16 +1306,16 @@ static void ltdc_alpha_blend_test(void) /* Ensure operation on layer 2 */ - info("Set layer 2 to the active layer, blend with subjacent layer 1\n"); + _info("Set layer 2 to the active layer, blend with subjacent layer 1\n"); top = ltdc_get_surface(LTDC_LAYER_TOP); bottom = ltdc_get_surface(LTDC_LAYER_BOTTOM); - info("top = %p, bottom = %p\n", top->pinfo.fbmem, bottom->pinfo.fbmem); + _info("top = %p, bottom = %p\n", top->pinfo.fbmem, bottom->pinfo.fbmem); ltdc_simple_draw(&top->vinfo, &top->pinfo); - info("Fill layer1 with color black\n"); + _info("Fill layer1 with color black\n"); ltdc_drawcolor(&bottom->vinfo, bottom->pinfo.fbmem, bottom->vinfo.xres, bottom->vinfo.yres, @@ -1326,26 +1326,26 @@ static void ltdc_alpha_blend_test(void) area.xres = top->vinfo.xres/2; area.yres = top->vinfo.yres/2; - info("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n", + _info("Set area to xpos = %d, ypos = %d, xres = %d, yres = %d\n", area.xpos, area.ypos, area.xres, area.yres); top->layer->setarea(top->layer, &area, area.xpos, area.ypos); - info("Set alpha blending with bottom layer1\n"); + _info("Set alpha blending with bottom layer1\n"); top->layer->setblendmode(top->layer, LTDC_BLEND_ALPHA); - info("Disable blending for bottom layer1 to make the layer color visible\n"); + _info("Disable blending for bottom layer1 to make the layer color visible\n"); bottom->layer->setblendmode(bottom->layer, LTDC_BLEND_NONE); bottom->layer->setalpha(bottom->layer, 0xff); - info("Fill bottom layer1 with color black\n"); + _info("Fill bottom layer1 with color black\n"); ltdc_drawcolor(&bottom->vinfo, bottom->pinfo.fbmem, bottom->vinfo.xres, bottom->vinfo.yres, ltdc_color(&bottom->vinfo, LTDC_BLACK)); - info("Blend in black subjacent layer\n"); + _info("Blend in black subjacent layer\n"); for (i = 255; i >= 0; i--) { @@ -1353,13 +1353,13 @@ static void ltdc_alpha_blend_test(void) top->layer->update(top->layer, LTDC_UPDATE_SIM|LTDC_SYNC_VBLANK); } - info("Fill bottom layer1 with color red\n"); + _info("Fill bottom layer1 with color red\n"); ltdc_drawcolor(&bottom->vinfo, bottom->pinfo.fbmem, bottom->vinfo.xres, bottom->vinfo.yres, ltdc_color(&bottom->vinfo, LTDC_RED)); - info("Blend in red subjacent layer\n"); + _info("Blend in red subjacent layer\n"); for (i = 255; i >= 0; i--) { @@ -1367,13 +1367,13 @@ static void ltdc_alpha_blend_test(void) top->layer->update(top->layer, LTDC_UPDATE_SIM|LTDC_SYNC_VBLANK); } - info("Fill bottom layer1 with color green\n"); + _info("Fill bottom layer1 with color green\n"); ltdc_drawcolor(&bottom->vinfo, bottom->pinfo.fbmem, bottom->vinfo.xres, bottom->vinfo.yres, ltdc_color(&bottom->vinfo, LTDC_GREEN)); - info("Blend in green subjacent layer\n"); + _info("Blend in green subjacent layer\n"); for (i = 255; i >= 0; i--) { @@ -1381,13 +1381,13 @@ static void ltdc_alpha_blend_test(void) top->layer->update(top->layer, LTDC_UPDATE_SIM|LTDC_SYNC_VBLANK); } - info("Fill bottom layer1 with color blue\n"); + _info("Fill bottom layer1 with color blue\n"); ltdc_drawcolor(&bottom->vinfo, bottom->pinfo.fbmem, bottom->vinfo.xres, bottom->vinfo.yres, ltdc_color(&bottom->vinfo, LTDC_BLUE)); - info("Blend in blue subjacent layer\n"); + _info("Blend in blue subjacent layer\n"); for (i = 255; i >= 0; i--) { @@ -1395,13 +1395,13 @@ static void ltdc_alpha_blend_test(void) top->layer->update(top->layer, LTDC_UPDATE_SIM|LTDC_SYNC_VBLANK); } - info("Fill bottom layer1 with color white\n"); + _info("Fill bottom layer1 with color white\n"); ltdc_drawcolor(&bottom->vinfo, bottom->pinfo.fbmem, bottom->vinfo.xres, bottom->vinfo.yres, ltdc_color(&bottom->vinfo, LTDC_WHITE)); - info("Blend in white subjacent layer\n"); + _info("Blend in white subjacent layer\n"); for (i = 255; i >= 0; i--) { @@ -1437,32 +1437,32 @@ static void ltdc_flip_test(void) /* Flip with non blend */ - info("Perform flip test without blending\n"); + _info("Perform flip test without blending\n"); - info("active->pinfo.fbmem = %p\n", active->pinfo.fbmem); - info("inactive->pinfo.fbmem = %p\n", inactive->pinfo.fbmem); + _info("active->pinfo.fbmem = %p\n", active->pinfo.fbmem); + _info("inactive->pinfo.fbmem = %p\n", inactive->pinfo.fbmem); - info("Ensure that both layer opaque\n"); + _info("Ensure that both layer opaque\n"); active->layer->setalpha(active->layer, 0xff); inactive->layer->setalpha(inactive->layer, 0xff); active->layer->setblendmode(active->layer, LTDC_BLEND_NONE); inactive->layer->setblendmode(inactive->layer, LTDC_BLEND_NONE); - info("Set the active layer to fullscreen black\n"); + _info("Set the active layer to fullscreen black\n"); ltdc_drawcolor(&active->vinfo, active->pinfo.fbmem, active->vinfo.xres, active->vinfo.yres, ltdc_color(&active->vinfo, LTDC_BLACK)); usleep(1000000); - info("Set invisible layer to fullscreen blue\n"); + _info("Set invisible layer to fullscreen blue\n"); ltdc_drawcolor(&inactive->vinfo, inactive->pinfo.fbmem, inactive->vinfo.xres, inactive->vinfo.yres, ltdc_color(&inactive->vinfo, LTDC_BLUE)); usleep(1000000); - info("Flip layer to see the blue fullscreen\n"); + _info("Flip layer to see the blue fullscreen\n"); inactive->layer->update(inactive->layer, LTDC_UPDATE_FLIP|LTDC_SYNC_VBLANK); @@ -1470,41 +1470,41 @@ static void ltdc_flip_test(void) /* Active layer is now inactive */ - info("Set invisible layer to fullscreen green\n"); + _info("Set invisible layer to fullscreen green\n"); ltdc_drawcolor(&active->vinfo, active->pinfo.fbmem, active->vinfo.xres, active->vinfo.yres, ltdc_color(&active->vinfo, LTDC_GREEN)); usleep(1000000); - info("Flip layer to see the green fullscreen\n"); + _info("Flip layer to see the green fullscreen\n"); inactive->layer->update(inactive->layer, LTDC_UPDATE_FLIP|LTDC_SYNC_VBLANK); usleep(1000000); - info("Set invisible layer to fullscreen red\n"); + _info("Set invisible layer to fullscreen red\n"); ltdc_drawcolor(&inactive->vinfo, inactive->pinfo.fbmem, inactive->vinfo.xres, inactive->vinfo.yres, ltdc_color(&inactive->vinfo, LTDC_RED)); usleep(1000000); - info("Flip layer to see the red fullscreen\n"); + _info("Flip layer to see the red fullscreen\n"); inactive->layer->update(inactive->layer, LTDC_UPDATE_FLIP|LTDC_SYNC_VBLANK); usleep(1000000); /* Flip with alpha blend */ - info("Perform flip test with alpha blending\n"); + _info("Perform flip test with alpha blending\n"); /* Set the bottom layer to the current active layer */ active = ltdc_get_surface(LTDC_LAYER_BOTTOM); inactive = ltdc_get_surface(LTDC_LAYER_TOP); - info("Ensure that both layer fullscreen black\n"); + _info("Ensure that both layer fullscreen black\n"); ltdc_drawcolor(&active->vinfo, active->pinfo.fbmem, active->vinfo.xres, active->vinfo.yres, ltdc_color(&active->vinfo, LTDC_BLACK)); @@ -1512,15 +1512,15 @@ static void ltdc_flip_test(void) inactive->vinfo.xres, inactive->vinfo.yres, ltdc_color(&inactive->vinfo, LTDC_BLACK)); - info("Ensure that both layer semitransparent\n"); + _info("Ensure that both layer semitransparent\n"); active->layer->setalpha(active->layer, 0x7f); inactive->layer->setalpha(inactive->layer, 0x7f); active->layer->setblendmode(active->layer, LTDC_BLEND_ALPHA); inactive->layer->setblendmode(inactive->layer, LTDC_BLEND_ALPHA); - info("Enter in the flip mode sequence\n"); - info("Set the bottom layer to the active layer\n"); - info("Also update both layer simultaneous\n"); + _info("Enter in the flip mode sequence\n"); + _info("Set the bottom layer to the active layer\n"); + _info("Also update both layer simultaneous\n"); active->layer->update(active->layer,LTDC_UPDATE_ACTIVATE| LTDC_UPDATE_SIM| LTDC_UPDATE_FLIP| @@ -1528,28 +1528,28 @@ static void ltdc_flip_test(void) usleep(1000000); - info("Set invisible layer to fullscreen blue\n"); + _info("Set invisible layer to fullscreen blue\n"); ltdc_drawcolor(&inactive->vinfo, inactive->pinfo.fbmem, inactive->vinfo.xres, inactive->vinfo.yres, ltdc_color(&inactive->vinfo, LTDC_BLUE)); usleep(1000000); - info("Flip layer to see the blue fullscreen\n"); + _info("Flip layer to see the blue fullscreen\n"); inactive->layer->update(active->layer, LTDC_UPDATE_FLIP|LTDC_SYNC_VBLANK); usleep(1000000); /* Active layer is top now */ - info("Set invisible layer to fullscreen green\n"); + _info("Set invisible layer to fullscreen green\n"); ltdc_drawcolor(&active->vinfo, active->pinfo.fbmem, active->vinfo.xres, active->vinfo.yres, ltdc_color(&active->vinfo, LTDC_GREEN)); usleep(1000000); - info("Flip layer to see the green fullscreen\n"); + _info("Flip layer to see the green fullscreen\n"); inactive->layer->update(active->layer, LTDC_UPDATE_FLIP|LTDC_SYNC_VBLANK); @@ -1557,32 +1557,32 @@ static void ltdc_flip_test(void) /* Active layer is bottom now */ - info("Set invisible layer to fullscreen red\n"); + _info("Set invisible layer to fullscreen red\n"); ltdc_drawcolor(&inactive->vinfo, inactive->pinfo.fbmem, inactive->vinfo.xres, inactive->vinfo.yres, ltdc_color(&inactive->vinfo, LTDC_RED)); usleep(1000000); - info("Flip layer to see the red fullscreen\n"); + _info("Flip layer to see the red fullscreen\n"); inactive->layer->update(active->layer, LTDC_UPDATE_FLIP|LTDC_SYNC_VBLANK); usleep(1000000); /* Active layer is top now */ - info("Set bottom layer back to fullscreen black\n"); + _info("Set bottom layer back to fullscreen black\n"); ltdc_drawcolor(&active->vinfo, active->pinfo.fbmem, active->vinfo.xres, active->vinfo.yres, ltdc_color(&active->vinfo, LTDC_BLACK)); - info("Set bottom layer to alpha %d and disable blend mode\n", 0xff); + _info("Set bottom layer to alpha %d and disable blend mode\n", 0xff); inactive->layer->setalpha(active->layer, 0xff); inactive->layer->setblendmode(active->layer, LTDC_BLEND_NONE); usleep(1000000); - info("Flip layer to see the black fullscreen\n"); + _info("Flip layer to see the black fullscreen\n"); inactive->layer->update(active->layer, LTDC_UPDATE_FLIP|LTDC_SYNC_VBLANK); @@ -1596,16 +1596,16 @@ static void ltdc_flip_test(void) /* Restore settings */ - info("Finally set the top layer back to fullscreen black\n"); + _info("Finally set the top layer back to fullscreen black\n"); ltdc_drawcolor(&inactive->vinfo, inactive->pinfo.fbmem, inactive->vinfo.xres, inactive->vinfo.yres, ltdc_color(&inactive->vinfo, LTDC_BLACK)); - info("Set top layer to alpha %d and disable blend mode\n", 0xff); + _info("Set top layer to alpha %d and disable blend mode\n", 0xff); inactive->layer->setalpha(inactive->layer, 0xff); inactive->layer->setblendmode(inactive->layer, LTDC_BLEND_NONE); - info("Flip to the top layer\n"); + _info("Flip to the top layer\n"); inactive->layer->update(inactive->layer, LTDC_UPDATE_ACTIVATE|LTDC_SYNC_VBLANK); @@ -1728,7 +1728,7 @@ FAR struct fb_cmap_s * ltdc_createcmap(uint16_t ncolors) if (!clut) { - _err("ERROR: malloc() failed\n"); + _err("ERROR: malloc() failed\n"); free(cmap); return NULL;; } @@ -1805,7 +1805,7 @@ uint32_t ltdc_color(FAR struct fb_videoinfo_s *vinfo, uint8_t color) break; #endif default: - _err("ERROR: Unsupported pixel format %d\n", vinfo->fmt); + _err("ERROR: Unsupported pixel format %d\n", vinfo->fmt); value = 0; break; } @@ -1828,8 +1828,8 @@ void ltdc_simple_draw(FAR struct fb_videoinfo_s *vinfo, uint16_t xres = vinfo->xres; uint16_t yres = vinfo->yres; - info("draw a red and green rectangle in the upper half\n"); - info("draw a white and blue rectangle in the lower half\n"); + _info("draw a red and green rectangle in the upper half\n"); + _info("draw a white and blue rectangle in the lower half\n"); #if defined(CONFIG_STM32_LTDC_L1_L8) || defined(CONFIG_STM32_LTDC_L2_L8) if (vinfo->fmt == FB_FMT_RGB8) @@ -1982,7 +1982,7 @@ void ltdc_drawcolor(FAR struct fb_videoinfo_s *vinfo, void *buffer, /* draw a blue rectangle */ - info("draw a full screen rectangle with color %08x\n", color); + _info("draw a full screen rectangle with color %08x\n", color); #if defined(CONFIG_STM32_LTDC_L1_L8) || defined(CONFIG_STM32_LTDC_L2_L8) if (vinfo->fmt == FB_FMT_RGB8) @@ -2059,13 +2059,13 @@ struct surface * ltdc_get_surface(uint32_t mode) if (ret != OK) { - _err("ERROR: getlid() failed\n"); + _err("ERROR: getlid() failed\n"); _exit(1); } if (lid < 0 || lid > 1) { - _err("ERROR: invalid layer id %d\n", lid); + _err("ERROR: invalid layer id %d\n", lid); _exit(1); } @@ -2086,7 +2086,7 @@ int ltdc_main(int argc, char *argv[]) if (up_fbinitialize(0) < 0) { - _err("ERROR: up_fbinitialize() failed\n"); + _err("ERROR: up_fbinitialize() failed\n"); return -1; } @@ -2094,23 +2094,23 @@ int ltdc_main(int argc, char *argv[]) if (!fbtable) { - _err("ERROR: up_fbgetvplane() failed\n"); + _err("ERROR: up_fbgetvplane() failed\n"); return -1; } if (fbtable->getvideoinfo(fbtable, &vinfo)<0) { - _err("ERROR: getvideoinfo failed\n"); + _err("ERROR: getvideoinfo failed\n"); return -1; } if (fbtable->getplaneinfo(fbtable, 0, &pinfo)<0) { - _err("ERROR: getplaneinfo failed\n"); + _err("ERROR: getplaneinfo failed\n"); return -1; } - info("fb is configured with: xres = %d, yres = %d, \ + _info("fb is configured with: xres = %d, yres = %d, \ fb start address = %p, fb size = %d, fmt = %d, bpp = %d\n", vinfo.xres, vinfo.yres, pinfo.fbmem, pinfo.fblen, vinfo.fmt, pinfo.bpp); @@ -2122,7 +2122,7 @@ int ltdc_main(int argc, char *argv[]) { if (fbtable->putcmap(fbtable, &g_cmap) != OK) { - _err("ERROR: putcmap() failed\n"); + _err("ERROR: putcmap() failed\n"); return -1; } } diff --git a/examples/nxflat/nxflat_main.c b/examples/nxflat/nxflat_main.c index b742959d5..b742fbd2a 100644 --- a/examples/nxflat/nxflat_main.c +++ b/examples/nxflat/nxflat_main.c @@ -102,16 +102,16 @@ #ifdef CONFIG_CPP_HAVE_VARARGS # ifdef CONFIG_DEBUG_FEATURES -# define message(format, ...) info(format, ##__VA_ARGS__) -# define errmsg(format, ...) _err(format, ##__VA_ARGS__) +# define message(format, ...) _info(format, ##__VA_ARGS__) +# define errmsg(format, ...) _err(format, ##__VA_ARGS__) # else # define message(format, ...) printf(format, ##__VA_ARGS__) # define errmsg(format, ...) fprintf(stderr, format, ##__VA_ARGS__) # endif #else # ifdef CONFIG_DEBUG_FEATURES -# define message info -# define errmsg _err +# define message _info +# define errmsg _err # else # define message printf # define errmsg printf diff --git a/examples/nxflat/tests/pthread/Makefile b/examples/nxflat/tests/pthread/Makefile index e16a8f623..663a46929 100644 --- a/examples/nxflat/tests/pthread/Makefile +++ b/examples/nxflat/tests/pthread/Makefile @@ -34,7 +34,7 @@ ############################################################################ -include $(TOPDIR)/.config # Current configuration --include $(TOPDIR)/Make.defs # Basic make info +-include $(TOPDIR)/Make.defs # Basic make _info BIN = pthread diff --git a/examples/pca9635/pca9635_main.c b/examples/pca9635/pca9635_main.c index c8bdf939b..42ab4d914 100644 --- a/examples/pca9635/pca9635_main.c +++ b/examples/pca9635/pca9635_main.c @@ -98,7 +98,7 @@ int pca9635_main(int argc, char *argv[]) ret = ioctl(fd, PWMIOC_SETLED_BRIGHTNESS, (unsigned long)&ledbright); if (ret < 0) { - _err("ERROR: ioctl(PWMIOC_SETLED_BRIGHTNESS) failed: %d\n", errno); + _err("ERROR: ioctl(PWMIOC_SETLED_BRIGHTNESS) failed: %d\n", errno); } } diff --git a/examples/posix_spawn/spawn_main.c b/examples/posix_spawn/spawn_main.c index 9212060f7..1fb341166 100644 --- a/examples/posix_spawn/spawn_main.c +++ b/examples/posix_spawn/spawn_main.c @@ -109,16 +109,16 @@ #ifdef CONFIG_CPP_HAVE_VARARGS # ifdef CONFIG_DEBUG_FEATURES -# define message(format, ...) info(format, ##__VA_ARGS__) -# define errmsg(format, ...) _err(format, ##__VA_ARGS__) +# define message(format, ...) _info(format, ##__VA_ARGS__) +# define errmsg(format, ...) _err(format, ##__VA_ARGS__) # else # define message(format, ...) printf(format, ##__VA_ARGS__) # define errmsg(format, ...) fprintf(stderr, format, ##__VA_ARGS__) # endif #else # ifdef CONFIG_DEBUG_FEATURES -# define message info -# define errmsg _err +# define message _info +# define errmsg _err # else # define message printf # define errmsg printf diff --git a/netutils/chat/chat.c b/netutils/chat/chat.c index c10873d78..c837ccaf5 100644 --- a/netutils/chat/chat.c +++ b/netutils/chat/chat.c @@ -155,14 +155,14 @@ static int chat_tokenise(FAR struct chat* priv, tok_pos = 0; - info("%s (%d)\n", tok->string, tok->no_termin); + _info("%s (%d)\n", tok->string, tok->no_termin); return 0; } /* Tokenizer start */ DEBUGASSERT(script != NULL); - info("%s\n", script); + _info("%s\n", script); while (!ret && *cursor != '\0') { @@ -279,7 +279,7 @@ static int chat_tokenise(FAR struct chat* priv, ret = tok_on_delimiter(); } - info("result %d\n", ret); + _info("result %d\n", ret); return ret; } @@ -297,7 +297,7 @@ static int chat_internalise(FAR struct chat* priv, while (tok && !ret) { DEBUGASSERT(tok->string); - info("(%c) %s\n", rhs ? 'R' : 'L', tok->string); + _info("(%c) %s\n", rhs ? 'R' : 'L', tok->string); if (!rhs) { @@ -406,7 +406,7 @@ static int chat_internalise(FAR struct chat* priv, ret = -ENODATA; } - info("result %d, rhs %d\n", ret, rhs); + _info("result %d, rhs %d\n", ret, rhs); return ret; } @@ -426,7 +426,7 @@ static void chat_tokens_free(FAR struct chat_token* first_tok) first_tok = next_tok; } - info("tokens freed\n"); + _info("tokens freed\n"); } /* Main parsing function. */ @@ -463,14 +463,14 @@ static int chat_readb(FAR struct chat* priv, FAR char* c, int timeout_ms) ret = poll(&fds, 1, timeout_ms); if (ret <= 0) { - info("poll timed out\n"); + _info("poll timed out\n"); return -ETIMEDOUT; } ret = read(priv->ctl.fd, c, 1); if (ret != 1) { - info("read failed\n"); + _info("read failed\n"); return -EPERM; } @@ -479,7 +479,7 @@ static int chat_readb(FAR struct chat* priv, FAR char* c, int timeout_ms) fputc(*c, stderr); } - info("read \'%c\' (0x%02X)\n", *c, *c); + _info("read \'%c\' (0x%02X)\n", *c, *c); return 0; } @@ -487,9 +487,9 @@ static void chat_flush(FAR struct chat* priv) { char c; - info("starting\n"); + _info("starting\n"); while (chat_readb(priv, (FAR char*) &c, 0) == 0); - info("done\n"); + _info("done\n"); } static int chat_expect(FAR struct chat* priv, FAR const char* s) @@ -541,7 +541,7 @@ static int chat_expect(FAR struct chat* priv, FAR const char* s) } } - info("result %d\n", ret); + _info("result %d\n", ret); return ret; } @@ -553,7 +553,7 @@ static int chat_send(FAR struct chat* priv, FAR const char* s) /* 'write' returns the number of successfully written characters */ ret = write(priv->ctl.fd, s, len); - info("wrote %d out of %d bytes of \'%s\'\n", ret, len, s); + _info("wrote %d out of %d bytes of \'%s\'\n", ret, len, s); if (ret > 0) { /* Just SUCCESS */ @@ -570,7 +570,7 @@ static int chat_line_run(FAR struct chat* priv, int ret = 0; int numarg; - info("type %d, rhs %s\n", line->type, line->rhs); + _info("type %d, rhs %s\n", line->type, line->rhs); switch (line->type) { @@ -617,11 +617,11 @@ static int chat_line_run(FAR struct chat* priv, numarg = atoi(line->rhs); if (numarg < 0) { - info("invalid timeout string %s\n", line->rhs); + _info("invalid timeout string %s\n", line->rhs); } else { - info("timeout is %d s\n", numarg); + _info("timeout is %d s\n", numarg); priv->ctl.timeout = numarg; } @@ -678,7 +678,7 @@ static int chat_script_run(FAR struct chat* priv) } } - info("Script result %d, exited on line %d\n", ret, line_num); + _info("Script result %d, exited on line %d\n", ret, line_num); return ret; } diff --git a/nshlib/nsh_console.c b/nshlib/nsh_console.c index e47bb2a2f..6d68e3acb 100644 --- a/nshlib/nsh_console.c +++ b/nshlib/nsh_console.c @@ -183,7 +183,7 @@ static ssize_t nsh_consolewrite(FAR struct nsh_vtbl_s *vtbl, ret = fwrite(buffer, 1, nbytes, pstate->cn_outstream); if (ret < 0) { - _err("ERROR: [%d] Failed to send buffer: %d\n", + _err("ERROR: [%d] Failed to send buffer: %d\n", pstate->cn_outfd, errno); } return ret; diff --git a/nshlib/nsh_fscmds.c b/nshlib/nsh_fscmds.c index b60e6a7e5..49ea07bfa 100644 --- a/nshlib/nsh_fscmds.c +++ b/nshlib/nsh_fscmds.c @@ -1293,7 +1293,7 @@ int cmd_mkrd(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) #ifdef CONFIG_DEBUG_INFO memset(buffer, 0, sectsize * nsectors); #endif - info("RAMDISK at %p\n", buffer); + _info("RAMDISK at %p\n", buffer); /* Then register the ramdisk */ diff --git a/nshlib/nsh_parse.c b/nshlib/nsh_parse.c index 2d5701728..9e2a09cd0 100644 --- a/nshlib/nsh_parse.c +++ b/nshlib/nsh_parse.c @@ -363,7 +363,7 @@ static pthread_addr_t nsh_child(pthread_addr_t arg) struct cmdarg_s *carg = (struct cmdarg_s *)arg; int ret; - info("BG %s\n", carg->argv[0]); + _info("BG %s\n", carg->argv[0]); /* Execute the specified command on the child thread */ @@ -371,7 +371,7 @@ static pthread_addr_t nsh_child(pthread_addr_t arg) /* Released the cloned arguments */ - info("BG %s complete\n", carg->argv[0]); + _info("BG %s complete\n", carg->argv[0]); nsh_releaseargs(carg); return (pthread_addr_t)((uintptr_t)ret); } diff --git a/nshlib/nsh_telnetd.c b/nshlib/nsh_telnetd.c index 3972c3c80..5746008db 100644 --- a/nshlib/nsh_telnetd.c +++ b/nshlib/nsh_telnetd.c @@ -67,7 +67,7 @@ static int nsh_telnetmain(int argc, char *argv[]) DEBUGASSERT(pstate != NULL); vtbl = &pstate->cn_vtbl; - info("Session [%d] Started\n", getpid()); + _info("Session [%d] Started\n", getpid()); #ifdef CONFIG_NSH_TELNET_LOGIN /* Login User and Password Check */ @@ -201,11 +201,11 @@ int nsh_telnetstart(void) /* Start the telnet daemon */ - info("Starting the Telnet daemon\n"); + _info("Starting the Telnet daemon\n"); ret = telnetd_start(&config); if (ret < 0) { - _err("ERROR: Failed to tart the Telnet daemon: %d\n", ret); + _err("ERROR: Failed to tart the Telnet daemon: %d\n", ret); } return ret; diff --git a/platform/arduino-due/sam_cxxinitialize.c b/platform/arduino-due/sam_cxxinitialize.c index db73f5b5c..0342c03f7 100644 --- a/platform/arduino-due/sam_cxxinitialize.c +++ b/platform/arduino-due/sam_cxxinitialize.c @@ -54,7 +54,7 @@ */ #ifdef CONFIG_DEBUG_CXX -# define cxxinfo info +# define cxxinfo _info #else # define cxxinfo(x...) #endif diff --git a/platform/cloudctrl/stm32_cxxinitialize.c b/platform/cloudctrl/stm32_cxxinitialize.c index 4f65d0803..e34c8aeec 100644 --- a/platform/cloudctrl/stm32_cxxinitialize.c +++ b/platform/cloudctrl/stm32_cxxinitialize.c @@ -55,7 +55,7 @@ */ #ifdef CONFIG_DEBUG_CXX -# define cxxinfo info +# define cxxinfo _info #else # define cxxinfo(x...) #endif diff --git a/platform/fire-stm32v2/stm32_cxxinitialize.c b/platform/fire-stm32v2/stm32_cxxinitialize.c index c4c525f77..31f334f10 100644 --- a/platform/fire-stm32v2/stm32_cxxinitialize.c +++ b/platform/fire-stm32v2/stm32_cxxinitialize.c @@ -54,7 +54,7 @@ */ #ifdef CONFIG_DEBUG_CXX -# define cxxinfo info +# define cxxinfo _info #else # define cxxinfo(x...) #endif diff --git a/platform/mikroe-stm32f4/stm32_cxxinitialize.c b/platform/mikroe-stm32f4/stm32_cxxinitialize.c index 44d05ef15..1b4bd9be7 100644 --- a/platform/mikroe-stm32f4/stm32_cxxinitialize.c +++ b/platform/mikroe-stm32f4/stm32_cxxinitialize.c @@ -54,7 +54,7 @@ */ #ifdef CONFIG_DEBUG_CXX -# define cxxinfo info +# define cxxinfo _info #else # define cxxinfo(x...) #endif diff --git a/platform/nucleo-144/stm32_cxxinitialize.c b/platform/nucleo-144/stm32_cxxinitialize.c index 30bc36b1b..8a60c2cb0 100644 --- a/platform/nucleo-144/stm32_cxxinitialize.c +++ b/platform/nucleo-144/stm32_cxxinitialize.c @@ -55,7 +55,7 @@ */ #ifdef CONFIG_DEBUG_CXX -# define cxxinfo info +# define cxxinfo _info #else # define cxxinfo(x...) #endif diff --git a/platform/nucleo-f303re/stm32_cxxinitialize.c b/platform/nucleo-f303re/stm32_cxxinitialize.c index fb9bc1142..f414f3c45 100644 --- a/platform/nucleo-f303re/stm32_cxxinitialize.c +++ b/platform/nucleo-f303re/stm32_cxxinitialize.c @@ -54,7 +54,7 @@ */ #ifdef CONFIG_DEBUG_CXX -# define cxxinfo info +# define cxxinfo _info #else # define cxxinfo(x...) #endif diff --git a/platform/nucleo-f4x1re/stm32_cxxinitialize.c b/platform/nucleo-f4x1re/stm32_cxxinitialize.c index b0667f577..292f708c0 100644 --- a/platform/nucleo-f4x1re/stm32_cxxinitialize.c +++ b/platform/nucleo-f4x1re/stm32_cxxinitialize.c @@ -54,7 +54,7 @@ */ #ifdef CONFIG_DEBUG_CXX -# define cxxinfo info +# define cxxinfo _info #else # define cxxinfo(x...) #endif diff --git a/platform/nucleo-l476rg/stm32_cxxinitialize.c b/platform/nucleo-l476rg/stm32_cxxinitialize.c index 4730302fc..2dd722ba4 100644 --- a/platform/nucleo-l476rg/stm32_cxxinitialize.c +++ b/platform/nucleo-l476rg/stm32_cxxinitialize.c @@ -54,7 +54,7 @@ */ #ifdef CONFIG_DEBUG_CXX -# define cxxinfo info +# define cxxinfo _info #else # define cxxinfo(x...) #endif diff --git a/platform/olimex-stm32-h405/stm32_cxxinitialize.c b/platform/olimex-stm32-h405/stm32_cxxinitialize.c index a6ccc64ae..634c80ccc 100644 --- a/platform/olimex-stm32-h405/stm32_cxxinitialize.c +++ b/platform/olimex-stm32-h405/stm32_cxxinitialize.c @@ -54,7 +54,7 @@ */ #ifdef CONFIG_DEBUG_CXX -# define cxxinfo info +# define cxxinfo _info #else # define cxxinfo(x...) #endif diff --git a/platform/olimex-stm32-h407/stm32_cxxinitialize.c b/platform/olimex-stm32-h407/stm32_cxxinitialize.c index c65073a17..a81ede5fb 100644 --- a/platform/olimex-stm32-h407/stm32_cxxinitialize.c +++ b/platform/olimex-stm32-h407/stm32_cxxinitialize.c @@ -54,7 +54,7 @@ */ #ifdef CONFIG_DEBUG_CXX -# define cxxinfo info +# define cxxinfo _info #else # define cxxinfo(x...) #endif diff --git a/platform/olimex-stm32-p207/stm32_cxxinitialize.c b/platform/olimex-stm32-p207/stm32_cxxinitialize.c index 521739eec..b60195f8d 100644 --- a/platform/olimex-stm32-p207/stm32_cxxinitialize.c +++ b/platform/olimex-stm32-p207/stm32_cxxinitialize.c @@ -54,7 +54,7 @@ */ #ifdef CONFIG_DEBUG_CXX -# define cxxinfo info +# define cxxinfo _info #else # define cxxinfo(x...) #endif diff --git a/platform/olimexino-stm32/stm32_cxxinitialize.c b/platform/olimexino-stm32/stm32_cxxinitialize.c index f634fdadf..00d3114d3 100644 --- a/platform/olimexino-stm32/stm32_cxxinitialize.c +++ b/platform/olimexino-stm32/stm32_cxxinitialize.c @@ -54,7 +54,7 @@ */ #ifdef CONFIG_DEBUG_CXX -# define cxxinfo info +# define cxxinfo _info #else # define cxxinfo(x...) #endif diff --git a/platform/pcduino-a10/a1x_cxxinitialize.c b/platform/pcduino-a10/a1x_cxxinitialize.c index bfdd3b4d4..47d4ce1f6 100644 --- a/platform/pcduino-a10/a1x_cxxinitialize.c +++ b/platform/pcduino-a10/a1x_cxxinitialize.c @@ -54,7 +54,7 @@ */ #ifdef CONFIG_DEBUG_CXX -# define cxxinfo info +# define cxxinfo _info #else # define cxxinfo(x...) #endif diff --git a/platform/sabre-6quad/imx_cxxinitialize.c b/platform/sabre-6quad/imx_cxxinitialize.c index fe5e5d465..cd21604de 100644 --- a/platform/sabre-6quad/imx_cxxinitialize.c +++ b/platform/sabre-6quad/imx_cxxinitialize.c @@ -54,7 +54,7 @@ */ #ifdef CONFIG_DEBUG_CXX -# define cxxinfo info +# define cxxinfo _info #else # define cxxinfo(x...) #endif diff --git a/platform/sam3u-ek/sam_cxxinitialized.c b/platform/sam3u-ek/sam_cxxinitialized.c index c95a03efa..facb7cb36 100644 --- a/platform/sam3u-ek/sam_cxxinitialized.c +++ b/platform/sam3u-ek/sam_cxxinitialized.c @@ -54,7 +54,7 @@ */ #ifdef CONFIG_DEBUG_CXX -# define cxxinfo info +# define cxxinfo _info #else # define cxxinfo(x...) #endif diff --git a/platform/sam4e-ek/sam_cxxinitialize.c b/platform/sam4e-ek/sam_cxxinitialize.c index 516c7e07f..36898f6e7 100644 --- a/platform/sam4e-ek/sam_cxxinitialize.c +++ b/platform/sam4e-ek/sam_cxxinitialize.c @@ -54,7 +54,7 @@ */ #ifdef CONFIG_DEBUG_CXX -# define cxxinfo info +# define cxxinfo _info #else # define cxxinfo(x...) #endif diff --git a/platform/sam4l-xplained/sam_cxxinitialize.c b/platform/sam4l-xplained/sam_cxxinitialize.c index e0dff6945..7d5efaaec 100644 --- a/platform/sam4l-xplained/sam_cxxinitialize.c +++ b/platform/sam4l-xplained/sam_cxxinitialize.c @@ -54,7 +54,7 @@ */ #ifdef CONFIG_DEBUG_CXX -# define cxxinfo info +# define cxxinfo _info #else # define cxxinfo(x...) #endif diff --git a/platform/sam4s-xplained-pro/sam_cxxinitialize.c b/platform/sam4s-xplained-pro/sam_cxxinitialize.c index e1182d21f..8a1b6921e 100644 --- a/platform/sam4s-xplained-pro/sam_cxxinitialize.c +++ b/platform/sam4s-xplained-pro/sam_cxxinitialize.c @@ -54,7 +54,7 @@ */ #ifdef CONFIG_DEBUG_CXX -# define cxxinfo info +# define cxxinfo _info #else # define cxxinfo(x...) #endif diff --git a/platform/sam4s-xplained/sam_cxxinitialize.c b/platform/sam4s-xplained/sam_cxxinitialize.c index e68182e13..90abcb81f 100644 --- a/platform/sam4s-xplained/sam_cxxinitialize.c +++ b/platform/sam4s-xplained/sam_cxxinitialize.c @@ -54,7 +54,7 @@ */ #ifdef CONFIG_DEBUG_CXX -# define cxxinfo info +# define cxxinfo _info #else # define cxxinfo(x...) #endif diff --git a/platform/sama5d2-xult/sam_cxxinitialize.c b/platform/sama5d2-xult/sam_cxxinitialize.c index 00d28a083..0b61505ea 100644 --- a/platform/sama5d2-xult/sam_cxxinitialize.c +++ b/platform/sama5d2-xult/sam_cxxinitialize.c @@ -54,7 +54,7 @@ */ #ifdef CONFIG_DEBUG_CXX -# define cxxinfo info +# define cxxinfo _info #else # define cxxinfo(x...) #endif diff --git a/platform/sama5d3-xplained/sam_cxxinitialize.c b/platform/sama5d3-xplained/sam_cxxinitialize.c index fb13d3eaf..686892046 100644 --- a/platform/sama5d3-xplained/sam_cxxinitialize.c +++ b/platform/sama5d3-xplained/sam_cxxinitialize.c @@ -54,7 +54,7 @@ */ #ifdef CONFIG_DEBUG_CXX -# define cxxinfo info +# define cxxinfo _info #else # define cxxinfo(x...) #endif diff --git a/platform/sama5d3x-ek/sam_cxxinitialize.c b/platform/sama5d3x-ek/sam_cxxinitialize.c index 03f9d5f56..359013ad7 100644 --- a/platform/sama5d3x-ek/sam_cxxinitialize.c +++ b/platform/sama5d3x-ek/sam_cxxinitialize.c @@ -54,7 +54,7 @@ */ #ifdef CONFIG_DEBUG_CXX -# define cxxinfo info +# define cxxinfo _info #else # define cxxinfo(x...) #endif diff --git a/platform/sama5d4-ek/sam_cxxinitialize.c b/platform/sama5d4-ek/sam_cxxinitialize.c index c020f55fe..153d5086b 100644 --- a/platform/sama5d4-ek/sam_cxxinitialize.c +++ b/platform/sama5d4-ek/sam_cxxinitialize.c @@ -54,7 +54,7 @@ */ #ifdef CONFIG_DEBUG_CXX -# define cxxinfo info +# define cxxinfo _info #else # define cxxinfo(x...) #endif diff --git a/platform/samd20-xplained/sam_cxxinitialize.c b/platform/samd20-xplained/sam_cxxinitialize.c index b25e594f2..1ef302032 100644 --- a/platform/samd20-xplained/sam_cxxinitialize.c +++ b/platform/samd20-xplained/sam_cxxinitialize.c @@ -54,7 +54,7 @@ */ #ifdef CONFIG_DEBUG_CXX -# define cxxinfo info +# define cxxinfo _info #else # define cxxinfo(x...) #endif diff --git a/platform/samd21-xplained/sam_cxxinitialize.c b/platform/samd21-xplained/sam_cxxinitialize.c index 3766534f0..2bcda4ad8 100644 --- a/platform/samd21-xplained/sam_cxxinitialize.c +++ b/platform/samd21-xplained/sam_cxxinitialize.c @@ -54,7 +54,7 @@ */ #ifdef CONFIG_DEBUG_CXX -# define cxxinfo info +# define cxxinfo _info #else # define cxxinfo(x...) #endif diff --git a/platform/same70-xplained/sam_cxxinitialize.c b/platform/same70-xplained/sam_cxxinitialize.c index 06f2dd75b..e114dee46 100644 --- a/platform/same70-xplained/sam_cxxinitialize.c +++ b/platform/same70-xplained/sam_cxxinitialize.c @@ -54,7 +54,7 @@ */ #ifdef CONFIG_DEBUG_CXX -# define cxxinfo info +# define cxxinfo _info #else # define cxxinfo(x...) #endif diff --git a/platform/saml21-xplained/sam_cxxinitialize.c b/platform/saml21-xplained/sam_cxxinitialize.c index 126c9496b..14b597a71 100644 --- a/platform/saml21-xplained/sam_cxxinitialize.c +++ b/platform/saml21-xplained/sam_cxxinitialize.c @@ -54,7 +54,7 @@ */ #ifdef CONFIG_DEBUG_CXX -# define cxxinfo info +# define cxxinfo _info #else # define cxxinfo(x...) #endif diff --git a/platform/samv71-xult/sam_cxxinitialize.c b/platform/samv71-xult/sam_cxxinitialize.c index 40edce139..372c9106b 100644 --- a/platform/samv71-xult/sam_cxxinitialize.c +++ b/platform/samv71-xult/sam_cxxinitialize.c @@ -54,7 +54,7 @@ */ #ifdef CONFIG_DEBUG_CXX -# define cxxinfo info +# define cxxinfo _info #else # define cxxinfo(x...) #endif diff --git a/platform/shenzhou/stm32_cxxinitialize.c b/platform/shenzhou/stm32_cxxinitialize.c index 5bad27c7d..cc013c3e4 100644 --- a/platform/shenzhou/stm32_cxxinitialize.c +++ b/platform/shenzhou/stm32_cxxinitialize.c @@ -54,7 +54,7 @@ */ #ifdef CONFIG_DEBUG_CXX -# define cxxinfo info +# define cxxinfo _info #else # define cxxinfo(x...) #endif diff --git a/platform/spark/stm32_cxxinitialize.c b/platform/spark/stm32_cxxinitialize.c index f11ef6ed5..2f21a83f0 100644 --- a/platform/spark/stm32_cxxinitialize.c +++ b/platform/spark/stm32_cxxinitialize.c @@ -54,7 +54,7 @@ */ #ifdef CONFIG_DEBUG_CXX -# define cxxinfo info +# define cxxinfo _info #else # define cxxinfo(x...) #endif diff --git a/platform/stm3220g-eval/stm32_cxxinitialize.c b/platform/stm3220g-eval/stm32_cxxinitialize.c index 99c0eaaee..defc7cf11 100644 --- a/platform/stm3220g-eval/stm32_cxxinitialize.c +++ b/platform/stm3220g-eval/stm32_cxxinitialize.c @@ -54,7 +54,7 @@ */ #ifdef CONFIG_DEBUG_CXX -# define cxxinfo info +# define cxxinfo _info #else # define cxxinfo(x...) #endif diff --git a/platform/stm3240g-eval/stm32_cxxinitialize.c b/platform/stm3240g-eval/stm32_cxxinitialize.c index c03e76c20..179a96588 100644 --- a/platform/stm3240g-eval/stm32_cxxinitialize.c +++ b/platform/stm3240g-eval/stm32_cxxinitialize.c @@ -54,7 +54,7 @@ */ #ifdef CONFIG_DEBUG_CXX -# define cxxinfo info +# define cxxinfo _info #else # define cxxinfo(x...) #endif diff --git a/platform/stm32f3discovery/stm32_cxxinitialize.c b/platform/stm32f3discovery/stm32_cxxinitialize.c index c899d50be..f492a45aa 100644 --- a/platform/stm32f3discovery/stm32_cxxinitialize.c +++ b/platform/stm32f3discovery/stm32_cxxinitialize.c @@ -54,7 +54,7 @@ */ #ifdef CONFIG_DEBUG_CXX -# define cxxinfo info +# define cxxinfo _info #else # define cxxinfo(x...) #endif diff --git a/platform/stm32f429i-disco/stm32_cxxinitialize.c b/platform/stm32f429i-disco/stm32_cxxinitialize.c index bea0b04cd..c019c5547 100644 --- a/platform/stm32f429i-disco/stm32_cxxinitialize.c +++ b/platform/stm32f429i-disco/stm32_cxxinitialize.c @@ -54,7 +54,7 @@ */ #ifdef CONFIG_DEBUG_CXX -# define cxxinfo info +# define cxxinfo _info #else # define cxxinfo(x...) #endif diff --git a/platform/stm32f4discovery/stm32_cxxinitialize.c b/platform/stm32f4discovery/stm32_cxxinitialize.c index d3165aaba..05f598e9f 100644 --- a/platform/stm32f4discovery/stm32_cxxinitialize.c +++ b/platform/stm32f4discovery/stm32_cxxinitialize.c @@ -54,7 +54,7 @@ */ #ifdef CONFIG_DEBUG_CXX -# define cxxinfo info +# define cxxinfo _info #else # define cxxinfo(x...) #endif diff --git a/platform/stm32f746g-disco/stm32_cxxinitialize.c b/platform/stm32f746g-disco/stm32_cxxinitialize.c index 33eb1d3f1..70b88472d 100644 --- a/platform/stm32f746g-disco/stm32_cxxinitialize.c +++ b/platform/stm32f746g-disco/stm32_cxxinitialize.c @@ -54,7 +54,7 @@ */ #ifdef CONFIG_DEBUG_CXX -# define cxxinfo info +# define cxxinfo _info #else # define cxxinfo(x...) #endif diff --git a/platform/stm32l476vg-disco/stm32_cxxinitialize.c b/platform/stm32l476vg-disco/stm32_cxxinitialize.c index b438b564d..a6e649aa0 100644 --- a/platform/stm32l476vg-disco/stm32_cxxinitialize.c +++ b/platform/stm32l476vg-disco/stm32_cxxinitialize.c @@ -54,7 +54,7 @@ */ #ifdef CONFIG_DEBUG_CXX -# define cxxinfo info +# define cxxinfo _info #else # define cxxinfo(x...) #endif diff --git a/platform/stm32ldiscovery/stm32_cxxinitialize.c b/platform/stm32ldiscovery/stm32_cxxinitialize.c index 1e5313369..0383a5ba0 100644 --- a/platform/stm32ldiscovery/stm32_cxxinitialize.c +++ b/platform/stm32ldiscovery/stm32_cxxinitialize.c @@ -54,7 +54,7 @@ */ #ifdef CONFIG_DEBUG_CXX -# define cxxinfo info +# define cxxinfo _info #else # define cxxinfo(x...) #endif diff --git a/platform/teensy-lc/kl_cxxinitialize.c b/platform/teensy-lc/kl_cxxinitialize.c index 45fa933de..218b588b5 100644 --- a/platform/teensy-lc/kl_cxxinitialize.c +++ b/platform/teensy-lc/kl_cxxinitialize.c @@ -54,7 +54,7 @@ */ #ifdef CONFIG_DEBUG_CXX -# define cxxinfo info +# define cxxinfo _info #else # define cxxinfo(x...) #endif diff --git a/platform/viewtool-stm32f107/stm32_cxxinitialize.c b/platform/viewtool-stm32f107/stm32_cxxinitialize.c index b92f9dfee..404bab80f 100644 --- a/platform/viewtool-stm32f107/stm32_cxxinitialize.c +++ b/platform/viewtool-stm32f107/stm32_cxxinitialize.c @@ -54,7 +54,7 @@ */ #ifdef CONFIG_DEBUG_CXX -# define cxxinfo info +# define cxxinfo _info #else # define cxxinfo(x...) #endif diff --git a/system/i2c/i2c_main.c b/system/i2c/i2c_main.c index 5fc238bf5..0d80d39f2 100644 --- a/system/i2c/i2c_main.c +++ b/system/i2c/i2c_main.c @@ -426,7 +426,7 @@ ssize_t i2ctool_write(FAR struct i2ctool_s *i2ctool, FAR const void *buffer, siz ret = fwrite(buffer, 1, nbytes, OUTSTREAM(i2ctool)); if (ret < 0) { - _err("ERROR: [%d] Failed to send buffer: %d\n", OUTFD(i2ctool), errno); + _err("ERROR: [%d] Failed to send buffer: %d\n", OUTFD(i2ctool), errno); } return ret; diff --git a/system/ubloxmodem/ubloxmodem_main.c b/system/ubloxmodem/ubloxmodem_main.c index 3598e7027..f9a897515 100644 --- a/system/ubloxmodem/ubloxmodem_main.c +++ b/system/ubloxmodem/ubloxmodem_main.c @@ -59,12 +59,12 @@ ****************************************************************************/ #ifdef CONFIG_MODEM_U_BLOX_DEBUG -# define m_err _err -# define m_warn llwarn -# define m_info info -# define m_llerr llerr -# define m_llwarn llwarn -# define m_llinfo llinfo +# define m_err _err +# define m_warn _llwarn +# define m_info _info +# define m_llerr _llerr +# define m_llwarn _llwarn +# define m_llinfo _llinfo #else # define m_err(x...) # define m_warn(x...) diff --git a/system/zmodem/zm_receive.c b/system/zmodem/zm_receive.c index 60378d456..32066eee6 100644 --- a/system/zmodem/zm_receive.c +++ b/system/zmodem/zm_receive.c @@ -839,7 +839,7 @@ static int zmr_filedata(FAR struct zm_state_s *pzm) * Timed out waiting: * * 1) In state ZMR_INITWAIT - Received ZSINIT, waiting for data, or - * 2) In state XMRS_FILENAME - Received ZFILE, waiting for file info + * 2) In state XMRS_FILENAME - Received ZFILE, waiting for file _info * ****************************************************************************/ From 39c8f73540106c4b025f2a1e6c5e88af83a70d1c Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 17 Jun 2016 18:07:31 -0600 Subject: [PATCH 57/74] Update ChangeLog --- ChangeLog.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ChangeLog.txt b/ChangeLog.txt index 69a233608..c8dea934c 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1629,3 +1629,17 @@ Marten Svanfeld (2016-06-09). * netutils/ntpc and nshlib: NTP Client: All retries; Add initialization in NSH network startup logic. From David S. Alessio (2016-06-09) . + * Rearrange make to eliminate Kmenu files From Sebastien Lorquet + (2016-06-09). + * apps/nshlib: ake NSH net-initialization be a configuration option. + From Marten Svanfeldt (2016-06-09). + * Make sure that APPNAME is defined in all Makefiles that generate + applications. From Sebastien Lorquet (2016-06-09). + * apps/netutils/esp8266/: Add logic to set the BAUD rate. From Pierr- + noel Bouteville (2016-06-11). + * apps/netutils/esp8266/: CONFIG_SERIAL_TERMIOS must be defined in + order to set BAUD (2016-06-11). + * Change dbg() and vdbg() to err() and info() (2016-06-11). + * Change some *err() message to *info() messages if what was a *dbg() + message does not indicate and error condition (2016-06-14). + * Add _ to front of debug macros (2016-06-16). From 6e2f729add1e80a5cf96d14465ea9bd7accd33a0 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 20 Jun 2016 08:57:33 -0600 Subject: [PATCH 58/74] Remove lowsyslog(). The new syslog() includes all of the functionality of lowsyslog(). No longer any need for two interfaces. --- examples/buttons/buttons_main.c | 34 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/examples/buttons/buttons_main.c b/examples/buttons/buttons_main.c index 016aa88cb..c73eee5c6 100644 --- a/examples/buttons/buttons_main.c +++ b/examples/buttons/buttons_main.c @@ -302,12 +302,8 @@ static void show_buttons(uint8_t oldset, uint8_t newset) state = "released"; } - /* Use lowsyslog() because we make be executing from an - * interrupt handler. - */ - - lowsyslog(LOG_INFO, " %s %s\n", - g_buttoninfo[BUTTON_INDEX(i)].name, state); + syslog(LOG_INFO, " %s %s\n", + g_buttoninfo[BUTTON_INDEX(i)].name, state); } } } @@ -317,8 +313,8 @@ static void button_handler(int id, int irq) { uint8_t newset = board_buttons(); - lowsyslog(LOG_INFO, "IRQ:%d Button %d:%s SET:%02x:\n", - irq, id, g_buttoninfo[BUTTON_INDEX(id)].name, newset); + syslog(LOG_INFO, "IRQ:%d Button %d:%s SET:%02x:\n", + irq, id, g_buttoninfo[BUTTON_INDEX(id)].name, newset); show_buttons(g_oldset, newset); g_oldset = newset; @@ -421,7 +417,7 @@ int buttons_main(int argc, char *argv[]) maxbuttons = strtol(argv[1], NULL, 10); } - lowsyslog(LOG_INFO, "maxbuttons: %d\n", maxbuttons); + syslog(LOG_INFO, "maxbuttons: %d\n", maxbuttons); #endif /* Initialize the button GPIOs */ @@ -435,11 +431,9 @@ int buttons_main(int argc, char *argv[]) { xcpt_t oldhandler = board_button_irq(i, g_buttoninfo[BUTTON_INDEX(i)].handler); - /* Use lowsyslog() for compatibility with interrupt handler output. */ - - lowsyslog(LOG_INFO, "Attached handler at %p to button %d [%s], oldhandler:%p\n", - g_buttoninfo[BUTTON_INDEX(i)].handler, i, - g_buttoninfo[BUTTON_INDEX(i)].name, oldhandler); + syslog(LOG_INFO, "Attached handler at %p to button %d [%s], oldhandler:%p\n", + g_buttoninfo[BUTTON_INDEX(i)].handler, i, + g_buttoninfo[BUTTON_INDEX(i)].name, oldhandler); /* Some hardware multiplexes different GPIO button sources to the same * physical interrupt. If we register multiple such multiplexed button @@ -450,9 +444,9 @@ int buttons_main(int argc, char *argv[]) if (oldhandler != NULL) { - lowsyslog(LOG_INFO, "WARNING: oldhandler:%p is not NULL! " - "Button events may be lost or aliased!\n", - oldhandler); + syslog(LOG_INFO, "WARNING: oldhandler:%p is not NULL! " + "Button events may be lost or aliased!\n", + oldhandler); } } #endif @@ -480,11 +474,7 @@ int buttons_main(int argc, char *argv[]) flags = enter_critical_section(); - /* Use lowsyslog() for compatibility with interrupt handler - * output. - */ - - lowsyslog(LOG_INFO, "POLL SET:%02x:\n", newset); + syslog(LOG_INFO, "POLL SET:%02x:\n", newset); show_buttons(g_oldset, newset); g_oldset = newset; leave_critical_section(flags); From bb06f7368f2820e102b9abbdc4f34f9cdb852ff0 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 20 Jun 2016 11:48:15 -0600 Subject: [PATCH 59/74] Without lowsyslog() *llinfo() is not useful. Eliminate and replace with *info(). --- examples/cc3000/telnetd_daemon.c | 8 ++--- examples/cc3000/telnetd_driver.c | 12 ++++---- examples/helloxx/helloxx_main.cxx | 19 +++--------- netutils/ping/icmpv6_ping.c | 2 +- netutils/telnetd/telnetd_daemon.c | 8 ++--- netutils/thttpd/fdwatch.c | 19 ++++-------- netutils/thttpd/thttpd_cgi.c | 46 ++++++++++++++--------------- nshlib/nsh_netinit.c | 4 +-- system/ubloxmodem/ubloxmodem_main.c | 6 ---- 9 files changed, 49 insertions(+), 75 deletions(-) diff --git a/examples/cc3000/telnetd_daemon.c b/examples/cc3000/telnetd_daemon.c index 6793fc512..893e34c1b 100644 --- a/examples/cc3000/telnetd_daemon.c +++ b/examples/cc3000/telnetd_daemon.c @@ -175,7 +175,7 @@ static int telnetd_daemon(int argc, char *argv[]) for (;;) { - nllinfo("Accepting connections on port %d\n", ntohs(daemon->port)); + ninfo("Accepting connections on port %d\n", ntohs(daemon->port)); addrlen = sizeof(struct sockaddr_in); acceptsd = accept(listensd, (struct sockaddr*)&myaddr, &addrlen); @@ -199,7 +199,7 @@ static int telnetd_daemon(int argc, char *argv[]) /* Create a character device to "wrap" the accepted socket descriptor */ - nllinfo("Creating the telnet driver\n"); + ninfo("Creating the telnet driver\n"); devpath = telnetd_driver(acceptsd, daemon); if (devpath == NULL) { @@ -209,7 +209,7 @@ static int telnetd_daemon(int argc, char *argv[]) /* Open the driver */ - nllinfo("Opening the telnet driver\n"); + ninfo("Opening the telnet driver\n"); drvrfd = open(devpath, O_RDWR); if (drvrfd < 0) { @@ -238,7 +238,7 @@ static int telnetd_daemon(int argc, char *argv[]) * will inherit the new stdin, stdout, and stderr. */ - nllinfo("Starting the telnet session\n"); + ninfo("Starting the telnet session\n"); pid = task_create("Telnet session", daemon->priority, daemon->stacksize, daemon->entry, NULL); if (pid < 0) diff --git a/examples/cc3000/telnetd_driver.c b/examples/cc3000/telnetd_driver.c index 513486fc8..dfaad577e 100644 --- a/examples/cc3000/telnetd_driver.c +++ b/examples/cc3000/telnetd_driver.c @@ -227,12 +227,12 @@ static ssize_t telnetd_receive(FAR struct telnetd_dev_s *priv, FAR const char *s int nread; uint8_t ch; - nllinfo("srclen: %d destlen: %d\n", srclen, destlen); + ninfo("srclen: %d destlen: %d\n", srclen, destlen); for (nread = 0; srclen > 0 && nread < destlen; srclen--) { ch = *src++; - nllinfo("ch=%02x state=%d\n", ch, priv->td_state); + ninfo("ch=%02x state=%d\n", ch, priv->td_state); switch (priv->td_state) { @@ -412,7 +412,7 @@ static int telnetd_open(FAR struct file *filep) int tmp; int ret; - nllinfo("td_crefs: %d\n", priv->td_crefs); + ninfo("td_crefs: %d\n", priv->td_crefs); /* O_NONBLOCK is not supported */ @@ -468,7 +468,7 @@ static int telnetd_close(FAR struct file *filep) FAR char *devpath; int ret; - nllinfo("td_crefs: %d\n", priv->td_crefs); + ninfo("td_crefs: %d\n", priv->td_crefs); /* Get exclusive access to the device structures */ @@ -547,7 +547,7 @@ static ssize_t telnetd_read(FAR struct file *filep, FAR char *buffer, size_t len FAR struct telnetd_dev_s *priv = inode->i_private; ssize_t ret; - nllinfo("len: %d\n", len); + ninfo("len: %d\n", len); /* First, handle the case where there are still valid bytes left in the * I/O buffer from the last time that read was called. NOTE: Much of @@ -620,7 +620,7 @@ static ssize_t telnetd_write(FAR struct file *filep, FAR const char *buffer, siz char ch; bool eol; - nllinfo("len: %d\n", len); + ninfo("len: %d\n", len); /* Process each character from the user buffer */ diff --git a/examples/helloxx/helloxx_main.cxx b/examples/helloxx/helloxx_main.cxx index f91e9a9a5..8a1db396e 100644 --- a/examples/helloxx/helloxx_main.cxx +++ b/examples/helloxx/helloxx_main.cxx @@ -63,20 +63,9 @@ #endif #ifdef CONFIG_DEBUG_CXX -# define cxxdbg _err -# define cxxllerr llerr -# ifdef CONFIG_DEBUG_INFO -# define cxxinfo _info -# define cxxllinfo llinfo -# else -# define cxxinfo(x...) -# define cxxllinfo(x...) -# endif +# define cxxinfo _info #else -# define cxxdbg(x...) -# define cxxllerr(x...) # define cxxinfo(x...) -# define cxxllinfo(x...) #endif //*************************************************************************** @@ -88,17 +77,17 @@ class CHelloWorld public: CHelloWorld(void) : mSecret(42) { - cxxdbg("Constructor: mSecret=%d\n", mSecret); + cxxinfo("Constructor: mSecret=%d\n", mSecret); } ~CHelloWorld(void) { - cxxdbg("Destructor\n"); + cxxinfo("Destructor\n"); } bool HelloWorld(void) { - cxxdbg("HelloWorld: mSecret=%d\n", mSecret); + cxxinfo("HelloWorld: mSecret=%d\n", mSecret); if (mSecret != 42) { diff --git a/netutils/ping/icmpv6_ping.c b/netutils/ping/icmpv6_ping.c index abad366b9..d9cc7881d 100644 --- a/netutils/ping/icmpv6_ping.c +++ b/netutils/ping/icmpv6_ping.c @@ -95,7 +95,7 @@ static void icmpv6_echo_request(FAR struct net_driver_s *dev, uint16_t reqlen; int i; - nllinfo("Send ECHO request: seqno=%d\n", pstate->png_seqno); + ninfo("Send ECHO request: seqno=%d\n", pstate->png_seqno); /* Set up the IPv6 header (most is probably already in place) */ diff --git a/netutils/telnetd/telnetd_daemon.c b/netutils/telnetd/telnetd_daemon.c index 9b386c63f..69815f346 100644 --- a/netutils/telnetd/telnetd_daemon.c +++ b/netutils/telnetd/telnetd_daemon.c @@ -241,7 +241,7 @@ static int telnetd_daemon(int argc, char *argv[]) for (;;) { - nllinfo("Accepting connections on port %d\n", ntohs(daemon->port)); + ninfo("Accepting connections on port %d\n", ntohs(daemon->port)); addrlen = sizeof(struct sockaddr_in); acceptsd = accept(listensd, (struct sockaddr*)&myaddr, &addrlen); @@ -287,7 +287,7 @@ static int telnetd_daemon(int argc, char *argv[]) /* Create a character device to "wrap" the accepted socket descriptor */ - nllinfo("Creating the telnet driver\n"); + ninfo("Creating the telnet driver\n"); session.ts_sd = acceptsd; session.ts_devpath[0] = '\0'; @@ -303,7 +303,7 @@ static int telnetd_daemon(int argc, char *argv[]) /* Open the driver */ - nllinfo("Opening the telnet driver at %s\n", session.ts_devpath); + ninfo("Opening the telnet driver at %s\n", session.ts_devpath); drvrfd = open(session.ts_devpath, O_RDWR); if (drvrfd < 0) { @@ -328,7 +328,7 @@ static int telnetd_daemon(int argc, char *argv[]) * will inherit the new stdin, stdout, and stderr. */ - nllinfo("Starting the telnet session\n"); + ninfo("Starting the telnet session\n"); pid = task_create("Telnet session", daemon->priority, daemon->stacksize, daemon->entry, NULL); if (pid < 0) diff --git a/netutils/thttpd/fdwatch.c b/netutils/thttpd/fdwatch.c index 43b08f2cd..221e41065 100644 --- a/netutils/thttpd/fdwatch.c +++ b/netutils/thttpd/fdwatch.c @@ -57,33 +57,24 @@ ****************************************************************************/ /* Debug output from this file is normally suppressed. If enabled, be aware - * that output to stdout will interfere with CGI programs (you could use the - * the low-level debug (llerr) functions which probably do not use stdout + * that output to stdout will interfere with CGI programs. */ #ifdef CONFIG_THTTPD_FDWATCH_DEBUG # ifdef CONFIG_CPP_HAVE_VARARGS # define fwdbg(format, ...) nerr(format, ##__VA_ARGS__) -# define fwllerr(format, ...) nllerr(format, ##__VA_ARGS__) # define fwinfo(format, ...) ninfo(format, ##__VA_ARGS__) -# define fwllinfo(format, ...) nllinfo(format, ##__VA_ARGS__) # else # define fwdbg nerr -# define fwllerr nllerr # define fwinfo ninfo -# define fwllinfo nllinfo # endif #else # ifdef CONFIG_CPP_HAVE_VARARGS # define fwdbg(x...) -# define fwllerr(x...) # define fwinfo(x...) -# define fwllinfo(x...) # else # define fwdbg (void) -# define fwllerr (void) -# define fwinfo (void) -# define fwllinfo (void) +# define fwinfo (void) # endif #endif @@ -141,7 +132,7 @@ static int fdwatch_pollndx(FAR struct fdwatch_s *fw, int fd) } } - fwdbg("No poll index for fd %d: %d\n", fd); + fwerr("ERROR: No poll index for fd %d: %d\n", fd); return -1; } @@ -160,7 +151,7 @@ struct fdwatch_s *fdwatch_initialize(int nfds) fw = (struct fdwatch_s*)zalloc(sizeof(struct fdwatch_s)); if (!fw) { - fwdbg("Failed to allocate fdwatch\n"); + fwerr("ERROR: Failed to allocate fdwatch\n"); return NULL; } @@ -229,7 +220,7 @@ void fdwatch_add_fd(struct fdwatch_s *fw, int fd, void *client_data) if (fw->nwatched >= fw->nfds) { - fwdbg("too many fds\n"); + fwerr("ERROR: too many fds\n"); return; } diff --git a/netutils/thttpd/thttpd_cgi.c b/netutils/thttpd/thttpd_cgi.c index 5e57190f7..6487ec861 100644 --- a/netutils/thttpd/thttpd_cgi.c +++ b/netutils/thttpd/thttpd_cgi.c @@ -366,14 +366,14 @@ static inline int cgi_interpose_input(struct cgi_conn_s *cc) ssize_t nbytes_read; ssize_t nbytes_written; - nllinfo("nbytes: %d contentlength: %d\n", cc->inbuf.nbytes, cc->inbuf.contentlength); + ninfo("nbytes: %d contentlength: %d\n", cc->inbuf.nbytes, cc->inbuf.contentlength); if (cc->inbuf.nbytes < cc->inbuf.contentlength) { do { nbytes_read = read(cc->connfd, cc->inbuf.buffer, MIN(CONFIG_THTTPD_CGIINBUFFERSIZE, cc->inbuf.contentlength - cc->inbuf.nbytes)); - nllinfo("nbytes_read: %d\n", nbytes_read); + ninfo("nbytes_read: %d\n", nbytes_read); if (nbytes_read < 0) { if (errno != EINTR) @@ -388,7 +388,7 @@ static inline int cgi_interpose_input(struct cgi_conn_s *cc) if (nbytes_read > 0) { nbytes_written = httpd_write(cc->wrfd, cc->inbuf.buffer, nbytes_read); - nllinfo("nbytes_written: %d\n", nbytes_written); + ninfo("nbytes_written: %d\n", nbytes_written); if (nbytes_written != nbytes_read) { nllerr("ERROR: httpd_write failed\n"); @@ -447,7 +447,7 @@ static inline int cgi_interpose_output(struct cgi_conn_s *cc) /* Loop while there are things we can do without waiting for more input */ - nllinfo("state: %d\n", cc->outbuf.state); + ninfo("state: %d\n", cc->outbuf.state); switch (cc->outbuf.state) { case CGI_OUTBUFFER_READHEADER: @@ -461,7 +461,7 @@ static inline int cgi_interpose_output(struct cgi_conn_s *cc) */ nbytes_read = read(cc->rdfd, cc->inbuf.buffer, CONFIG_THTTPD_CGIINBUFFERSIZE); - nllinfo("Read %d bytes from fd %d\n", nbytes_read, cc->rdfd); + ninfo("Read %d bytes from fd %d\n", nbytes_read, cc->rdfd); if (nbytes_read < 0) { @@ -485,7 +485,7 @@ static inline int cgi_interpose_output(struct cgi_conn_s *cc) if (nbytes_read <= 0) { - nllinfo("End-of-file\n"); + ninfo("End-of-file\n"); br = &(cc->outbuf.buffer[cc->outbuf.len]); cc->outbuf.state = CGI_OUTBUFFER_HEADERREAD; } @@ -497,14 +497,14 @@ static inline int cgi_interpose_output(struct cgi_conn_s *cc) (void)memcpy(&(cc->outbuf.buffer[cc->outbuf.len]), cc->inbuf.buffer, nbytes_read); cc->outbuf.len += nbytes_read; cc->outbuf.buffer[cc->outbuf.len] = '\0'; - nllinfo("Header bytes accumulated: %d\n", cc->outbuf.len); + ninfo("Header bytes accumulated: %d\n", cc->outbuf.len); /* Check for end of header */ if ((br = strstr(cc->outbuf.buffer, "\r\n\r\n")) != NULL || (br = strstr(cc->outbuf.buffer, "\012\012")) != NULL) { - nllinfo("End-of-header\n"); + ninfo("End-of-header\n"); cc->outbuf.state = CGI_OUTBUFFER_HEADERREAD; } else @@ -559,7 +559,7 @@ static inline int cgi_interpose_output(struct cgi_conn_s *cc) /* Write the status line. */ - nllinfo("Status: %d\n", status); + ninfo("Status: %d\n", status); switch (status) { case 200: @@ -643,7 +643,7 @@ static inline int cgi_interpose_output(struct cgi_conn_s *cc) */ nbytes_read = read(cc->rdfd, cc->inbuf.buffer, CONFIG_THTTPD_CGIINBUFFERSIZE); - nllinfo("Read %d bytes from fd %d\n", nbytes_read, cc->rdfd); + ninfo("Read %d bytes from fd %d\n", nbytes_read, cc->rdfd); if (nbytes_read < 0) { @@ -667,7 +667,7 @@ static inline int cgi_interpose_output(struct cgi_conn_s *cc) if (nbytes_read == 0) { - nllinfo("End-of-file\n"); + ninfo("End-of-file\n"); cc->outbuf.state = CGI_OUTBUFFER_DONE; return 1; } @@ -713,7 +713,7 @@ static int cgi_child(int argc, char **argv) * all file descriptors */ - nllinfo("Started: %s\n", argv[1]); + ninfo("Started: %s\n", argv[1]); /* Allocate memory and initialize memory for interposing */ @@ -746,7 +746,7 @@ static int cgi_child(int argc, char **argv) * now prevents re-use of fd=0 and 1 by pipe(). */ - nllinfo("Closing descriptors\n"); + ninfo("Closing descriptors\n"); for (fd = 3; fd < (CONFIG_NFILE_DESCRIPTORS + CONFIG_NSOCKET_DESCRIPTORS); fd++) { /* Keep hc->conn_fd open for obvious reasons */ @@ -764,7 +764,7 @@ static int cgi_child(int argc, char **argv) * socket to the CGI program. */ - nllinfo("Create STDIN pipe\n"); + ninfo("Create STDIN pipe\n"); ret = pipe(pipefd); if (ret < 0) { @@ -795,7 +795,7 @@ static int cgi_child(int argc, char **argv) if (ret == 0) { - nllinfo("Create STDOUT pipe\n"); + ninfo("Create STDOUT pipe\n"); ret = pipe(pipefd); if (ret < 0) { @@ -857,7 +857,7 @@ static int cgi_child(int argc, char **argv) /* Run the CGI program. */ - nllinfo("Starting CGI: %s\n", hc->expnfilename); + ninfo("Starting CGI: %s\n", hc->expnfilename); #ifdef CONFIG_THTTPD_NXFLAT child = exec(hc->expnfilename, (FAR char * const *)argp, g_thttpdsymtab, g_thttpdnsymbols); @@ -891,7 +891,7 @@ static int cgi_child(int argc, char **argv) /* Send any data that is already buffer to the CGI task */ nbytes = hc->read_idx - hc->checked_idx; - nllinfo("nbytes: %d contentlength: %d\n", nbytes, hc->contentlength); + ninfo("nbytes: %d contentlength: %d\n", nbytes, hc->contentlength); if (nbytes > 0) { if (httpd_write(cc->wrfd, &(hc->read_buf[hc->checked_idx]), nbytes) != nbytes) @@ -909,7 +909,7 @@ static int cgi_child(int argc, char **argv) indone = false; outdone = false; - nllinfo("Interposing\n"); + ninfo("Interposing\n"); cgi_semgive(); /* Not safe to reference hc after this point */ do { @@ -921,7 +921,7 @@ static int cgi_child(int argc, char **argv) { /* Transfer data from the client to the CGI program (POST) */ - nllinfo("Interpose input\n"); + ninfo("Interpose input\n"); indone = cgi_interpose_input(cc); if (indone) { @@ -935,7 +935,7 @@ static int cgi_child(int argc, char **argv) { /* Handle receipt of headers and CGI program response (GET) */ - nllinfo("Interpose output\n"); + ninfo("Interpose output\n"); outdone = cgi_interpose_output(cc); } @@ -949,7 +949,7 @@ static int cgi_child(int argc, char **argv) else if (kill(child, 0) != 0) { - nllinfo("CGI no longer running: %d\n", errno); + ninfo("CGI no longer running: %d\n", errno); outdone = true; } } @@ -977,7 +977,7 @@ errout_with_cgiconn: httpd_free(cc); errout: - nllinfo("Return %d\n", errcode); + ninfo("Return %d\n", errcode); if (errcode != 0) { INTERNALERROR("errout"); @@ -1074,7 +1074,7 @@ static void cgi_kill(ClientData client_data, struct timeval *nowP) /* task_delete() is a very evil API. It can leave memory stranded! */ - nllinfo("Killing CGI child: %d\n", pid); + ninfo("Killing CGI child: %d\n", pid); if (task_delete(pid) != 0) { nllerr("ERROR: task_delete() failed: %d\n", errno); diff --git a/nshlib/nsh_netinit.c b/nshlib/nsh_netinit.c index 0adec1467..b8adb2ca9 100644 --- a/nshlib/nsh_netinit.c +++ b/nshlib/nsh_netinit.c @@ -366,14 +366,14 @@ static void nsh_netinit_signal(int signo, FAR siginfo_t *siginfo, /* What is the count on the semaphore? Don't over-post */ ret = sem_getvalue(&g_notify_sem, &semcount); - nllinfo("Entry: semcount=%d\n", semcount); + ninfo("Entry: semcount=%d\n", semcount); if (ret == OK && semcount <= 0) { sem_post(&g_notify_sem); } - nllinfo("Exit\n"); + ninfo("Exit\n"); } #endif diff --git a/system/ubloxmodem/ubloxmodem_main.c b/system/ubloxmodem/ubloxmodem_main.c index f9a897515..aecddf90b 100644 --- a/system/ubloxmodem/ubloxmodem_main.c +++ b/system/ubloxmodem/ubloxmodem_main.c @@ -62,16 +62,10 @@ # define m_err _err # define m_warn _llwarn # define m_info _info -# define m_llerr _llerr -# define m_llwarn _llwarn -# define m_llinfo _llinfo #else # define m_err(x...) # define m_warn(x...) # define m_info(x...) -# define m_llerr(x...) -# define m_llwarn(x...) -# define m_llinfo(x...) #endif #define UBLOXMODEM_MAX_REGISTERS 16 From d32f16450dc3088cba829db506d9d0186ad4204d Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 20 Jun 2016 12:39:46 -0600 Subject: [PATCH 60/74] Without lowsyslog() *llerr() is not useful. Eliminate and replace with *err(). --- examples/cc3000/telnetd_daemon.c | 15 ++++++--------- examples/cc3000/telnetd_driver.c | 16 ++++++++-------- netutils/ftpc/ftpc_transfer.c | 2 +- netutils/telnetd/telnetd_daemon.c | 17 +++++++---------- netutils/thttpd/thttpd_cgi.c | 30 +++++++++++++++--------------- 5 files changed, 37 insertions(+), 43 deletions(-) diff --git a/examples/cc3000/telnetd_daemon.c b/examples/cc3000/telnetd_daemon.c index 893e34c1b..33a83ed59 100644 --- a/examples/cc3000/telnetd_daemon.c +++ b/examples/cc3000/telnetd_daemon.c @@ -160,10 +160,7 @@ static int telnetd_daemon(int argc, char *argv[]) goto errout_with_socket; } - /* Now go silent. Only the llerr family of debug functions should - * be used after this point because these do not depend on stdout - * being available. - */ + /* Now go silent. */ #ifndef CONFIG_DEBUG_FEATURES close(0); @@ -181,7 +178,7 @@ static int telnetd_daemon(int argc, char *argv[]) acceptsd = accept(listensd, (struct sockaddr*)&myaddr, &addrlen); if (acceptsd < 0) { - nllerr("ERROR: accept failed: %d\n", errno); + nerr("ERROR: accept failed: %d\n", errno); goto errout_with_socket; } @@ -192,7 +189,7 @@ static int telnetd_daemon(int argc, char *argv[]) ling.l_linger = 30; /* timeout is seconds */ if (setsockopt(acceptsd, SOL_SOCKET, SO_LINGER, &ling, sizeof(struct linger)) < 0) { - nllerr("ERROR: setsockopt failed: %d\n", errno); + nerr("ERROR: setsockopt failed: %d\n", errno); goto errout_with_acceptsd; } #endif @@ -203,7 +200,7 @@ static int telnetd_daemon(int argc, char *argv[]) devpath = telnetd_driver(acceptsd, daemon); if (devpath == NULL) { - nllerr("ERROR: telnetd_driver failed\n"); + nerr("ERROR: telnetd_driver failed\n"); goto errout_with_acceptsd; } @@ -213,7 +210,7 @@ static int telnetd_daemon(int argc, char *argv[]) drvrfd = open(devpath, O_RDWR); if (drvrfd < 0) { - nllerr("ERROR: Failed to open %s: %d\n", devpath, errno); + nerr("ERROR: Failed to open %s: %d\n", devpath, errno); goto errout_with_acceptsd; } @@ -243,7 +240,7 @@ static int telnetd_daemon(int argc, char *argv[]) daemon->entry, NULL); if (pid < 0) { - nllerr("ERROR: Failed start the telnet session: %d\n", errno); + nerr("ERROR: Failed start the telnet session: %d\n", errno); goto errout_with_acceptsd; } diff --git a/examples/cc3000/telnetd_driver.c b/examples/cc3000/telnetd_driver.c index dfaad577e..cbcab1906 100644 --- a/examples/cc3000/telnetd_driver.c +++ b/examples/cc3000/telnetd_driver.c @@ -397,7 +397,7 @@ static void telnetd_sendopt(FAR struct telnetd_dev_s *priv, uint8_t option, telnetd_dumpbuffer("Send optbuf", optbuf, 4); if (send(priv->td_psock, optbuf, 4, 0) < 0) { - nllerr("ERROR: Failed to send TELNET_IAC\n"); + nerr("ERROR: Failed to send TELNET_IAC\n"); } } @@ -498,7 +498,7 @@ static int telnetd_close(FAR struct file *filep) ret = asprintf(&devpath, TELNETD_DEVFMT, priv->td_minor); if (ret < 0) { - nllerr("ERROR: Failed to allocate the driver path\n"); + nerr("ERROR: Failed to allocate the driver path\n"); } else { @@ -507,7 +507,7 @@ static int telnetd_close(FAR struct file *filep) ret = unregister_driver(devpath); if (ret < 0) { - nllerr("ERROR: Failed to unregister the driver %s: %d\n", devpath, ret); + nerr("ERROR: Failed to unregister the driver %s: %d\n", devpath, ret); } free(devpath); @@ -645,7 +645,7 @@ static ssize_t telnetd_write(FAR struct file *filep, FAR const char *buffer, siz ret = send(priv->td_psock, priv->td_txbuffer, ncopied, 0); if (ret < 0) { - nllerr("ERROR: psock_send failed '%s': %d\n", priv->td_txbuffer, ret); + nerr("ERROR: psock_send failed '%s': %d\n", priv->td_txbuffer, ret); return ret; } @@ -662,7 +662,7 @@ static ssize_t telnetd_write(FAR struct file *filep, FAR const char *buffer, siz ret = send(priv->td_psock, priv->td_txbuffer, ncopied, 0); if (ret < 0) { - nllerr("ERROR: psock_send failed '%s': %d\n", priv->td_txbuffer, ret); + nerr("ERROR: psock_send failed '%s': %d\n", priv->td_txbuffer, ret); return ret; } } @@ -750,7 +750,7 @@ FAR char *telnetd_driver(long sd, FAR struct telnetd_s *daemon) priv = (FAR struct telnetd_dev_s*)malloc(sizeof(struct telnetd_dev_s)); if (!priv) { - nllerr("ERROR: Failed to allocate the driver data structure\n"); + nerr("ERROR: Failed to allocate the driver data structure\n"); return NULL; } @@ -786,7 +786,7 @@ FAR char *telnetd_driver(long sd, FAR struct telnetd_s *daemon) ret = asprintf(&devpath, TELNETD_DEVFMT, priv->td_minor); if (ret < 0) { - nllerr("ERROR: Failed to allocate the driver path\n"); + nerr("ERROR: Failed to allocate the driver path\n"); goto errout_with_dev; } @@ -795,7 +795,7 @@ FAR char *telnetd_driver(long sd, FAR struct telnetd_s *daemon) ret = register_driver(devpath, &g_telnetdfops, 0666, priv); if (ret < 0) { - nllerr("ERROR: Failed to register the driver %s: %d\n", devpath, ret); + nerr("ERROR: Failed to register the driver %s: %d\n", devpath, ret); goto errout_with_devpath; } diff --git a/netutils/ftpc/ftpc_transfer.c b/netutils/ftpc/ftpc_transfer.c index 10ef51a10..bbacc198e 100644 --- a/netutils/ftpc/ftpc_transfer.c +++ b/netutils/ftpc/ftpc_transfer.c @@ -475,7 +475,7 @@ void ftpc_timeout(int argc, uint32_t arg1, ...) { FAR struct ftpc_session_s *session = (FAR struct ftpc_session_s *)arg1; - nllerr("ERROR: Timeout!\n"); + nerr("ERROR: Timeout!\n"); DEBUGASSERT(argc == 1 && session); kill(session->pid, CONFIG_FTP_SIGNAL); } diff --git a/netutils/telnetd/telnetd_daemon.c b/netutils/telnetd/telnetd_daemon.c index 69815f346..41b3629fa 100644 --- a/netutils/telnetd/telnetd_daemon.c +++ b/netutils/telnetd/telnetd_daemon.c @@ -226,10 +226,7 @@ static int telnetd_daemon(int argc, char *argv[]) goto errout_with_socket; } - /* Now go silent. Only the llerr family of debug functions should - * be used after this point because these do not depend on stdout - * being available. - */ + /* Now go silent. */ #ifndef CONFIG_DEBUG_FEATURES close(0); @@ -259,7 +256,7 @@ static int telnetd_daemon(int argc, char *argv[]) } else { - nllerr("ERROR: accept failed: %d\n", errval); + nerr("ERROR: accept failed: %d\n", errval); goto errout_with_socket; } } @@ -271,7 +268,7 @@ static int telnetd_daemon(int argc, char *argv[]) ling.l_linger = 30; /* timeout is seconds */ if (setsockopt(acceptsd, SOL_SOCKET, SO_LINGER, &ling, sizeof(struct linger)) < 0) { - nllerr("ERROR: setsockopt failed: %d\n", errno); + nerr("ERROR: setsockopt failed: %d\n", errno); goto errout_with_acceptsd; } #endif @@ -281,7 +278,7 @@ static int telnetd_daemon(int argc, char *argv[]) fd = open("/dev/telnet", O_RDONLY); if (fd < 0) { - nllerr("ERROR: open(/dev/telnet) failed: %d\n", errno); + nerr("ERROR: open(/dev/telnet) failed: %d\n", errno); goto errout_with_acceptsd; } @@ -297,7 +294,7 @@ static int telnetd_daemon(int argc, char *argv[]) if (ret < 0) { - nllerr("ERROR: open(/dev/telnet) failed: %d\n", errno); + nerr("ERROR: open(/dev/telnet) failed: %d\n", errno); goto errout_with_acceptsd; } @@ -307,7 +304,7 @@ static int telnetd_daemon(int argc, char *argv[]) drvrfd = open(session.ts_devpath, O_RDWR); if (drvrfd < 0) { - nllerr("ERROR: Failed to open %s: %d\n", session.ts_devpath, errno); + nerr("ERROR: Failed to open %s: %d\n", session.ts_devpath, errno); goto errout_with_acceptsd; } @@ -333,7 +330,7 @@ static int telnetd_daemon(int argc, char *argv[]) daemon->entry, NULL); if (pid < 0) { - nllerr("ERROR: Failed start the telnet session: %d\n", errno); + nerr("ERROR: Failed start the telnet session: %d\n", errno); goto errout_with_acceptsd; } diff --git a/netutils/thttpd/thttpd_cgi.c b/netutils/thttpd/thttpd_cgi.c index 6487ec861..123c5a6e7 100644 --- a/netutils/thttpd/thttpd_cgi.c +++ b/netutils/thttpd/thttpd_cgi.c @@ -378,7 +378,7 @@ static inline int cgi_interpose_input(struct cgi_conn_s *cc) { if (errno != EINTR) { - nllerr("ERROR: read failed: %d\n", errno); + nerr("ERROR: read failed: %d\n", errno); return 1; } } @@ -391,7 +391,7 @@ static inline int cgi_interpose_input(struct cgi_conn_s *cc) ninfo("nbytes_written: %d\n", nbytes_written); if (nbytes_written != nbytes_read) { - nllerr("ERROR: httpd_write failed\n"); + nerr("ERROR: httpd_write failed\n"); return 1; } cgi_dumpbuffer("Sent to CGI:", cc->inbuf.buffer, nbytes_written); @@ -469,7 +469,7 @@ static inline int cgi_interpose_output(struct cgi_conn_s *cc) { if (errno != EAGAIN) { - nllerr("ERROR: read: %d\n", errno); + nerr("ERROR: read: %d\n", errno); } return 1; } @@ -651,7 +651,7 @@ static inline int cgi_interpose_output(struct cgi_conn_s *cc) { if (errno != EAGAIN) { - nllerr("ERROR: read: %d\n", errno); + nerr("ERROR: read: %d\n", errno); } return 1; } @@ -720,7 +720,7 @@ static int cgi_child(int argc, char **argv) cc = (FAR struct cgi_conn_s*)httpd_malloc(sizeof(struct cgi_conn_s)); if (!cc) { - nllerr("ERROR: cgi_conn allocation failed\n"); + nerr("ERROR: cgi_conn allocation failed\n"); close(hc->conn_fd); goto errout; } @@ -768,7 +768,7 @@ static int cgi_child(int argc, char **argv) ret = pipe(pipefd); if (ret < 0) { - nllerr("ERROR: STDIN pipe: %d\n", errno); + nerr("ERROR: STDIN pipe: %d\n", errno); goto errout_with_cgiconn; } else @@ -784,7 +784,7 @@ static int cgi_child(int argc, char **argv) if (ret < 0) { - nllerr("ERROR: STDIN dup2: %d\n", errno); + nerr("ERROR: STDIN dup2: %d\n", errno); goto errout_with_descriptors; } } @@ -799,7 +799,7 @@ static int cgi_child(int argc, char **argv) ret = pipe(pipefd); if (ret < 0) { - nllerr("ERROR: STDOUT pipe: %d\n", errno); + nerr("ERROR: STDOUT pipe: %d\n", errno); goto errout_with_descriptors; } else @@ -815,7 +815,7 @@ static int cgi_child(int argc, char **argv) if (ret < 0) { - nllerr("ERROR: STDOUT dup2: %d\n", errno); + nerr("ERROR: STDOUT dup2: %d\n", errno); goto errout_with_descriptors; } } @@ -842,7 +842,7 @@ static int cgi_child(int argc, char **argv) httpd_realloc_str(&cc->outbuf.buffer, &cc->outbuf.size, CONFIG_THTTPD_CGIOUTBUFFERSIZE); if (!cc->outbuf.buffer) { - nllerr("ERROR: hdr allocation failed\n"); + nerr("ERROR: hdr allocation failed\n"); goto errout_with_descriptors; } @@ -851,7 +851,7 @@ static int cgi_child(int argc, char **argv) fw = fdwatch_initialize(2); if (!fw) { - nllerr("ERROR: fdwatch allocation failed\n"); + nerr("ERROR: fdwatch allocation failed\n"); goto errout_with_outbuffer; } @@ -868,7 +868,7 @@ static int cgi_child(int argc, char **argv) { /* Something went wrong. */ - nllerr("ERROR: execve %s: %d\n", hc->expnfilename, errno); + nerr("ERROR: execve %s: %d\n", hc->expnfilename, errno); goto errout_with_watch; } @@ -878,7 +878,7 @@ static int cgi_child(int argc, char **argv) client_data.i = child; if (tmr_create(NULL, cgi_kill, client_data, CONFIG_THTTPD_CGI_TIMELIMIT * 1000L, 0) == NULL) { - nllerr("ERROR: tmr_create(cgi_kill child) failed\n"); + nerr("ERROR: tmr_create(cgi_kill child) failed\n"); goto errout_with_watch; } #endif @@ -896,7 +896,7 @@ static int cgi_child(int argc, char **argv) { if (httpd_write(cc->wrfd, &(hc->read_buf[hc->checked_idx]), nbytes) != nbytes) { - nllerr("ERROR: httpd_write failed\n"); + nerr("ERROR: httpd_write failed\n"); return 1; } } @@ -1077,7 +1077,7 @@ static void cgi_kill(ClientData client_data, struct timeval *nowP) ninfo("Killing CGI child: %d\n", pid); if (task_delete(pid) != 0) { - nllerr("ERROR: task_delete() failed: %d\n", errno); + nerr("ERROR: task_delete() failed: %d\n", errno); } } #endif From 6e94c465da54c91bcfff3db34d343c5af05c4928 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 20 Jun 2016 12:49:26 -0600 Subject: [PATCH 61/74] Update ChangeLog --- ChangeLog.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ChangeLog.txt b/ChangeLog.txt index c8dea934c..d8ed157b2 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1643,3 +1643,5 @@ * Change some *err() message to *info() messages if what was a *dbg() message does not indicate and error condition (2016-06-14). * Add _ to front of debug macros (2016-06-16). + * SYSLOG: Remove llinfo(), *llwarn(), and llerr(). These are no longer + supported in the redesigned syslog() logic (2016-06-20). From 1ea1cc5cdedfa2b65c19f7a852f8b8a43bbb46e5 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 20 Jun 2016 16:31:47 -0600 Subject: [PATCH 62/74] Fix fwdbg vs fwerr naming inconsisency --- netutils/thttpd/fdwatch.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/netutils/thttpd/fdwatch.c b/netutils/thttpd/fdwatch.c index 221e41065..f01f3f66e 100644 --- a/netutils/thttpd/fdwatch.c +++ b/netutils/thttpd/fdwatch.c @@ -62,18 +62,18 @@ #ifdef CONFIG_THTTPD_FDWATCH_DEBUG # ifdef CONFIG_CPP_HAVE_VARARGS -# define fwdbg(format, ...) nerr(format, ##__VA_ARGS__) +# define fderr(format, ...) nerr(format, ##__VA_ARGS__) # define fwinfo(format, ...) ninfo(format, ##__VA_ARGS__) # else -# define fwdbg nerr +# define fderr nerr # define fwinfo ninfo # endif #else # ifdef CONFIG_CPP_HAVE_VARARGS -# define fwdbg(x...) +# define fderr(x...) # define fwinfo(x...) # else -# define fwdbg (void) +# define fderr (void) # define fwinfo (void) # endif #endif From 2ee4ced33b0badef5ec3e4e24d8139eb119dfd6c Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 21 Jun 2016 18:10:07 -0600 Subject: [PATCH 63/74] Typo: fwerr, not fderr --- netutils/thttpd/fdwatch.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/netutils/thttpd/fdwatch.c b/netutils/thttpd/fdwatch.c index f01f3f66e..a4f913131 100644 --- a/netutils/thttpd/fdwatch.c +++ b/netutils/thttpd/fdwatch.c @@ -62,18 +62,18 @@ #ifdef CONFIG_THTTPD_FDWATCH_DEBUG # ifdef CONFIG_CPP_HAVE_VARARGS -# define fderr(format, ...) nerr(format, ##__VA_ARGS__) +# define fwerr(format, ...) nerr(format, ##__VA_ARGS__) # define fwinfo(format, ...) ninfo(format, ##__VA_ARGS__) # else -# define fderr nerr +# define fwerr nerr # define fwinfo ninfo # endif #else # ifdef CONFIG_CPP_HAVE_VARARGS -# define fderr(x...) +# define fwerr(x...) # define fwinfo(x...) # else -# define fderr (void) +# define fwerr (void) # define fwinfo (void) # endif #endif From 0ad9aa35d4d39b295900ec6eeedd8d8663c90dd2 Mon Sep 17 00:00:00 2001 From: "Paul A. Patience" Date: Wed, 22 Jun 2016 08:03:59 -0400 Subject: [PATCH 64/74] apps/canutils/libcanard: update version --- canutils/libcanard/Kconfig | 4 ++-- canutils/libcanard/Makefile | 22 +++++++++++++++++----- include/canutils/.gitignore | 1 + 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/canutils/libcanard/Kconfig b/canutils/libcanard/Kconfig index e4635cb63..1b61d4ad9 100644 --- a/canutils/libcanard/Kconfig +++ b/canutils/libcanard/Kconfig @@ -6,7 +6,7 @@ config CANUTILS_LIBCANARD bool "libcanard UAVCAN Library" default n - depends on CAN && CAN_EXTID + depends on CAN && CAN_EXTID && !DISABLE_POLL ---help--- Enable the libcanard UAVCAN library. @@ -20,7 +20,7 @@ config LIBCANARD_URL config LIBCANARD_VERSION string "libcanard Version" - default "34195e7f13637bdc79198c94bd1b2e5ecffe9383" + default "a7a6d4c6b105976cccac36e05c42abee566b70c4" ---help--- libcanard version. diff --git a/canutils/libcanard/Makefile b/canutils/libcanard/Makefile index 9f15c15f3..a19dd99e5 100644 --- a/canutils/libcanard/Makefile +++ b/canutils/libcanard/Makefile @@ -44,9 +44,14 @@ LIBCANARD_URL = $(patsubst "%",%,$(strip $(CONFIG_LIBCANARD_URL))) LIBCANARD_VERSION = $(patsubst "%",%,$(strip $(CONFIG_LIBCANARD_VERSION))) LIBCANARD_UNPACKNAME = libcanard-$(LIBCANARD_VERSION) LIBCANARD_PACKNAME = $(LIBCANARD_UNPACKNAME)$(PACKEXT) -LIBCANARD_SRCDIR = $(LIBCANARD_UNPACKNAME)$(DELIM)src +LIBCANARD_SRCDIR = $(LIBCANARD_UNPACKNAME) +LIBCANARD_DRVDIR = $(LIBCANARD_SRCDIR)$(DELIM)drivers$(DELIM)nuttx -CSRCS = $(LIBCANARD_SRCDIR)$(DELIM)canard.c +APPS_INCDIR = $(APPDIR)$(DELIM)include$(DELIM)canutils + +CFLAGS += -I$(APPS_INCDIR) + +CSRCS = $(LIBCANARD_SRCDIR)$(DELIM)canard.c $(LIBCANARD_DRVDIR)$(DELIM)nuttx.c COBJS = $(CSRCS:.c=$(OBJEXT)) SRCS = $(CSRCS) @@ -71,12 +76,18 @@ $(LIBCANARD_PACKNAME): $(LIBCANARD_UNPACKNAME): $(LIBCANARD_PACKNAME) @echo "Unpacking: $< -> $@" + $(call DELDIR, $@) $(Q) $(UNPACK) $< $(Q) touch $@ $(LIBCANARD_SRCDIR)$(DELIM)canard.h: $(LIBCANARD_UNPACKNAME) -$(APPDIR)$(DELIM)include$(DELIM)canutils$(DELIM)canard.h: $(LIBCANARD_SRCDIR)$(DELIM)canard.h +$(LIBCANARD_DRVDIR)$(DELIM)canard_nuttx.h: $(LIBCANARD_UNPACKNAME) + +$(APPS_INCDIR)$(DELIM)canard.h: $(LIBCANARD_SRCDIR)$(DELIM)canard.h + $(Q) cp $< $@ + +$(APPS_INCDIR)$(DELIM)canard_nuttx.h: $(LIBCANARD_DRVDIR)$(DELIM)canard_nuttx.h $(Q) cp $< $@ $(COBJS): %$(OBJEXT): %.c @@ -88,7 +99,7 @@ $(COBJS): %$(OBJEXT): %.c install: -context: $(APPDIR)$(DELIM)include$(DELIM)canutils$(DELIM)canard.h +context: $(APPS_INCDIR)$(DELIM)canard.h $(APPS_INCDIR)$(DELIM)canard_nuttx.h .depend: Makefile $(SRCS) $(Q) $(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep @@ -104,7 +115,8 @@ clean: distclean: clean $(call DELFILE, Make.dep) $(call DELFILE, .depend) - $(call DELFILE, $(APPDIR)$(DELIM)include$(DELIM)canutils$(DELIM)canard.h) + $(call DELFILE, $(APPS_INCDIR)$(DELIM)canard.h) + $(call DELFILE, $(APPS_INCDIR)$(DELIM)canard_nuttx.h) $(call DELDIR, $(LIBCANARD_UNPACKNAME)) $(call DELFILE, $(LIBCANARD_PACKNAME)) diff --git a/include/canutils/.gitignore b/include/canutils/.gitignore index 369d64802..4396c63a2 100644 --- a/include/canutils/.gitignore +++ b/include/canutils/.gitignore @@ -1 +1,2 @@ /canard.h +/canard_nuttx.h From fa4cd10d33c9790bf49997aaa871ee5a2df71be3 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 23 Jun 2016 08:04:33 -0600 Subject: [PATCH 65/74] Trivial modification of debug statement --- nshlib/nsh_fscmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nshlib/nsh_fscmds.c b/nshlib/nsh_fscmds.c index 49ea07bfa..fe814bb19 100644 --- a/nshlib/nsh_fscmds.c +++ b/nshlib/nsh_fscmds.c @@ -1293,7 +1293,7 @@ int cmd_mkrd(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) #ifdef CONFIG_DEBUG_INFO memset(buffer, 0, sectsize * nsectors); #endif - _info("RAMDISK at %p\n", buffer); + finfo("RAMDISK at %p\n", buffer); /* Then register the ramdisk */ From 546c3819827ade55d599deebb321cd660f01a016 Mon Sep 17 00:00:00 2001 From: Sebastien Lorquet Date: Thu, 23 Jun 2016 08:04:37 -0600 Subject: [PATCH 66/74] apps/examplex/can: Some variables were not declared in all required cases. --- examples/can/can_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/can/can_main.c b/examples/can/can_main.c index 954fb737d..09054a497 100644 --- a/examples/can/can_main.c +++ b/examples/can/can_main.c @@ -175,10 +175,10 @@ int can_main(int argc, FAR char *argv[]) #endif long minid = 1; long maxid = MAX_ID; - int msgdlc; uint8_t msgdata; - int i; #endif + int msgdlc; + int i; #ifdef CONFIG_EXAMPLES_CAN_READ struct can_msg_s rxmsg; From c470872dae068f6106c09ba8449007fef011d742 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 23 Jun 2016 09:35:04 -0600 Subject: [PATCH 67/74] apps/platform/Kconfig: Fix an inclusion error. Was including /platform/mikroe-stm32f4/Kconfig. Should include through the symbolic link /platform/board/Kconfig --- platform/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/Kconfig b/platform/Kconfig index 8fd145b6e..844dcc939 100644 --- a/platform/Kconfig +++ b/platform/Kconfig @@ -16,6 +16,6 @@ config PLATFORM_CONFIGDATA volatile storage can be used: A file, EEPROM, hardcoded values in FLASH, etc. -source "$APPSDIR/platform/mikroe-stm32f4/Kconfig" +source "$APPSDIR/platform/board/Kconfig" endmenu # Platform-specific Support From 5db022c65c26efa61621154a49d6cae88c2e4975 Mon Sep 17 00:00:00 2001 From: Alan Carvalho de Assis Date: Thu, 23 Jun 2016 16:22:13 -0600 Subject: [PATCH 68/74] apps/gpsutils/minmean: Fix minmea Makefile to find the libapp at the apps/ --- gpsutils/minmea/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gpsutils/minmea/Makefile b/gpsutils/minmea/Makefile index 541124121..0a97cdbc8 100644 --- a/gpsutils/minmea/Makefile +++ b/gpsutils/minmea/Makefile @@ -51,12 +51,12 @@ SRCS = $(ASRCS) $(CSRCS) OBJS = $(AOBJS) $(COBJS) ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif From c048da320c64396b465820dd14d6e00563778990 Mon Sep 17 00:00:00 2001 From: Sebastien Lorquet Date: Fri, 24 Jun 2016 10:45:45 +0200 Subject: [PATCH 69/74] Basic CAN utility library --- canutils/canlib/.built | 0 canutils/canlib/Kconfig | 17 +++ canutils/canlib/Make.defs | 39 ++++++ canutils/canlib/Makefile | 45 +++++++ canutils/canlib/canlib_getbaud.c | 82 ++++++++++++ canutils/canlib/canlib_getloopback.c | 83 ++++++++++++ canutils/canlib/canlib_getsilent.c | 84 ++++++++++++ canutils/canlib/canlib_setbaud.c | 87 ++++++++++++ canutils/canlib/canlib_setloopback.c | 89 +++++++++++++ canutils/canlib/canlib_setsilent.c | 89 +++++++++++++ include/canutils/canlib.h | 190 +++++++++++++++++++++++++++ 11 files changed, 805 insertions(+) create mode 100644 canutils/canlib/.built create mode 100644 canutils/canlib/Kconfig create mode 100644 canutils/canlib/Make.defs create mode 100644 canutils/canlib/Makefile create mode 100644 canutils/canlib/canlib_getbaud.c create mode 100644 canutils/canlib/canlib_getloopback.c create mode 100644 canutils/canlib/canlib_getsilent.c create mode 100644 canutils/canlib/canlib_setbaud.c create mode 100644 canutils/canlib/canlib_setloopback.c create mode 100644 canutils/canlib/canlib_setsilent.c create mode 100644 include/canutils/canlib.h diff --git a/canutils/canlib/.built b/canutils/canlib/.built new file mode 100644 index 000000000..e69de29bb diff --git a/canutils/canlib/Kconfig b/canutils/canlib/Kconfig new file mode 100644 index 000000000..0eab8a07f --- /dev/null +++ b/canutils/canlib/Kconfig @@ -0,0 +1,17 @@ +# +# For a description of the syntax of this configuration file, +# see the file kconfig-language.txt in the NuttX tools repository. +# + +config CANUTILS_CANLIB + bool "CAN utility library" + default n + depends on CAN && LIB_BOARDCTL + select BOARDCTL_CANINIT + ---help--- + Enable the CAN utility library + +if CANUTILS_CANLIB + +endif + diff --git a/canutils/canlib/Make.defs b/canutils/canlib/Make.defs new file mode 100644 index 000000000..1000b8855 --- /dev/null +++ b/canutils/canlib/Make.defs @@ -0,0 +1,39 @@ +############################################################################ +# apps/examples/can/Make.defs +# Adds selected applications to apps/ build +# +# Copyright (C) 2015 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +ifeq ($(CONFIG_CANUTILS_CANLIB),y) +CONFIGURED_APPS += canutils/canlib +endif diff --git a/canutils/canlib/Makefile b/canutils/canlib/Makefile new file mode 100644 index 000000000..ada335b1b --- /dev/null +++ b/canutils/canlib/Makefile @@ -0,0 +1,45 @@ +############################################################################ +# apps/canutils/canlib/Makefile +# +# Copyright (C) 2016 Sebastien Lorquet. All rights reserved. +# Author: Sebastien Lorquet +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +-include $(TOPDIR)/Make.defs + +# CAN utility library + +ASRCS = +CSRCS = canlib_getbaud.c canlib_setbaud.c +CSRCS+= canlib_getloopback.c canlib_setloopback.c +CSRCS+= canlib_getsilent.c canlib_setsilent.c + +include $(APPDIR)/Application.mk diff --git a/canutils/canlib/canlib_getbaud.c b/canutils/canlib/canlib_getbaud.c new file mode 100644 index 000000000..59cdc0d38 --- /dev/null +++ b/canutils/canlib/canlib_getbaud.c @@ -0,0 +1,82 @@ +/**************************************************************************** + * canutils/canlib/canlib_getbaud.c + * + * Copyright (C) 2016 Sebastien Lorquet. All rights reserved. + * Author: Sebastien Lorquet + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include + +#include +#include +#include +#include +#include + +/**************************************************************************** + * Name: canlib_getbaud + * + * Description: + * Wrapper for CANIOC_GET_BITTIMING + * + * Input Parameter: + * fd - file descriptor of an opened can device + * baud - pointer to a buffer to store the current baud rate + * + * Returned Value: + * Zero (OK) is returned on success. Otherwise -1 (ERROR) + * is returned with the errno variable set to indicate the + * nature of the error. + * + ****************************************************************************/ + +int canlib_getbaud(int fd, FAR int *bauds) +{ + int ret; + struct canioc_bittiming_s timings; + + ret = ioctl(fd, CANIOC_GET_BITTIMING, (unsigned long)&timings); + if (ret!=OK) + { + canerr("CANIOC_GET_BITTIMING failed, errno=%d\n", errno); + return 0; + } + + *bauds = timings.bt_baud; + + return ret; +} diff --git a/canutils/canlib/canlib_getloopback.c b/canutils/canlib/canlib_getloopback.c new file mode 100644 index 000000000..7fa29f95c --- /dev/null +++ b/canutils/canlib/canlib_getloopback.c @@ -0,0 +1,83 @@ +/**************************************************************************** + * canutils/canlib/canlib_getloopback.c + * + * Copyright (C) 2016 Sebastien Lorquet. All rights reserved. + * Author: Sebastien Lorquet + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include + +#include +#include +#include +#include +#include +#include + +/**************************************************************************** + * Name: canlib_getloopback + * + * Description: + * Wrapper for CANIOC_GET_CONNMODES. + * + * Input Parameter: + * fd - file descriptor of an opened can device + * loopback - pointer to a buffer to store the current loopback mode state. + * + * Returned Value: + * Zero (OK) is returned on success. Otherwise -1 (ERROR) + * is returned with the errno variable set to indicate the + * nature of the error. + * + ****************************************************************************/ + +int canlib_getloopback(int fd, FAR bool *loopback) +{ + int ret; + struct canioc_connmodes_s connmodes; + + ret = ioctl(fd, CANIOC_GET_CONNMODES, (unsigned long)&connmodes); + if (ret!=OK) + { + canerr("CANIOC_GET_CONNMODES failed, errno=%d\n", errno); + return FALSE; + } + + *loopback = (bool)connmodes.bm_loopback; + + return ret; +} diff --git a/canutils/canlib/canlib_getsilent.c b/canutils/canlib/canlib_getsilent.c new file mode 100644 index 000000000..1e855e739 --- /dev/null +++ b/canutils/canlib/canlib_getsilent.c @@ -0,0 +1,84 @@ +/**************************************************************************** + * canutils/canlib/canlib_getsilent.c + * + * Copyright (C) 2016 Sebastien Lorquet. All rights reserved. + * Author: Sebastien Lorquet + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include + +#include +#include +#include +#include +#include +#include + +/**************************************************************************** + * Name: canlib_getsilent + * + * Description: + * Wrapper for CANIOC_GET_CONNMODES. + * + * Input Parameter: + * fd - file descriptor of an opened can device + * loopback - pointer to a buffer to store the current silent mode state. + * + * Returned Value: + * Zero (OK) is returned on success. Otherwise -1 (ERROR) + * is returned with the errno variable set to indicate the + * nature of the error. + * + ****************************************************************************/ + +int canlib_getsilent(int fd, FAR bool *silent) +{ + int ret; + struct canioc_connmodes_s connmodes; + + ret = ioctl(fd, CANIOC_GET_CONNMODES, (unsigned long)&connmodes); + if (ret!=OK) + { + canerr("CANIOC_GET_CONNMODES failed, errno=%d\n", errno); + return FALSE; + } + + *silent = (bool)connmodes.bm_silent; + + return ret; +} + diff --git a/canutils/canlib/canlib_setbaud.c b/canutils/canlib/canlib_setbaud.c new file mode 100644 index 000000000..88998edd8 --- /dev/null +++ b/canutils/canlib/canlib_setbaud.c @@ -0,0 +1,87 @@ +/**************************************************************************** + * canutils/canlib/canlib_setbaud.c + * + * Copyright (C) 2016 Sebastien Lorquet. All rights reserved. + * Author: Sebastien Lorquet + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include + +#include +#include +#include +#include +#include + +/**************************************************************************** + * Name: canlib_setbaud + * + * Description: + * Wrapper for CANIOC_SET_BITTIMING + * + * Input Parameter: + * fd - file descriptor of an opened can device + * baud - baud rate to use on the CAN bus + * + * Returned Value: + * Zero (OK) is returned on success. Otherwise -1 (ERROR) + * is returned with the errno variable set to indicate the + * nature of the error. + * + ****************************************************************************/ + +int canlib_setbaud(int fd, int bauds) +{ + int ret; + struct canioc_bittiming_s timings; + + ret = ioctl(fd, CANIOC_GET_BITTIMING, (unsigned long)&timings); + if (ret!=OK) + { + canerr("CANIOC_GET_BITTIMING failed, errno=%d\n", errno); + return ret; + } + + timings.bt_baud = bauds; + ret = ioctl(fd, CANIOC_SET_BITTIMING, (unsigned long)&timings); + + if (ret!=OK) + { + canerr("CANIOC_SET_BITTIMING failed, errno=%d\n", errno); + } + return ret; +} diff --git a/canutils/canlib/canlib_setloopback.c b/canutils/canlib/canlib_setloopback.c new file mode 100644 index 000000000..717568d8d --- /dev/null +++ b/canutils/canlib/canlib_setloopback.c @@ -0,0 +1,89 @@ +/**************************************************************************** + * canutils/canlib/canlib_setloopback.c + * + * Copyright (C) 2016 Sebastien Lorquet. All rights reserved. + * Author: Sebastien Lorquet + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include + +#include +#include +#include +#include +#include +#include + +/**************************************************************************** + * Name: canlib_setloopback + * + * Description: + * Wrapper for CANIOC_SET_CONNMODES. When loopback mode is enabled, the CAN + * peripheral transmits on the bus, but only receives its own sent messages. + * + * Input Parameter: + * fd - file descriptor of an opened can device + * loopback - wether to use loopback mode. + * + * Returned Value: + * Zero (OK) is returned on success. Otherwise -1 (ERROR) + * is returned with the errno variable set to indicate the + * nature of the error. + * + ****************************************************************************/ + +int canlib_setloopback(int fd, bool loopback) +{ + int ret; + struct canioc_connmodes_s connmodes; + + ret = ioctl(fd, CANIOC_GET_CONNMODES, (unsigned long)&connmodes); + if (ret!=OK) + { + canerr("CANIOC_GET_CONNMODES failed, errno=%d\n", errno); + return ret; + } + + connmodes.bm_loopback = !!loopback; + ret = ioctl(fd, CANIOC_SET_CONNMODES, (unsigned long)&connmodes); + + if (ret!=OK) + { + canerr("CANIOC_SET_CONNMODES failed, errno=%d\n", errno); + } + return ret; +} diff --git a/canutils/canlib/canlib_setsilent.c b/canutils/canlib/canlib_setsilent.c new file mode 100644 index 000000000..4f0376481 --- /dev/null +++ b/canutils/canlib/canlib_setsilent.c @@ -0,0 +1,89 @@ +/**************************************************************************** + * canutils/canlib/canlib_setsilent.c + * + * Copyright (C) 2016 Sebastien Lorquet. All rights reserved. + * Author: Sebastien Lorquet + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include + +#include +#include +#include +#include +#include +#include + +/**************************************************************************** + * Name: canlib_setsilent + * + * Description: + * Wrapper for CANIOC_SET_CONNMODES. When silent mode is enabled, the CAN + * peripheral never transmits on the bus, but receives all bus traffic. + * + * Input Parameter: + * fd - file descriptor of an opened can device + * loopback - wether to use loopback mode. + * + * Returned Value: + * Zero (OK) is returned on success. Otherwise -1 (ERROR) + * is returned with the errno variable set to indicate the + * nature of the error. + * + ****************************************************************************/ + +int canlib_setsilent(int fd, bool silent) +{ + int ret; + struct canioc_connmodes_s connmodes; + + ret = ioctl(fd, CANIOC_GET_CONNMODES, (unsigned long)&connmodes); + if (ret!=OK) + { + canerr("CANIOC_GET_CONNMODES failed, errno=%d\n", errno); + return ret; + } + + connmodes.bm_silent = !!silent; + ret = ioctl(fd, CANIOC_SET_CONNMODES, (unsigned long)&connmodes); + + if (ret!=OK) + { + canerr("CANIOC_SET_CONNMODES failed, errno=%d\n", errno); + } + return ret; +} diff --git a/include/canutils/canlib.h b/include/canutils/canlib.h new file mode 100644 index 000000000..59befd8b3 --- /dev/null +++ b/include/canutils/canlib.h @@ -0,0 +1,190 @@ +/**************************************************************************** + * apps/include/canutils/canlib.h + * Various non-standard APIs to support canutils. All non-standard and + * intended only for internal use. + * + * Copyright (C) 2016 Sebastien Lorquet Nutt. All rights reserved. + * Author: Sebastien Lorquet + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * 3. The name of the author may not be used to endorse or promote + * products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +#ifndef __APPS_INCLUDE_CANUTILS_CANLIB_H +#define __APPS_INCLUDE_CANUTILS_CANLIB_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/**************************************************************************** + * Public Data + ****************************************************************************/ + +#undef EXTERN +#if defined(__cplusplus) +#define EXTERN extern "C" +extern "C" +{ +#else +#define EXTERN extern +#endif + +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +/**************************************************************************** + * Name: canlib_setbaud + * + * Description: + * Wrapper for CANIOC_SET_BITTIMING + * + * Input Parameter: + * fd - file descriptor of an opened can device + * baud - baud rate to use on the CAN bus + * + * Returned Value: + * Zero (OK) is returned on success. Otherwise -1 (ERROR) + * is returned with the errno variable set to indicate the + * nature of the error. + * + ****************************************************************************/ + +int canlib_setbaud(int fd, int bauds); + +/**************************************************************************** + * Name: canlib_getbaud + * + * Description: + * Wrapper for CANIOC_GET_BITTIMING + * + * Input Parameter: + * fd - file descriptor of an opened can device + * baud - pointer to a buffer to store the current baud rate + * + * Returned Value: + * Zero (OK) is returned on success. Otherwise -1 (ERROR) + * is returned with the errno variable set to indicate the + * nature of the error. + * + ****************************************************************************/ + +int canlib_getbaud(int fd, FAR int *bauds); + +/**************************************************************************** + * Name: canlib_setloopback + * + * Description: + * Wrapper for CANIOC_SET_CONNMODES. When loopback mode is enabled, the CAN + * peripheral transmits on the bus, but only receives its own sent messages. + * + * Input Parameter: + * fd - file descriptor of an opened can device + * loopback - wether to use loopback mode. + * + * Returned Value: + * Zero (OK) is returned on success. Otherwise -1 (ERROR) + * is returned with the errno variable set to indicate the + * nature of the error. + * + ****************************************************************************/ + +/**************************************************************************** + * Name: canlib_getloopback + * + * Description: + * Wrapper for CANIOC_GET_CONNMODES. + * + * Input Parameter: + * fd - file descriptor of an opened can device + * loopback - pointer to a buffer to store the current loopback mode state. + * + * Returned Value: + * Zero (OK) is returned on success. Otherwise -1 (ERROR) + * is returned with the errno variable set to indicate the + * nature of the error. + * + ****************************************************************************/ + +int canlib_setloopback(int fd, bool loop); + +int canlib_getloopback(int fd, FAR bool *loop); + +/**************************************************************************** + * Name: canlib_setsilent + * + * Description: + * Wrapper for CANIOC_SET_CONNMODES. When silent mode is enabled, the CAN + * peripheral never transmits on the bus, but receives all bus traffic. + * + * Input Parameter: + * fd - file descriptor of an opened can device + * loopback - wether to use loopback mode. + * + * Returned Value: + * Zero (OK) is returned on success. Otherwise -1 (ERROR) + * is returned with the errno variable set to indicate the + * nature of the error. + * + ****************************************************************************/ + +int canlib_setsilent(int fd, bool silent); + +/**************************************************************************** + * Name: canlib_getsilent + * + * Description: + * Wrapper for CANIOC_GET_CONNMODES. + * + * Input Parameter: + * fd - file descriptor of an opened can device + * loopback - pointer to a buffer to store the current silent mode state. + * + * Returned Value: + * Zero (OK) is returned on success. Otherwise -1 (ERROR) + * is returned with the errno variable set to indicate the + * nature of the error. + * + ****************************************************************************/ + +int canlib_getsilent(int fd, FAR bool *silent); + +#undef EXTERN +#ifdef __cplusplus +} +#endif + +#endif /* __APPS_INCLUDE_CANUTILS_CANLIB_H */ From 2dbed6449ea1104178ae81e44698fd3b6771d3ff Mon Sep 17 00:00:00 2001 From: Sebastien Lorquet Date: Fri, 24 Jun 2016 10:48:00 +0200 Subject: [PATCH 70/74] Remove useless file --- canutils/canlib/.built | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 canutils/canlib/.built diff --git a/canutils/canlib/.built b/canutils/canlib/.built deleted file mode 100644 index e69de29bb..000000000 From 42039f14a0c3a7c1e9d322df16acee4cc9b86388 Mon Sep 17 00:00:00 2001 From: Sebastien Lorquet Date: Fri, 24 Jun 2016 10:50:16 +0200 Subject: [PATCH 71/74] Fix make.defs copyright --- canutils/canlib/Make.defs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/canutils/canlib/Make.defs b/canutils/canlib/Make.defs index 1000b8855..f94a1d21e 100644 --- a/canutils/canlib/Make.defs +++ b/canutils/canlib/Make.defs @@ -1,9 +1,9 @@ ############################################################################ -# apps/examples/can/Make.defs +# apps/canutils/canlib/Make.defs # Adds selected applications to apps/ build # -# Copyright (C) 2015 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt +# Copyright (C) 2016 Sebastien Lorquet. All rights reserved. +# Author: Sebastien Lorquet # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions From da9a6826472b45cc58ba97b3cea58eb85bcbea1b Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 24 Jun 2016 07:10:33 -0600 Subject: [PATCH 72/74] Trivial changes from review of PR --- canutils/canlib/Kconfig | 1 - canutils/canlib/canlib_getbaud.c | 2 +- canutils/canlib/canlib_getloopback.c | 2 +- canutils/canlib/canlib_getsilent.c | 2 +- canutils/canlib/canlib_setbaud.c | 7 ++++--- canutils/canlib/canlib_setloopback.c | 7 ++++--- canutils/canlib/canlib_setsilent.c | 7 ++++--- 7 files changed, 15 insertions(+), 13 deletions(-) diff --git a/canutils/canlib/Kconfig b/canutils/canlib/Kconfig index 0eab8a07f..228a98544 100644 --- a/canutils/canlib/Kconfig +++ b/canutils/canlib/Kconfig @@ -14,4 +14,3 @@ config CANUTILS_CANLIB if CANUTILS_CANLIB endif - diff --git a/canutils/canlib/canlib_getbaud.c b/canutils/canlib/canlib_getbaud.c index 59cdc0d38..c123403a1 100644 --- a/canutils/canlib/canlib_getbaud.c +++ b/canutils/canlib/canlib_getbaud.c @@ -70,7 +70,7 @@ int canlib_getbaud(int fd, FAR int *bauds) struct canioc_bittiming_s timings; ret = ioctl(fd, CANIOC_GET_BITTIMING, (unsigned long)&timings); - if (ret!=OK) + if (ret != OK) { canerr("CANIOC_GET_BITTIMING failed, errno=%d\n", errno); return 0; diff --git a/canutils/canlib/canlib_getloopback.c b/canutils/canlib/canlib_getloopback.c index 7fa29f95c..ccff4ea4c 100644 --- a/canutils/canlib/canlib_getloopback.c +++ b/canutils/canlib/canlib_getloopback.c @@ -71,7 +71,7 @@ int canlib_getloopback(int fd, FAR bool *loopback) struct canioc_connmodes_s connmodes; ret = ioctl(fd, CANIOC_GET_CONNMODES, (unsigned long)&connmodes); - if (ret!=OK) + if (ret != OK) { canerr("CANIOC_GET_CONNMODES failed, errno=%d\n", errno); return FALSE; diff --git a/canutils/canlib/canlib_getsilent.c b/canutils/canlib/canlib_getsilent.c index 1e855e739..7b2eff1dc 100644 --- a/canutils/canlib/canlib_getsilent.c +++ b/canutils/canlib/canlib_getsilent.c @@ -71,7 +71,7 @@ int canlib_getsilent(int fd, FAR bool *silent) struct canioc_connmodes_s connmodes; ret = ioctl(fd, CANIOC_GET_CONNMODES, (unsigned long)&connmodes); - if (ret!=OK) + if (ret != OK) { canerr("CANIOC_GET_CONNMODES failed, errno=%d\n", errno); return FALSE; diff --git a/canutils/canlib/canlib_setbaud.c b/canutils/canlib/canlib_setbaud.c index 88998edd8..adb7804cb 100644 --- a/canutils/canlib/canlib_setbaud.c +++ b/canutils/canlib/canlib_setbaud.c @@ -70,18 +70,19 @@ int canlib_setbaud(int fd, int bauds) struct canioc_bittiming_s timings; ret = ioctl(fd, CANIOC_GET_BITTIMING, (unsigned long)&timings); - if (ret!=OK) + if (ret != OK) { canerr("CANIOC_GET_BITTIMING failed, errno=%d\n", errno); return ret; } timings.bt_baud = bauds; - ret = ioctl(fd, CANIOC_SET_BITTIMING, (unsigned long)&timings); - if (ret!=OK) + ret = ioctl(fd, CANIOC_SET_BITTIMING, (unsigned long)&timings); + if (ret != OK) { canerr("CANIOC_SET_BITTIMING failed, errno=%d\n", errno); } + return ret; } diff --git a/canutils/canlib/canlib_setloopback.c b/canutils/canlib/canlib_setloopback.c index 717568d8d..06e0822a5 100644 --- a/canutils/canlib/canlib_setloopback.c +++ b/canutils/canlib/canlib_setloopback.c @@ -72,18 +72,19 @@ int canlib_setloopback(int fd, bool loopback) struct canioc_connmodes_s connmodes; ret = ioctl(fd, CANIOC_GET_CONNMODES, (unsigned long)&connmodes); - if (ret!=OK) + if (ret != OK) { canerr("CANIOC_GET_CONNMODES failed, errno=%d\n", errno); return ret; } connmodes.bm_loopback = !!loopback; - ret = ioctl(fd, CANIOC_SET_CONNMODES, (unsigned long)&connmodes); - if (ret!=OK) + ret = ioctl(fd, CANIOC_SET_CONNMODES, (unsigned long)&connmodes); + if (ret != OK) { canerr("CANIOC_SET_CONNMODES failed, errno=%d\n", errno); } + return ret; } diff --git a/canutils/canlib/canlib_setsilent.c b/canutils/canlib/canlib_setsilent.c index 4f0376481..74629427e 100644 --- a/canutils/canlib/canlib_setsilent.c +++ b/canutils/canlib/canlib_setsilent.c @@ -72,18 +72,19 @@ int canlib_setsilent(int fd, bool silent) struct canioc_connmodes_s connmodes; ret = ioctl(fd, CANIOC_GET_CONNMODES, (unsigned long)&connmodes); - if (ret!=OK) + if (ret != OK) { canerr("CANIOC_GET_CONNMODES failed, errno=%d\n", errno); return ret; } connmodes.bm_silent = !!silent; - ret = ioctl(fd, CANIOC_SET_CONNMODES, (unsigned long)&connmodes); - if (ret!=OK) + ret = ioctl(fd, CANIOC_SET_CONNMODES, (unsigned long)&connmodes); + if (ret != OK) { canerr("CANIOC_SET_CONNMODES failed, errno=%d\n", errno); } + return ret; } From a2a9e20c65baa6d51c33a948d1058ad51ec22d97 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 24 Jun 2016 07:47:03 -0600 Subject: [PATCH 73/74] Move NSH stuff out of nuttx/configs/Kconfig to here. Why was it in the NuttX tree. --- nshlib/Kconfig | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/nshlib/Kconfig b/nshlib/Kconfig index c19b304f8..9443feae0 100644 --- a/nshlib/Kconfig +++ b/nshlib/Kconfig @@ -509,6 +509,34 @@ config NSH_DISABLE_XD endmenu +if MMCSD + +config NSH_MMCSDMINOR + int "MMC/SD minor number" + default 0 + ---help--- + If board-specific NSH start-up logic needs to mount an MMC/SD device, then the + setting should be provided to identify the MMC/SD minor device number (i.e., the N ini + /dev/mmcsdN). Default 0 + +config NSH_MMCSDSLOTNO + int "MMC/SD slot number" + default 0 + ---help--- + If board-specific NSH start-up supports more than one MMC/SD slot, then this setting + should be provided to indicate which slot should be used. Default: 0. + +config NSH_MMCSDSPIPORTNO + int "MMC/SD SPI device number" + default 0 + depends on MMCSD_SPI + ---help--- + If board-specif NSH start-up logic will mount an SPI-based MMC/SD volume, then this + setting may be needed to tell the board logic which SPI bus to use. Default: 0 + (meaning is board-specific). + +endif # MMCSD + menu "Configure Command Options" config NSH_CMDOPT_DF_H From abfcce226f915c4f6f0670f7688936846597adcd Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 24 Jun 2016 11:06:52 -0600 Subject: [PATCH 74/74] Update ChangeLog --- ChangeLog.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ChangeLog.txt b/ChangeLog.txt index d8ed157b2..81a5843aa 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1645,3 +1645,13 @@ * Add _ to front of debug macros (2016-06-16). * SYSLOG: Remove llinfo(), *llwarn(), and llerr(). These are no longer supported in the redesigned syslog() logic (2016-06-20). + * apps/canutils/libcanard: update version. From Paul Alexander Patience + (2016-06-22). + * apps/examples/can: Some variables were not declared in all required + cases. From Sebastien Lorquet (2016-06-23). + * apps/gpsutils/minmean: Fix minmea Makefile to find the libapp at the + apps/. From Alan Carvalho de Assis (2016-06-23). + * apps/canutils/canlib: Basic CAN utility library. From Sebastien Lorquet + (2016-06-24). + * apps/nshlib/Kconfig: Move NSH stuff out of nuttx/configs/Kconfig to + here. Why was it in the NuttX tree in the first place? (2016-06-24).