From 52f0df58b96af940cf6f527b4dd052a051f299bd Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Sun, 15 Dec 2013 16:36:41 +0100 Subject: [PATCH] Moved sysdb and sysdbd sources to src/tools/. Also, moved all purely private headers to that directory as well. Renamed some files for greater consistency. --- src/Makefile.am | 8 ++++---- src/{client/sysdb.c => tools/sysdb/main.c} | 2 +- src/{daemon/config.c => tools/sysdbd/configfile.c} | 6 +++--- .../daemon/config.h => tools/sysdbd/configfile.h} | 4 +++- src/{daemon/sysdbd.c => tools/sysdbd/main.c} | 4 ++-- src/{daemon => tools/sysdbd}/sysdbd.conf.sample | 0 6 files changed, 13 insertions(+), 11 deletions(-) rename src/{client/sysdb.c => tools/sysdb/main.c} (99%) rename src/{daemon/config.c => tools/sysdbd/configfile.c} (98%) rename src/{include/daemon/config.h => tools/sysdbd/configfile.h} (96%) rename src/{daemon/sysdbd.c => tools/sysdbd/main.c} (99%) rename src/{daemon => tools/sysdbd}/sysdbd.conf.sample (100%) diff --git a/src/Makefile.am b/src/Makefile.am index 3b1de0a..3f5a007 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -83,20 +83,20 @@ bin_PROGRAMS = sysdbd if BUILD_CLIENT bin_PROGRAMS += sysdb -sysdb_SOURCES = client/sysdb.c include/client/sysdb.h +sysdb_SOURCES = tools/sysdb/main.c include/client/sysdb.h sysdb_CFLAGS = -DBUILD_DATE="\"$$( date --utc '+%F %T' ) (UTC)\"" \ $(AM_CFLAGS) @READLINE_CFLAGS@ sysdb_LDADD = libsysdbclient.la @READLINE_LIBS@ endif -sysdbd_SOURCES = daemon/sysdbd.c include/sysdb.h \ - daemon/config.c include/daemon/config.h +sysdbd_SOURCES = tools/sysdbd/main.c include/sysdb.h \ + tools/sysdbd/configfile.c tools/sysdbd/configfile.h sysdbd_CFLAGS = $(AM_CFLAGS) -DBUILD_DATE="\"$$( date --utc '+%F %T' ) (UTC)\"" sysdbd_LDADD = libsysdb.la liboconfig/liboconfig.la sysdbd_DEPENDENCIES = liboconfig/liboconfig.la sdbconfdir = $(sysconfdir)/sysdb -dist_sdbconf_DATA = daemon/sysdbd.conf.sample +dist_sdbconf_DATA = tools/sysdbd/sysdbd.conf.sample pkgbackendlibdir = $(pkglibdir)/backend pkgbackendcollectdlibdir = $(pkgbackendlibdir)/collectd diff --git a/src/client/sysdb.c b/src/tools/sysdb/main.c similarity index 99% rename from src/client/sysdb.c rename to src/tools/sysdb/main.c index ecadb4c..0639e5f 100644 --- a/src/client/sysdb.c +++ b/src/tools/sysdb/main.c @@ -1,5 +1,5 @@ /* - * SysDB - src/client/sysdb.c + * SysDB - src/tools/sysdb/main.c * Copyright (C) 2013 Sebastian 'tokkee' Harl * All rights reserved. * diff --git a/src/daemon/config.c b/src/tools/sysdbd/configfile.c similarity index 98% rename from src/daemon/config.c rename to src/tools/sysdbd/configfile.c index 906f4c5..9527626 100644 --- a/src/daemon/config.c +++ b/src/tools/sysdbd/configfile.c @@ -1,5 +1,5 @@ /* - * SysDB - src/daemon/config.c + * SysDB - src/tools/sysdbd/configfile.c * Copyright (C) 2012 Sebastian 'tokkee' Harl * All rights reserved. * @@ -25,13 +25,13 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "tools/sysdbd/configfile.h" + #include "sysdb.h" #include "core/plugin.h" #include "core/time.h" #include "utils/error.h" -#include "daemon/config.h" - #include "liboconfig/oconfig.h" #include "liboconfig/utils.h" diff --git a/src/include/daemon/config.h b/src/tools/sysdbd/configfile.h similarity index 96% rename from src/include/daemon/config.h rename to src/tools/sysdbd/configfile.h index 0fe278d..19abe9a 100644 --- a/src/include/daemon/config.h +++ b/src/tools/sysdbd/configfile.h @@ -1,5 +1,5 @@ /* - * SysDB - src/daemon/config.h + * SysDB - src/tools/sysdbd/configfile.h * Copyright (C) 2012 Sebastian 'tokkee' Harl * All rights reserved. * @@ -25,6 +25,8 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include + #ifndef DAEMON_CONFIG_H #define DAEMON_CONFIG_H 1 diff --git a/src/daemon/sysdbd.c b/src/tools/sysdbd/main.c similarity index 99% rename from src/daemon/sysdbd.c rename to src/tools/sysdbd/main.c index 21350f3..195d494 100644 --- a/src/daemon/sysdbd.c +++ b/src/tools/sysdbd/main.c @@ -1,5 +1,5 @@ /* - * SysDB - src/sysdbd.c + * SysDB - src/tools/sysdbd/main.c * Copyright (C) 2012 Sebastian 'tokkee' Harl * All rights reserved. * @@ -36,7 +36,7 @@ #include "frontend/sock.h" -#include "daemon/config.h" +#include "tools/sysdbd/configfile.h" #if HAVE_LIBGEN_H # include diff --git a/src/daemon/sysdbd.conf.sample b/src/tools/sysdbd/sysdbd.conf.sample similarity index 100% rename from src/daemon/sysdbd.conf.sample rename to src/tools/sysdbd/sysdbd.conf.sample -- 2.30.2