Backing out some logic: Remove syslog functions from syscalls
This commit is contained in:
parent
f32277a2ac
commit
d2c8e13ed5
@ -82,29 +82,23 @@
|
|||||||
#define SYS_sched_yield (CONFIG_SYS_RESERVED+12)
|
#define SYS_sched_yield (CONFIG_SYS_RESERVED+12)
|
||||||
#define SYS_set_errno (CONFIG_SYS_RESERVED+13)
|
#define SYS_set_errno (CONFIG_SYS_RESERVED+13)
|
||||||
|
|
||||||
/* SYSLOG */
|
|
||||||
|
|
||||||
#define SYS_syslog (CONFIG_SYS_RESERVED+14)
|
|
||||||
#define SYS_lowsyslog (CONFIG_SYS_RESERVED+15)
|
|
||||||
#define SYS_setlogmask (CONFIG_SYS_RESERVED+16)
|
|
||||||
|
|
||||||
/* Semaphores */
|
/* Semaphores */
|
||||||
|
|
||||||
#define SYS_sem_destroy (CONFIG_SYS_RESERVED+17)
|
#define SYS_sem_destroy (CONFIG_SYS_RESERVED+14)
|
||||||
#define SYS_sem_post (CONFIG_SYS_RESERVED+18)
|
#define SYS_sem_post (CONFIG_SYS_RESERVED+15)
|
||||||
#define SYS_sem_timedwait (CONFIG_SYS_RESERVED+19)
|
#define SYS_sem_timedwait (CONFIG_SYS_RESERVED+16)
|
||||||
#define SYS_sem_trywait (CONFIG_SYS_RESERVED+20)
|
#define SYS_sem_trywait (CONFIG_SYS_RESERVED+17)
|
||||||
#define SYS_sem_wait (CONFIG_SYS_RESERVED+21)
|
#define SYS_sem_wait (CONFIG_SYS_RESERVED+18)
|
||||||
|
|
||||||
/* Named semaphores */
|
/* Named semaphores */
|
||||||
|
|
||||||
#ifdef CONFIG_FS_NAMED_SEMAPHORES
|
#ifdef CONFIG_FS_NAMED_SEMAPHORES
|
||||||
# define SYS_sem_open (CONFIG_SYS_RESERVED+22)
|
# define SYS_sem_open (CONFIG_SYS_RESERVED+19)
|
||||||
# define SYS_sem_close (CONFIG_SYS_RESERVED+23)
|
# define SYS_sem_close (CONFIG_SYS_RESERVED+20)
|
||||||
# define SYS_sem_unlink (CONFIG_SYS_RESERVED+24)
|
# define SYS_sem_unlink (CONFIG_SYS_RESERVED+21)
|
||||||
# define __SYS_task_create (CONFIG_SYS_RESERVED+25)
|
|
||||||
#else
|
|
||||||
# define __SYS_task_create (CONFIG_SYS_RESERVED+22)
|
# define __SYS_task_create (CONFIG_SYS_RESERVED+22)
|
||||||
|
#else
|
||||||
|
# define __SYS_task_create (CONFIG_SYS_RESERVED+19)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Task creation APIs based on global entry points cannot be use with
|
/* Task creation APIs based on global entry points cannot be use with
|
||||||
|
@ -49,25 +49,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
/* Configuration ************************************************************/
|
|
||||||
/* Some interfaces in this file are currently only available within the
|
|
||||||
* kernel. They could are available to applications in the flat build and
|
|
||||||
* could be made available in the protected and kernel builds IF system
|
|
||||||
* calls were added.
|
|
||||||
*
|
|
||||||
* REVISIT: For example, I don't yet know how to pass a va_list in a system
|
|
||||||
* call so none of those interfaces.
|
|
||||||
*
|
|
||||||
* NOTE: In protected and kernel builds, there may also be a limit to the
|
|
||||||
* number of parameters that are supported in the variable parameter list.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if !defined(CONFIG_BUILD_PROTECTED) && !defined(CONFIG_BUILD_KERNEL)
|
|
||||||
# undef __KERNEL__
|
|
||||||
# define __KERNEL__ 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* syslog interface *********************************************************/
|
|
||||||
/* The option argument to openlog() is an OR of any of these:
|
/* The option argument to openlog() is an OR of any of these:
|
||||||
*
|
*
|
||||||
* LOG_CONS - Write directly to system console if there is an error
|
* LOG_CONS - Write directly to system console if there is an error
|
||||||
@ -156,9 +137,7 @@ void closelog(void);
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
int syslog(int priority, FAR const char *format, ...);
|
int syslog(int priority, FAR const char *format, ...);
|
||||||
#ifdef __KERNEL__
|
|
||||||
int vsyslog(int priority, FAR const char *src, va_list ap);
|
int vsyslog(int priority, FAR const char *src, va_list ap);
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_ARCH_LOWPUTC
|
#ifdef CONFIG_ARCH_LOWPUTC
|
||||||
/* These are non-standard, low-level system logging interface. The
|
/* These are non-standard, low-level system logging interface. The
|
||||||
@ -172,9 +151,7 @@ int vsyslog(int priority, FAR const char *src, va_list ap);
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
int lowsyslog(int priority, FAR const char *format, ...);
|
int lowsyslog(int priority, FAR const char *format, ...);
|
||||||
# ifdef __KERNEL__
|
|
||||||
int lowvsyslog(int priority, FAR const char *format, va_list ap);
|
int lowvsyslog(int priority, FAR const char *format, va_list ap);
|
||||||
# endif
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
/* If the platform cannot support lowsyslog, then we will substitute the
|
/* If the platform cannot support lowsyslog, then we will substitute the
|
||||||
@ -188,10 +165,8 @@ int lowvsyslog(int priority, FAR const char *format, va_list ap);
|
|||||||
# else
|
# else
|
||||||
# define lowsyslog (void)
|
# define lowsyslog (void)
|
||||||
# endif
|
# endif
|
||||||
# ifdef __KERNEL__
|
|
||||||
# define lowvsyslog(p,f,a) vsyslog(p,f,a)
|
# define lowvsyslog(p,f,a) vsyslog(p,f,a)
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
/* The setlogmask() function sets the logmask and returns the previous
|
/* The setlogmask() function sets the logmask and returns the previous
|
||||||
* mask. If the mask argument is 0, the current logmask is not modified.
|
* mask. If the mask argument is 0, the current logmask is not modified.
|
||||||
|
@ -65,6 +65,8 @@
|
|||||||
"llabs","stdlib.h","defined(CONFIG_HAVE_LONG_LONG)","long long int","long long int"
|
"llabs","stdlib.h","defined(CONFIG_HAVE_LONG_LONG)","long long int","long long int"
|
||||||
"lldbg","debug.h","!defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG) && defined(CONFIG_ARCH_LOWPUTC)","int","const char *","..."
|
"lldbg","debug.h","!defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG) && defined(CONFIG_ARCH_LOWPUTC)","int","const char *","..."
|
||||||
"llvdbg","debug.h","!defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_VERBOSE) && defined(CONFIG_ARCH_LOWPUTC)","int","const char *","..."
|
"llvdbg","debug.h","!defined(CONFIG_CPP_HAVE_VARARGS) && defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_VERBOSE) && defined(CONFIG_ARCH_LOWPUTC)","int","const char *","..."
|
||||||
|
"lowsyslog","syslog.h","","int","int","FAR const char *","..."
|
||||||
|
"lowvsyslog","syslog.h","","int","int","FAR const char *","va_list"
|
||||||
"match","nuttx/regex.h","","int","const char *","const char *"
|
"match","nuttx/regex.h","","int","const char *","const char *"
|
||||||
"memccpy","string.h","","FAR void","FAR void *","FAR const void *","int c","size_t"
|
"memccpy","string.h","","FAR void","FAR void *","FAR const void *","int c","size_t"
|
||||||
"memchr","string.h","","FAR void","FAR const void *","int c","size_t"
|
"memchr","string.h","","FAR void","FAR const void *","int c","size_t"
|
||||||
@ -110,6 +112,7 @@
|
|||||||
"sem_getvalue","semaphore.h","","int","FAR sem_t *","FAR int *"
|
"sem_getvalue","semaphore.h","","int","FAR sem_t *","FAR int *"
|
||||||
"sem_init","semaphore.h","","int","FAR sem_t *","int","unsigned int"
|
"sem_init","semaphore.h","","int","FAR sem_t *","int","unsigned int"
|
||||||
"sendfile","sys/sendfile.h","CONFIG_NSOCKET_DESCRIPTORS > 0 || CONFIG_NFILE_DESCRIPTORS > 0","ssize_t","int","int","off_t","size_t"
|
"sendfile","sys/sendfile.h","CONFIG_NSOCKET_DESCRIPTORS > 0 || CONFIG_NFILE_DESCRIPTORS > 0","ssize_t","int","int","off_t","size_t"
|
||||||
|
"setlogmask","syslog.h","","int","int"
|
||||||
"sigaddset","signal.h","!defined(CONFIG_DISABLE_SIGNALS)","int","FAR sigset_t *","int"
|
"sigaddset","signal.h","!defined(CONFIG_DISABLE_SIGNALS)","int","FAR sigset_t *","int"
|
||||||
"sigdelset","signal.h","!defined(CONFIG_DISABLE_SIGNALS)","int","FAR sigset_t *","int"
|
"sigdelset","signal.h","!defined(CONFIG_DISABLE_SIGNALS)","int","FAR sigset_t *","int"
|
||||||
"sigemptyset","signal.h","!defined(CONFIG_DISABLE_SIGNALS)","int","FAR sigset_t *"
|
"sigemptyset","signal.h","!defined(CONFIG_DISABLE_SIGNALS)","int","FAR sigset_t *"
|
||||||
@ -154,6 +157,7 @@
|
|||||||
"strtoll","stdlib.h","defined(CONFIG_HAVE_LONG_LONG)","long long","const char *nptr","char **endptr","int base"
|
"strtoll","stdlib.h","defined(CONFIG_HAVE_LONG_LONG)","long long","const char *nptr","char **endptr","int base"
|
||||||
"strtoul","stdlib.h","","unsigned long","const char *","char **","int"
|
"strtoul","stdlib.h","","unsigned long","const char *","char **","int"
|
||||||
"strtoull","stdlib.h","defined(CONFIG_HAVE_LONG_LONG)","unsigned long long","const char *","char **","int"
|
"strtoull","stdlib.h","defined(CONFIG_HAVE_LONG_LONG)","unsigned long long","const char *","char **","int"
|
||||||
|
"syslog","syslog.h","","int","int","FAR const char *","..."
|
||||||
"tcflush","termios.h","CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_SERIAL_TERMIOS)","int","int","int"
|
"tcflush","termios.h","CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_SERIAL_TERMIOS)","int","int","int"
|
||||||
"tcgetattr","termios.h","CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_SERIAL_TERMIOS)","int","int","FAR struct termios *"
|
"tcgetattr","termios.h","CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_SERIAL_TERMIOS)","int","int","FAR struct termios *"
|
||||||
"tcsetattr","termios.h","CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_SERIAL_TERMIOS)","int","int","int","FAR const struct termios *"
|
"tcsetattr","termios.h","CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_SERIAL_TERMIOS)","int","int","int","FAR const struct termios *"
|
||||||
@ -169,3 +173,4 @@
|
|||||||
"vsnprintf","stdio.h","","int","FAR char *","size_t","const char *","va_list"
|
"vsnprintf","stdio.h","","int","FAR char *","size_t","const char *","va_list"
|
||||||
"vsprintf","stdio.h","","int","FAR char *","const char *","va_list"
|
"vsprintf","stdio.h","","int","FAR char *","const char *","va_list"
|
||||||
"vsscanf","stdio.h","","int","char *","const char *","va_list"
|
"vsscanf","stdio.h","","int","char *","const char *","va_list"
|
||||||
|
"vsyslog","syslog.h","","int","int","FAR const char *","va_list"
|
||||||
|
Can't render this file because it has a wrong number of fields in line 2.
|
@ -29,7 +29,6 @@
|
|||||||
"ioctl","sys/ioctl.h","CONFIG_NSOCKET_DESCRIPTORS > 0 || CONFIG_NFILE_DESCRIPTORS > 0","int","int","int","unsigned long"
|
"ioctl","sys/ioctl.h","CONFIG_NSOCKET_DESCRIPTORS > 0 || CONFIG_NFILE_DESCRIPTORS > 0","int","int","int","unsigned long"
|
||||||
"kill","signal.h","!defined(CONFIG_DISABLE_SIGNALS)","int","pid_t","int"
|
"kill","signal.h","!defined(CONFIG_DISABLE_SIGNALS)","int","pid_t","int"
|
||||||
"listen","sys/socket.h","CONFIG_NSOCKET_DESCRIPTORS > 0 && defined(CONFIG_NET)","int","int","int"
|
"listen","sys/socket.h","CONFIG_NSOCKET_DESCRIPTORS > 0 && defined(CONFIG_NET)","int","int","int"
|
||||||
"lowsyslog","syslog.h","","int","int","FAR const char *","..."
|
|
||||||
"lseek","unistd.h","CONFIG_NFILE_DESCRIPTORS > 0","off_t","int","off_t","int"
|
"lseek","unistd.h","CONFIG_NFILE_DESCRIPTORS > 0","off_t","int","off_t","int"
|
||||||
"mkdir","sys/stat.h","CONFIG_NFILE_DESCRIPTORS > 0 && !defined(CONFIG_DISABLE_MOUNTPOINT)","int","FAR const char*","mode_t"
|
"mkdir","sys/stat.h","CONFIG_NFILE_DESCRIPTORS > 0 && !defined(CONFIG_DISABLE_MOUNTPOINT)","int","FAR const char*","mode_t"
|
||||||
"mkfifo","sys/stat.h","CONFIG_NFILE_DESCRIPTORS > 0","int","FAR const char*","mode_t"
|
"mkfifo","sys/stat.h","CONFIG_NFILE_DESCRIPTORS > 0","int","FAR const char*","mode_t"
|
||||||
@ -119,7 +118,6 @@
|
|||||||
"sendto","sys/socket.h","CONFIG_NSOCKET_DESCRIPTORS > 0 && defined(CONFIG_NET)","ssize_t","int","FAR const void*","size_t","int","FAR const struct sockaddr*","socklen_t"
|
"sendto","sys/socket.h","CONFIG_NSOCKET_DESCRIPTORS > 0 && defined(CONFIG_NET)","ssize_t","int","FAR const void*","size_t","int","FAR const struct sockaddr*","socklen_t"
|
||||||
"set_errno","errno.h","","void","int"
|
"set_errno","errno.h","","void","int"
|
||||||
"setenv","stdlib.h","!defined(CONFIG_DISABLE_ENVIRON)","int","const char*","const char*","int"
|
"setenv","stdlib.h","!defined(CONFIG_DISABLE_ENVIRON)","int","const char*","const char*","int"
|
||||||
"setlogmask","syslog.h","","int","int"
|
|
||||||
"setsockopt","sys/socket.h","CONFIG_NSOCKET_DESCRIPTORS > 0 && defined(CONFIG_NET)","int","int","int","int","FAR const void*","socklen_t"
|
"setsockopt","sys/socket.h","CONFIG_NSOCKET_DESCRIPTORS > 0 && defined(CONFIG_NET)","int","int","int","int","FAR const void*","socklen_t"
|
||||||
"shmat", "sys/shm.h", "defined(CONFIG_MM_SHM)", "FAR void *", "int", "FAR const void *", "int"
|
"shmat", "sys/shm.h", "defined(CONFIG_MM_SHM)", "FAR void *", "int", "FAR const void *", "int"
|
||||||
"shmctl", "sys/shm.h", "defined(CONFIG_MM_SHM)", "int", "int", "int", "FAR struct shmid_ds *"
|
"shmctl", "sys/shm.h", "defined(CONFIG_MM_SHM)", "int", "int", "int", "FAR struct shmid_ds *"
|
||||||
@ -136,7 +134,6 @@
|
|||||||
"stat","sys/stat.h","CONFIG_NFILE_DESCRIPTORS > 0","int","const char*","FAR struct stat*"
|
"stat","sys/stat.h","CONFIG_NFILE_DESCRIPTORS > 0","int","const char*","FAR struct stat*"
|
||||||
#"statfs","stdio.h","","int","FAR const char*","FAR struct statfs*"
|
#"statfs","stdio.h","","int","FAR const char*","FAR struct statfs*"
|
||||||
"statfs","sys/statfs.h","CONFIG_NFILE_DESCRIPTORS > 0","int","const char*","struct statfs*"
|
"statfs","sys/statfs.h","CONFIG_NFILE_DESCRIPTORS > 0","int","const char*","struct statfs*"
|
||||||
"syslog","syslog.h","","int","int","FAR const char *","..."
|
|
||||||
"task_create","sched.h","!defined(CONFIG_BUILD_KERNEL)", "int","FAR const char*","int","int","main_t","FAR char * const []|FAR char * const *"
|
"task_create","sched.h","!defined(CONFIG_BUILD_KERNEL)", "int","FAR const char*","int","int","main_t","FAR char * const []|FAR char * const *"
|
||||||
#"task_create","sched.h","","int","const char*","int","main_t","FAR char * const []|FAR char * const *"
|
#"task_create","sched.h","","int","const char*","int","main_t","FAR char * const []|FAR char * const *"
|
||||||
"task_delete","sched.h","","int","pid_t"
|
"task_delete","sched.h","","int","pid_t"
|
||||||
|
Can't render this file because it has a wrong number of fields in line 2.
|
@ -58,12 +58,6 @@ SYSCALL_LOOKUP(sched_unlock, 0, STUB_sched_unlock)
|
|||||||
SYSCALL_LOOKUP(sched_yield, 0, STUB_sched_yield)
|
SYSCALL_LOOKUP(sched_yield, 0, STUB_sched_yield)
|
||||||
SYSCALL_LOOKUP(set_errno, 1, STUB_set_errno)
|
SYSCALL_LOOKUP(set_errno, 1, STUB_set_errno)
|
||||||
|
|
||||||
/* SYSLOG */
|
|
||||||
|
|
||||||
SYSCALL_LOOKUP(syslog, 6, SYS_syslog)
|
|
||||||
SYSCALL_LOOKUP(lowsyslog, 6, SYS_lowsyslog)
|
|
||||||
SYSCALL_LOOKUP(setlogmask, 1, SYS_setlogmask)
|
|
||||||
|
|
||||||
/* Semaphores */
|
/* Semaphores */
|
||||||
|
|
||||||
SYSCALL_LOOKUP(sem_destroy, 2, STUB_sem_destroy)
|
SYSCALL_LOOKUP(sem_destroy, 2, STUB_sem_destroy)
|
||||||
|
@ -76,14 +76,6 @@ uintptr_t STUB_sched_setscheduler(int nbr, uintptr_t parm1, uintptr_t parm2,
|
|||||||
uintptr_t STUB_sched_unlock(int nbr);
|
uintptr_t STUB_sched_unlock(int nbr);
|
||||||
uintptr_t STUB_sched_yield(int nbr);
|
uintptr_t STUB_sched_yield(int nbr);
|
||||||
|
|
||||||
/* SYSLOG */
|
|
||||||
|
|
||||||
uintptr_t STUB_syslog(int nbr, uintptr_t parm1, uintptr_t parm2,
|
|
||||||
uintptr_t parm3, uintptr_t parm4, uintptr_t parm5, uintptr_t parm6);
|
|
||||||
uintptr_t STUB_lowsyslog(int nbr, uintptr_t parm1, uintptr_t parm2,
|
|
||||||
uintptr_t parm3, uintptr_t parm4, uintptr_t parm5, uintptr_t parm6);
|
|
||||||
uintptr_t STUB_setlogmask(int nbr, uintptr_t parm1);
|
|
||||||
|
|
||||||
/* Semaphores */
|
/* Semaphores */
|
||||||
|
|
||||||
uintptr_t STUB_sem_close(int nbr, uintptr_t parm1);
|
uintptr_t STUB_sem_close(int nbr, uintptr_t parm1);
|
||||||
|
Loading…
Reference in New Issue
Block a user