diff options
author | Alasdair G Kergon <agk@redhat.com> | 2015-07-06 17:30:18 +0100 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2015-07-06 17:30:18 +0100 |
commit | dfe3eb12d074eb25063ce62a913825cfbc90a37b (patch) | |
tree | 1d159754a08472fdc7f82fc74522bd2b6373e059 /libdaemon | |
parent | d3605b81f36d0e534172ab376466308042142ab8 (diff) | |
download | lvm2-dfe3eb12d074eb25063ce62a913825cfbc90a37b.tar.gz |
include: Standardise around new tool.h.
Diffstat (limited to 'libdaemon')
-rw-r--r-- | libdaemon/client/config-util.c | 10 | ||||
-rw-r--r-- | libdaemon/client/config-util.h | 4 | ||||
-rw-r--r-- | libdaemon/client/daemon-client.c | 8 | ||||
-rw-r--r-- | libdaemon/client/daemon-client.h | 1 | ||||
-rw-r--r-- | libdaemon/client/daemon-io.c | 8 | ||||
-rw-r--r-- | libdaemon/client/daemon-io.h | 6 | ||||
-rw-r--r-- | libdaemon/server/daemon-log.c | 17 | ||||
-rw-r--r-- | libdaemon/server/daemon-server.c | 6 |
8 files changed, 33 insertions, 27 deletions
diff --git a/libdaemon/client/config-util.c b/libdaemon/client/config-util.c index c417def36..895815c31 100644 --- a/libdaemon/client/config-util.c +++ b/libdaemon/client/config-util.c @@ -12,14 +12,12 @@ * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#define _REENTRANT + +#include "tool.h" + #include "daemon-io.h" #include "dm-logging.h" -#include "util.h" - -#include <errno.h> -#include <stdio.h> -#include <string.h> -#include <unistd.h> #include <math.h> /* fabs() */ #include <float.h> /* DBL_EPSILON */ diff --git a/libdaemon/client/config-util.h b/libdaemon/client/config-util.h index 3e0a23f17..0e7de7ead 100644 --- a/libdaemon/client/config-util.h +++ b/libdaemon/client/config-util.h @@ -15,10 +15,6 @@ #ifndef _LVM_DAEMON_CONFIG_UTIL_H #define _LVM_DAEMON_CONFIG_UTIL_H -#include "libdevmapper.h" - -#include <stdarg.h> - struct buffer { int allocated; int used; diff --git a/libdaemon/client/daemon-client.c b/libdaemon/client/daemon-client.c index 991bf8a0a..39a640108 100644 --- a/libdaemon/client/daemon-client.c +++ b/libdaemon/client/daemon-client.c @@ -12,16 +12,16 @@ * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#define _REENTRANT + +#include "tool.h" + #include "daemon-io.h" #include "daemon-client.h" #include "dm-logging.h" #include <sys/un.h> #include <sys/socket.h> -#include <string.h> -#include <stdio.h> -#include <unistd.h> -#include <errno.h> // ENOMEM daemon_handle daemon_open(daemon_info i) { diff --git a/libdaemon/client/daemon-client.h b/libdaemon/client/daemon-client.h index e1445c11b..7f8d2d4d7 100644 --- a/libdaemon/client/daemon-client.h +++ b/libdaemon/client/daemon-client.h @@ -15,7 +15,6 @@ #ifndef _LVM_DAEMON_CLIENT_H #define _LVM_DAEMON_CLIENT_H -#include "libdevmapper.h" #include "config-util.h" typedef struct { diff --git a/libdaemon/client/daemon-io.c b/libdaemon/client/daemon-io.c index 5ce9dde83..a9da68f42 100644 --- a/libdaemon/client/daemon-io.c +++ b/libdaemon/client/daemon-io.c @@ -12,13 +12,13 @@ * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#define _REENTRANT + +#include "tool.h" + #include "daemon-io.h" -#include "libdevmapper.h" #include <errno.h> -#include <stdio.h> -#include <string.h> -#include <unistd.h> /* * Read a single message from a (socket) filedescriptor. Messages are delimited diff --git a/libdaemon/client/daemon-io.h b/libdaemon/client/daemon-io.h index b48accac0..482f03388 100644 --- a/libdaemon/client/daemon-io.h +++ b/libdaemon/client/daemon-io.h @@ -15,12 +15,6 @@ #ifndef _LVM_DAEMON_IO_H #define _LVM_DAEMON_IO_H -#include "configure.h" - -#define _REENTRANT -#define _GNU_SOURCE -#define _FILE_OFFSET_BITS 64 - #include "config-util.h" /* TODO function names */ diff --git a/libdaemon/server/daemon-log.c b/libdaemon/server/daemon-log.c index c1765de3f..5ea5cdc76 100644 --- a/libdaemon/server/daemon-log.c +++ b/libdaemon/server/daemon-log.c @@ -1,5 +1,22 @@ +/* + * Copyright (C) 2011-2012 Red Hat, Inc. + * + * This copyrighted material is made available to anyone wishing to use, + * modify, copy, or redistribute it subject to the terms and conditions + * of the GNU Lesser General Public License v.2.1. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#define _REENTRANT + +#include "tool.h" + #include "daemon-server.h" #include "daemon-log.h" + #include <syslog.h> struct backend { diff --git a/libdaemon/server/daemon-server.c b/libdaemon/server/daemon-server.c index 8eda8cfb8..4f34aaf8d 100644 --- a/libdaemon/server/daemon-server.c +++ b/libdaemon/server/daemon-server.c @@ -10,6 +10,10 @@ * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#define _REENTRANT + +#include "tool.h" + #include "daemon-io.h" #include "daemon-server.h" #include "daemon-log.h" @@ -78,8 +82,6 @@ static void _exit_handler(int sig __attribute__((unused))) # define SD_LISTEN_FDS_START 3 # define SD_FD_SOCKET_SERVER SD_LISTEN_FDS_START -# include <stdio.h> - static int _is_idle(daemon_state s) { return s.idle && s.idle->is_idle && !s.threads->next; |