You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/11/12 14:29:13 UTC

[incubator-nuttx-apps] 02/05: system/sched_note/note_main.c: Change the priority of errors printed through syslog.

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git

commit 49866a8fe481ef343125dbbe994c1462dc39f64e
Author: Abdelatif Guettouche <ab...@espressif.com>
AuthorDate: Thu Nov 11 15:16:24 2021 +0100

    system/sched_note/note_main.c: Change the priority of errors printed
    through syslog.
    
    Errors should have LOG_ERR instead of LOG_INFO.
    
    Signed-off-by: Abdelatif Guettouche <ab...@espressif.com>
---
 system/sched_note/note_main.c | 34 +++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/system/sched_note/note_main.c b/system/sched_note/note_main.c
index 4189c77..87e3205 100644
--- a/system/sched_note/note_main.c
+++ b/system/sched_note/note_main.c
@@ -128,7 +128,7 @@ static void dump_notes(size_t nread)
 
               if (note->nc_length < sizeof(struct note_start_s))
                 {
-                  syslog(LOG_INFO,
+                  syslog(LOG_ERR,
                          "ERROR: note too small for start note: %d\n",
                          note->nc_length);
                   return;
@@ -168,7 +168,7 @@ static void dump_notes(size_t nread)
             {
               if (note->nc_length != sizeof(struct note_stop_s))
                 {
-                  syslog(LOG_INFO,
+                  syslog(LOG_ERR,
                          "ERROR: Size incorrect for stop note: %d\n",
                          note->nc_length);
                   return;
@@ -196,7 +196,7 @@ static void dump_notes(size_t nread)
 
               if (note->nc_length != sizeof(struct note_suspend_s))
                 {
-                  syslog(LOG_INFO,
+                  syslog(LOG_ERR,
                          "ERROR: Size incorrect for suspend note: %d\n",
                          note->nc_length);
                   return;
@@ -230,7 +230,7 @@ static void dump_notes(size_t nread)
             {
               if (note->nc_length != sizeof(struct note_resume_s))
                 {
-                  syslog(LOG_INFO,
+                  syslog(LOG_ERR,
                          "ERROR: Size incorrect for resume note: %d\n",
                          note->nc_length);
                   return;
@@ -259,7 +259,7 @@ static void dump_notes(size_t nread)
 
               if (note->nc_length != sizeof(struct note_cpu_start_s))
                 {
-                  syslog(LOG_INFO,
+                  syslog(LOG_ERR,
                          "ERROR: Size incorrect for CPU start note: %d\n",
                          note->nc_length);
                   return;
@@ -278,7 +278,7 @@ static void dump_notes(size_t nread)
             {
               if (note->nc_length != sizeof(struct note_cpu_started_s))
                 {
-                  syslog(LOG_INFO,
+                  syslog(LOG_ERR,
                          "ERROR: Size incorrect for CPU started note: %d\n",
                          note->nc_length);
                   return;
@@ -299,7 +299,7 @@ static void dump_notes(size_t nread)
 
               if (note->nc_length != sizeof(struct note_cpu_pause_s))
                 {
-                  syslog(LOG_INFO,
+                  syslog(LOG_ERR,
                          "ERROR: Size incorrect for CPU pause note: %d\n",
                          note->nc_length);
                   return;
@@ -318,7 +318,7 @@ static void dump_notes(size_t nread)
             {
               if (note->nc_length != sizeof(struct note_cpu_paused_s))
                 {
-                  syslog(LOG_INFO,
+                  syslog(LOG_ERR,
                          "ERROR: Size incorrect for CPU paused note: %d\n",
                          note->nc_length);
                   return;
@@ -339,7 +339,7 @@ static void dump_notes(size_t nread)
 
               if (note->nc_length != sizeof(struct note_cpu_resume_s))
                 {
-                  syslog(LOG_INFO,
+                  syslog(LOG_ERR,
                          "ERROR: Size incorrect for CPU resume note: %d\n",
                          note->nc_length);
                   return;
@@ -358,7 +358,7 @@ static void dump_notes(size_t nread)
             {
               if (note->nc_length != sizeof(struct note_cpu_resumed_s))
                 {
-                  syslog(LOG_INFO,
+                  syslog(LOG_ERR,
                          "ERROR: Size incorrect for CPU resumed note: %d\n",
                          note->nc_length);
                   return;
@@ -383,7 +383,7 @@ static void dump_notes(size_t nread)
 
               if (note->nc_length != sizeof(struct note_preempt_s))
                 {
-                  syslog(LOG_INFO,
+                  syslog(LOG_ERR,
                          "ERROR: Size incorrect for preemption note: %d\n",
                          note->nc_length);
                   return;
@@ -439,7 +439,7 @@ static void dump_notes(size_t nread)
 
               if (note->nc_length != sizeof(struct note_csection_s))
                 {
-                  syslog(LOG_INFO,
+                  syslog(LOG_ERR,
                          "ERROR: Size incorrect for csection note: %d\n",
                          note->nc_length);
                   return;
@@ -497,7 +497,7 @@ static void dump_notes(size_t nread)
 
               if (note->nc_length != sizeof(struct note_spinlock_s))
                 {
-                  syslog(LOG_INFO,
+                  syslog(LOG_ERR,
                          "ERROR: Size incorrect for spinlock note: %d\n",
                          note->nc_length);
                   return;
@@ -633,7 +633,7 @@ static void dump_notes(size_t nread)
 
                     if (note->nc_length < SIZEOF_NOTE_SYSCALL_ENTER(0))
                       {
-                        syslog(LOG_INFO,
+                        syslog(LOG_ERR,
                                "ERROR: Size incorrect for SYSCALL enter note: %d\n",
                                note->nc_length);
                         return;
@@ -654,7 +654,7 @@ static void dump_notes(size_t nread)
 
                     if (note->nc_length != sizeof(struct note_syscall_leave_s))
                       {
-                        syslog(LOG_INFO,
+                        syslog(LOG_ERR,
                                "ERROR: Size incorrect for SYSCALL leave note: %d\n",
                                note->nc_length);
                         return;
@@ -691,7 +691,7 @@ static void dump_notes(size_t nread)
 
                     if (note->nc_length != sizeof(struct note_irqhandler_s))
                       {
-                        syslog(LOG_INFO,
+                        syslog(LOG_ERR,
                                "ERROR: Size incorrect for IRQ note: %d\n",
                                note->nc_length);
                         return;
@@ -736,7 +736,7 @@ static int note_daemon(int argc, char *argv[])
   if (fd < 0)
     {
       int errcode = errno;
-      syslog(LOG_INFO, "note_daemon: ERROR: Failed to open /dev/note: %d\n",
+      syslog(LOG_ERR, "note_daemon: ERROR: Failed to open /dev/note: %d\n",
              errcode);
       goto errout;
     }