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/nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new 595adbcca drivers/note: rename /dev/note to /dev/note/ram
595adbcca is described below

commit 595adbcca69087c1416b8c447ebf7c6d073ea526
Author: yinshengkai <yinsheng...@xiaomi.com>
AuthorDate: Tue Dec 13 01:28:03 2022 +0800

    drivers/note: rename /dev/note to /dev/note/ram
    
    Signed-off-by: yinshengkai <yinsheng...@xiaomi.com>
---
 examples/watcher/task_mn.c    |  8 ++++----
 system/sched_note/note_main.c |  6 +++---
 system/trace/trace_dump.c     | 10 ++++------
 3 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/examples/watcher/task_mn.c b/examples/watcher/task_mn.c
index d2a68924f..038d26106 100644
--- a/examples/watcher/task_mn.c
+++ b/examples/watcher/task_mn.c
@@ -69,10 +69,10 @@ void task_mn_print_tasks_status(void)
     {
       /* Open the note driver */
 
-      notefd = open("/dev/note", O_RDONLY);
+      notefd = open("/dev/note/ram", O_RDONLY);
       if (notefd < 0)
         {
-          printf("Error: cannot open /dev/note\n");
+          printf("Error: cannot open /dev/note/ram\n");
           return;
         }
 
@@ -243,10 +243,10 @@ void task_mn_get_task_name(struct noteram_get_taskname_s 
*task)
 {
   int notefd;
 
-  notefd = open("/dev/note", O_RDONLY);
+  notefd = open("/dev/note/ram", O_RDONLY);
   if (notefd < 0)
     {
-      fprintf(stderr, "trace: cannot open /dev/note\n");
+      fprintf(stderr, "trace: cannot open /dev/note/ram\n");
       return;
     }
 
diff --git a/system/sched_note/note_main.c b/system/sched_note/note_main.c
index a8222787e..b754be72a 100644
--- a/system/sched_note/note_main.c
+++ b/system/sched_note/note_main.c
@@ -787,12 +787,12 @@ static int note_daemon(int argc, char *argv[])
 
   /* Open the note driver */
 
-  syslog(LOG_INFO, "note_daemon: Opening /dev/note\n");
-  fd = open("/dev/note", O_RDONLY);
+  syslog(LOG_INFO, "note_daemon: Opening /dev/note/ram\n");
+  fd = open("/dev/note/ram", O_RDONLY);
   if (fd < 0)
     {
       int errcode = errno;
-      syslog(LOG_ERR, "note_daemon: ERROR: Failed to open /dev/note: %d\n",
+      syslog(LOG_ERR, "note_daemon: ERROR: Failed to open /dev/note/ram: %d\n",
              errcode);
       goto errout;
     }
diff --git a/system/trace/trace_dump.c b/system/trace/trace_dump.c
index 58cb6e881..1f4ccfe66 100644
--- a/system/trace/trace_dump.c
+++ b/system/trace/trace_dump.c
@@ -128,11 +128,10 @@ static void note_ioctl(int cmd, unsigned long arg)
 {
   int notefd;
 
-  notefd = open("/dev/note", O_RDONLY);
+  notefd = open("/dev/note/ram", O_RDONLY);
   if (notefd < 0)
     {
-      fprintf(stderr,
-             "trace: cannot open /dev/note\n");
+      fprintf(stderr, "trace: cannot open /dev/note/ram\n");
       return;
     }
 
@@ -713,11 +712,10 @@ int trace_dump(trace_dump_t type, FAR FILE *out)
 
   /* Open note for read */
 
-  fd = open("/dev/note", O_RDONLY);
+  fd = open("/dev/note/ram", O_RDONLY);
   if (fd < 0)
     {
-      fprintf(stderr,
-              "trace: cannot open /dev/note\n");
+      fprintf(stderr, "trace: cannot open /dev/note/ram\n");
       return ERROR;
     }
 

Reply via email to