drivers/note: rename /dev/note to /dev/note/ram

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
yinshengkai 2022-12-13 01:28:03 +08:00 committed by Xiang Xiao
parent c7e8ade590
commit 595adbcca6
3 changed files with 11 additions and 13 deletions

View File

@ -69,10 +69,10 @@ void task_mn_print_tasks_status(void)
{ {
/* Open the note driver */ /* Open the note driver */
notefd = open("/dev/note", O_RDONLY); notefd = open("/dev/note/ram", O_RDONLY);
if (notefd < 0) if (notefd < 0)
{ {
printf("Error: cannot open /dev/note\n"); printf("Error: cannot open /dev/note/ram\n");
return; return;
} }
@ -243,10 +243,10 @@ void task_mn_get_task_name(struct noteram_get_taskname_s *task)
{ {
int notefd; int notefd;
notefd = open("/dev/note", O_RDONLY); notefd = open("/dev/note/ram", O_RDONLY);
if (notefd < 0) if (notefd < 0)
{ {
fprintf(stderr, "trace: cannot open /dev/note\n"); fprintf(stderr, "trace: cannot open /dev/note/ram\n");
return; return;
} }

View File

@ -787,12 +787,12 @@ static int note_daemon(int argc, char *argv[])
/* Open the note driver */ /* Open the note driver */
syslog(LOG_INFO, "note_daemon: Opening /dev/note\n"); syslog(LOG_INFO, "note_daemon: Opening /dev/note/ram\n");
fd = open("/dev/note", O_RDONLY); fd = open("/dev/note/ram", O_RDONLY);
if (fd < 0) if (fd < 0)
{ {
int errcode = errno; 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); errcode);
goto errout; goto errout;
} }

View File

@ -128,11 +128,10 @@ static void note_ioctl(int cmd, unsigned long arg)
{ {
int notefd; int notefd;
notefd = open("/dev/note", O_RDONLY); notefd = open("/dev/note/ram", O_RDONLY);
if (notefd < 0) if (notefd < 0)
{ {
fprintf(stderr, fprintf(stderr, "trace: cannot open /dev/note/ram\n");
"trace: cannot open /dev/note\n");
return; return;
} }
@ -713,11 +712,10 @@ int trace_dump(trace_dump_t type, FAR FILE *out)
/* Open note for read */ /* Open note for read */
fd = open("/dev/note", O_RDONLY); fd = open("/dev/note/ram", O_RDONLY);
if (fd < 0) if (fd < 0)
{ {
fprintf(stderr, fprintf(stderr, "trace: cannot open /dev/note/ram\n");
"trace: cannot open /dev/note\n");
return ERROR; return ERROR;
} }