master - libdaemon: header cleanup
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=b7741f0a831ef9dfd4fda19abba6ca8e91baa378 Commit: b7741f0a831ef9dfd4fda19abba6ca8e91baa378 Parent: e552824dc046b90f201de8041730f2dbf6969aa0 Author: Zdenek Kabelac <[email protected]> AuthorDate: Thu Apr 17 10:40:35 2014 +0200 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Fri Apr 18 16:38:49 2014 +0200
libdaemon: header cleanup
Ensure daemon-io.h is used as a generic header included with configure defines before other headers.
(In future all lvm2 libraries should settle on a single lib.h header) Rename couple defines to better match header file names.
--- libdaemon/client/config-util.c | 7 +++---- libdaemon/client/config-util.h | 3 +-- libdaemon/client/daemon-client.c | 2 -- libdaemon/client/daemon-client.h | 4 ++-- libdaemon/client/daemon-io.c | 6 +++--- libdaemon/client/daemon-io.h | 6 +++--- libdaemon/server/daemon-server.c | 1 - libdaemon/server/daemon-server.h | 4 ++-- 8 files changed, 14 insertions(+), 19 deletions(-)
libdaemon/client/config-util.c +3 -4
@@ -12,15 +12,14 @@* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "daemon-io.h" +#include "dm-logging.h" +#include <errno.h> #include <stdio.h> #include <string.h> #include <unistd.h> -#include "dm-logging.h" -#include "config-util.h" -#include "libdevmapper.h" -int buffer_append_vf (struct buffer *buf,va_list ap) {char *append;
libdaemon/client/config-util.h +1 -2
@@ -15,7 +15,6 @@#ifndef _LVM_DAEMON_CONFIG_UTIL_H#define _LVM_DAEMON_CONFIG_UTIL_H -#include "configure.h" #include "libdevmapper.h" #include <stdarg.h>
@@ -64,4 +63,4 @@ struct dm_config_node *config_make_nodes(struct dm_config_tree *cft, struct dm_config_node *pre_sib, ...); -#endif /* _LVM_DAEMON_SHARED_H */ +#endif /* _LVM_DAEMON_CONFIG_UTIL_H */
libdaemon/client/daemon-client.c +0 -2
@@ -13,7 +13,6 @@*/ #include "daemon-io.h" -#include "config-util.h" #include "daemon-client.h" #include "dm-logging.h"
@@ -208,4 +207,3 @@ void daemon_request_destroy(daemon_request r) {dm_config_destroy (r.cft);buffer_destroy (&r.buffer); } -
libdaemon/client/daemon-client.h +2 -2
@@ -12,8 +12,8 @@* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef _LVM_DAEMON_COMMON_CLIENT_H -#define _LVM_DAEMON_COMMON_CLIENT_H +#ifndef _LVM_DAEMON_CLIENT_H +#define _LVM_DAEMON_CLIENT_H#include "libdevmapper.h" #include "config-util.h"
libdaemon/client/daemon-io.c +3 -3
@@ -12,14 +12,14 @@* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "daemon-io.h" +#include "libdevmapper.h" +#include <errno.h> #include <stdio.h> #include <string.h> #include <unistd.h> -#include "daemon-io.h" -#include "libdevmapper.h" -/* * Read a single message from a (socket) filedescriptor. Messages are delimited * by blank lines. This call will block until all of a message is received. The
libdaemon/client/daemon-io.h +3 -3
@@ -16,16 +16,16 @@#define _LVM_DAEMON_IO_H#include "configure.h" -#include "config-util.h" -#include "libdevmapper.h" #define _REENTRANT#define _GNU_SOURCE#define _FILE_OFFSET_BITS 64 +#include "config-util.h" +/* TODO function names */ int buffer_read (int fd,struct buffer *buffer);int buffer_write (int fd,const struct buffer *buffer); -#endif /* _LVM_DAEMON_SHARED_H */ +#endif /* _LVM_DAEMON_IO_H */
libdaemon/server/daemon-server.c +0 -1
@@ -11,7 +11,6 @@*/ #include "daemon-io.h" -#include "config-util.h" #include "daemon-server.h" #include "daemon-log.h"
libdaemon/server/daemon-server.h +2 -2
@@ -12,8 +12,8 @@* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef _LVM_DAEMON_COMMON_SERVER_H -#define _LVM_DAEMON_COMMON_SERVER_H +#ifndef _LVM_DAEMON_SERVER_H +#define _LVM_DAEMON_SERVER_H#include "daemon-client.h"