From ddb933096618a6bceded29e4dc2b37cb72134366 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Tue, 10 Dec 2013 18:56:59 +0100 Subject: [PATCH] Moved core/error to utils/error. Later, we'll use the module from the daemon and client. --- src/Makefile.am | 4 ++-- src/backend/collectd/unixsock.c | 2 +- src/backend/mk-livestatus.c | 2 +- src/backend/puppet/store-configs.c | 2 +- src/core/plugin.c | 2 +- src/core/store.c | 2 +- src/daemon/config.c | 2 +- src/daemon/sysdbd.c | 2 +- src/frontend/connection.c | 2 +- src/frontend/query.c | 2 +- src/frontend/sock.c | 2 +- src/include/{core => utils}/error.h | 8 ++++---- src/plugins/cname/dns.c | 2 +- src/plugins/syslog.c | 2 +- src/utils/dbi.c | 2 +- src/{core => utils}/error.c | 4 ++-- src/utils/proto.c | 2 +- src/utils/unixsock.c | 2 +- 18 files changed, 23 insertions(+), 23 deletions(-) rename src/include/{core => utils}/error.h (97%) rename src/{core => utils}/error.c (99%) diff --git a/src/Makefile.am b/src/Makefile.am index 5a18c7b..4bbc3fb 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -12,7 +12,6 @@ pkginclude_HEADERS = include/sysdb.h pkgcoreincludedir = $(pkgincludedir)/core pkgcoreinclude_HEADERS = \ include/core/data.h \ - include/core/error.h \ include/core/object.h \ include/core/plugin.h \ include/core/store.h \ @@ -26,6 +25,7 @@ pkgutilsincludedir = $(pkgincludedir)/utils pkgutilsinclude_HEADERS = \ include/utils/channel.h \ include/utils/dbi.h \ + include/utils/error.h \ include/utils/llist.h \ include/utils/proto.h \ include/utils/strbuf.h \ @@ -54,13 +54,13 @@ libsysdb_la_SOURCES = \ core/plugin.c include/core/plugin.h \ core/store.c include/core/store.h \ include/core/data.h \ - core/error.c include/core/error.h \ frontend/connection.c include/frontend/connection.h \ include/frontend/connection-private.h \ frontend/sock.c include/frontend/sock.h \ frontend/session.c \ frontend/query.c \ utils/channel.c include/utils/channel.h \ + utils/error.c include/utils/error.h \ utils/llist.c include/utils/llist.h \ utils/proto.c include/utils/proto.h \ utils/strbuf.c include/utils/strbuf.h \ diff --git a/src/backend/collectd/unixsock.c b/src/backend/collectd/unixsock.c index c01b0f3..766bbce 100644 --- a/src/backend/collectd/unixsock.c +++ b/src/backend/collectd/unixsock.c @@ -28,7 +28,7 @@ #include "sysdb.h" #include "core/plugin.h" #include "core/store.h" -#include "core/error.h" +#include "utils/error.h" #include "utils/unixsock.h" #include "liboconfig/utils.h" diff --git a/src/backend/mk-livestatus.c b/src/backend/mk-livestatus.c index d672b36..bf45da6 100644 --- a/src/backend/mk-livestatus.c +++ b/src/backend/mk-livestatus.c @@ -28,7 +28,7 @@ #include "sysdb.h" #include "core/plugin.h" #include "core/store.h" -#include "core/error.h" +#include "utils/error.h" #include "utils/unixsock.h" #include "liboconfig/utils.h" diff --git a/src/backend/puppet/store-configs.c b/src/backend/puppet/store-configs.c index 4343920..a9a0ff7 100644 --- a/src/backend/puppet/store-configs.c +++ b/src/backend/puppet/store-configs.c @@ -28,8 +28,8 @@ #include "sysdb.h" #include "core/plugin.h" #include "core/store.h" -#include "core/error.h" #include "utils/dbi.h" +#include "utils/error.h" #include "liboconfig/utils.h" diff --git a/src/core/plugin.c b/src/core/plugin.c index 09d5cce..8200338 100644 --- a/src/core/plugin.c +++ b/src/core/plugin.c @@ -27,8 +27,8 @@ #include "sysdb.h" #include "core/plugin.h" -#include "core/error.h" #include "core/time.h" +#include "utils/error.h" #include "utils/llist.h" #include "utils/strbuf.h" diff --git a/src/core/store.c b/src/core/store.c index 587c527..8f5cae3 100644 --- a/src/core/store.c +++ b/src/core/store.c @@ -27,8 +27,8 @@ #include "sysdb.h" #include "core/store.h" -#include "core/error.h" #include "core/plugin.h" +#include "utils/error.h" #include "utils/llist.h" #include diff --git a/src/daemon/config.c b/src/daemon/config.c index beb0217..906f4c5 100644 --- a/src/daemon/config.c +++ b/src/daemon/config.c @@ -27,8 +27,8 @@ #include "sysdb.h" #include "core/plugin.h" -#include "core/error.h" #include "core/time.h" +#include "utils/error.h" #include "daemon/config.h" diff --git a/src/daemon/sysdbd.c b/src/daemon/sysdbd.c index 67d4515..6952c1c 100644 --- a/src/daemon/sysdbd.c +++ b/src/daemon/sysdbd.c @@ -32,7 +32,7 @@ #include "sysdb.h" #include "core/plugin.h" #include "core/store.h" -#include "core/error.h" +#include "utils/error.h" #include "frontend/sock.h" diff --git a/src/frontend/connection.c b/src/frontend/connection.c index 096a759..636396a 100644 --- a/src/frontend/connection.c +++ b/src/frontend/connection.c @@ -26,9 +26,9 @@ */ #include "sysdb.h" -#include "core/error.h" #include "core/object.h" #include "frontend/connection-private.h" +#include "utils/error.h" #include "utils/strbuf.h" #include "utils/proto.h" diff --git a/src/frontend/query.c b/src/frontend/query.c index fa493a6..b3bf05e 100644 --- a/src/frontend/query.c +++ b/src/frontend/query.c @@ -27,9 +27,9 @@ #include "sysdb.h" -#include "core/error.h" #include "core/store.h" #include "frontend/connection-private.h" +#include "utils/error.h" #include "utils/strbuf.h" #include diff --git a/src/frontend/sock.c b/src/frontend/sock.c index cac49e1..4cf1d79 100644 --- a/src/frontend/sock.c +++ b/src/frontend/sock.c @@ -26,12 +26,12 @@ */ #include "sysdb.h" -#include "core/error.h" #include "core/object.h" #include "frontend/connection-private.h" #include "frontend/sock.h" #include "utils/channel.h" +#include "utils/error.h" #include "utils/llist.h" #include "utils/strbuf.h" diff --git a/src/include/core/error.h b/src/include/utils/error.h similarity index 97% rename from src/include/core/error.h rename to src/include/utils/error.h index 1a55c3b..aaa288c 100644 --- a/src/include/core/error.h +++ b/src/include/utils/error.h @@ -1,5 +1,5 @@ /* - * SysDB - src/include/core/error.h + * SysDB - src/include/utils/error.h * Copyright (C) 2013 Sebastian 'tokkee' Harl * All rights reserved. * @@ -34,8 +34,8 @@ * message at once. The message will be sent to all registered log functions. */ -#ifndef SDB_CORE_ERROR_H -#define SDB_CORE_ERROR_H 1 +#ifndef SDB_UTILS_ERROR_H +#define SDB_UTILS_ERROR_H 1 #include @@ -133,7 +133,7 @@ sdb_strerror(int errnum, char *strerrbuf, size_t buflen); } /* extern "C" */ #endif -#endif /* ! SDB_CORE_ERROR_H */ +#endif /* ! SDB_UTILS_ERROR_H */ /* vim: set tw=78 sw=4 ts=4 noexpandtab : */ diff --git a/src/plugins/cname/dns.c b/src/plugins/cname/dns.c index d989e52..6f5d518 100644 --- a/src/plugins/cname/dns.c +++ b/src/plugins/cname/dns.c @@ -27,7 +27,7 @@ #include "sysdb.h" #include "core/plugin.h" -#include "core/error.h" +#include "utils/error.h" #include #include diff --git a/src/plugins/syslog.c b/src/plugins/syslog.c index b548988..a487521 100644 --- a/src/plugins/syslog.c +++ b/src/plugins/syslog.c @@ -27,7 +27,7 @@ #include "sysdb.h" #include "core/plugin.h" -#include "core/error.h" +#include "utils/error.h" #include #include diff --git a/src/utils/dbi.c b/src/utils/dbi.c index db93857..2692618 100644 --- a/src/utils/dbi.c +++ b/src/utils/dbi.c @@ -25,8 +25,8 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "core/error.h" #include "utils/dbi.h" +#include "utils/error.h" #include diff --git a/src/core/error.c b/src/utils/error.c similarity index 99% rename from src/core/error.c rename to src/utils/error.c index 7d14a25..5b9b448 100644 --- a/src/core/error.c +++ b/src/utils/error.c @@ -1,5 +1,5 @@ /* - * SysDB - src/core/error.c + * SysDB - src/utils/error.c * Copyright (C) 2013 Sebastian 'tokkee' Harl * All rights reserved. * @@ -25,8 +25,8 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "core/error.h" #include "core/plugin.h" +#include "utils/error.h" #include "utils/strbuf.h" #include diff --git a/src/utils/proto.c b/src/utils/proto.c index 85a4cb8..29783ef 100644 --- a/src/utils/proto.c +++ b/src/utils/proto.c @@ -25,8 +25,8 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "utils/error.h" #include "utils/proto.h" -#include "core/error.h" #include #include diff --git a/src/utils/unixsock.c b/src/utils/unixsock.c index 256cf9f..59bf563 100644 --- a/src/utils/unixsock.c +++ b/src/utils/unixsock.c @@ -25,8 +25,8 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "utils/error.h" #include "utils/unixsock.h" -#include "core/error.h" #include #include -- 2.30.2