From 5815201cc28466cd849a309ecbd4a1947c6884a8 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 9 Oct 2014 07:08:36 -0600 Subject: [PATCH] Move syslog back to libc/syslog from fs/syslog --- fs/Makefile | 1 - fs/driver/Make.defs | 8 ++++++++ fs/{syslog => driver}/fs_devsyslog.c | 2 +- libc/Makefile | 1 + {fs => libc}/syslog/Make.defs | 12 ++---------- .../fs_lowsyslog.c => libc/syslog/lib_lowsyslog.c | 2 +- .../fs_setlogmask.c => libc/syslog/lib_setlogmask.c | 2 +- fs/syslog/fs_syslog.c => libc/syslog/lib_syslog.c | 2 +- .../syslog/lib_syslogstream.c | 0 {fs => libc}/syslog/syslog.h | 0 10 files changed, 15 insertions(+), 15 deletions(-) rename fs/{syslog => driver}/fs_devsyslog.c (99%) rename {fs => libc}/syslog/Make.defs (89%) rename fs/syslog/fs_lowsyslog.c => libc/syslog/lib_lowsyslog.c (99%) rename fs/syslog/fs_setlogmask.c => libc/syslog/lib_setlogmask.c (99%) rename fs/syslog/fs_syslog.c => libc/syslog/lib_syslog.c (99%) rename fs/syslog/fs_syslogstream.c => libc/syslog/lib_syslogstream.c (100%) rename {fs => libc}/syslog/syslog.h (100%) diff --git a/fs/Makefile b/fs/Makefile index 33e6b315c6..0c72506041 100644 --- a/fs/Makefile +++ b/fs/Makefile @@ -48,7 +48,6 @@ include vfs/Make.defs include driver/Make.defs include dirent/Make.defs include aio/Make.defs -include syslog/Make.defs include mmap/Make.defs # OS resources diff --git a/fs/driver/Make.defs b/fs/driver/Make.defs index 1a7ea9e558..587076daeb 100644 --- a/fs/driver/Make.defs +++ b/fs/driver/Make.defs @@ -41,6 +41,14 @@ CSRCS += fs_registerdriver.c fs_unregisterdriver.c CSRCS += fs_registerblockdriver.c fs_unregisterblockdriver.c CSRCS += fs_findblockdriver.c fs_openblockdriver.c fs_closeblockdriver.c +# System logging to a character device (or file) + +ifeq ($(CONFIG_SYSLOG),y) +ifeq ($(CONFIG_SYSLOG_CHAR),y) +CSRCS += fs_devsyslog.c +endif +endif + # Include driver build support DEPPATH += --dep-path driver diff --git a/fs/syslog/fs_devsyslog.c b/fs/driver/fs_devsyslog.c similarity index 99% rename from fs/syslog/fs_devsyslog.c rename to fs/driver/fs_devsyslog.c index 930c89be4c..526a9e0b28 100644 --- a/fs/syslog/fs_devsyslog.c +++ b/fs/driver/fs_devsyslog.c @@ -1,5 +1,5 @@ /**************************************************************************** - * fs/syslog/fs_devsyslog.c + * fs/driver/fs_devsyslog.c * * Copyright (C) 2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/libc/Makefile b/libc/Makefile index 8412f8d884..b1082dd514 100644 --- a/libc/Makefile +++ b/libc/Makefile @@ -65,6 +65,7 @@ include stdio/Make.defs include stdlib/Make.defs include unistd/Make.defs include sched/Make.defs +include syslog/Make.defs include string/Make.defs include aio/Make.defs include pthread/Make.defs diff --git a/fs/syslog/Make.defs b/libc/syslog/Make.defs similarity index 89% rename from fs/syslog/Make.defs rename to libc/syslog/Make.defs index d67f63e1f3..7ebdc907cf 100644 --- a/fs/syslog/Make.defs +++ b/libc/syslog/Make.defs @@ -35,18 +35,10 @@ # Add the internal C files to the build -CSRCS += fs_syslog.c fs_lowsyslog.c fs_setlogmask.c +CSRCS += lib_syslog.c lib_lowsyslog.c lib_setlogmask.c ifeq ($(CONFIG_SYSLOG),y) -CSRCS += fs_syslogstream.c -endif - -# System logging to a character device (or file) - -ifeq ($(CONFIG_SYSLOG),y) -ifeq ($(CONFIG_SYSLOG_CHAR),y) -CSRCS += fs_devsyslog.c -endif +CSRCS += lib_syslogstream.c endif # Add the syslog directory to the build diff --git a/fs/syslog/fs_lowsyslog.c b/libc/syslog/lib_lowsyslog.c similarity index 99% rename from fs/syslog/fs_lowsyslog.c rename to libc/syslog/lib_lowsyslog.c index 3caa81d8ae..ed0315f6b8 100644 --- a/fs/syslog/fs_lowsyslog.c +++ b/libc/syslog/lib_lowsyslog.c @@ -1,5 +1,5 @@ /**************************************************************************** - * fs/syslog/fs_lowsyslog.c + * lib/syslog/lib_lowsyslog.c * * Copyright (C) 2007-2009, 2011-2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/fs/syslog/fs_setlogmask.c b/libc/syslog/lib_setlogmask.c similarity index 99% rename from fs/syslog/fs_setlogmask.c rename to libc/syslog/lib_setlogmask.c index d34341723b..3645dceed1 100644 --- a/fs/syslog/fs_setlogmask.c +++ b/libc/syslog/lib_setlogmask.c @@ -1,5 +1,5 @@ /**************************************************************************** - * fs/syslog/fs_setlogmask.c + * lib/syslog/lib_setlogmask.c * * Copyright (C) 2007-2009, 2011-2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/fs/syslog/fs_syslog.c b/libc/syslog/lib_syslog.c similarity index 99% rename from fs/syslog/fs_syslog.c rename to libc/syslog/lib_syslog.c index cb5e962563..05cfe60eab 100644 --- a/fs/syslog/fs_syslog.c +++ b/libc/syslog/lib_syslog.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libc/syslog/fs_syslog.c + * libc/syslog/lib_syslog.c * * Copyright (C) 2007-2009, 2011-2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/fs/syslog/fs_syslogstream.c b/libc/syslog/lib_syslogstream.c similarity index 100% rename from fs/syslog/fs_syslogstream.c rename to libc/syslog/lib_syslogstream.c diff --git a/fs/syslog/syslog.h b/libc/syslog/syslog.h similarity index 100% rename from fs/syslog/syslog.h rename to libc/syslog/syslog.h