master - libdaemon: Split daemon-shared.[hc] into daemon-io.[hc] and config-util.[hc].
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=662a2122f6224b5404d9f1276868bc3069766c49 Commit: 662a2122f6224b5404d9f1276868bc3069766c49 Parent: 4ece923a4b8a38fd794ac1cc83d887747db6edda Author: Petr Rockai <[email protected]> AuthorDate: Wed Sep 26 14:44:03 2012 +0200 Committer: Petr Rockai <[email protected]> CommitterDate: Wed Sep 26 17:26:23 2012 +0200
libdaemon: Split daemon-shared.[hc] into daemon-io.[hc] and config-util.[hc].
--- daemons/lvmetad/lvmetad-core.c | 3 +- include/.symlinks.in | 3 +- lib/cache/lvmetad.h | 2 +- libdaemon/client/Makefile.in | 2 +- libdaemon/client/config-util.c | 288 ++++++++++++++++++++++++++++++ libdaemon/client/config-util.h | 58 ++++++ libdaemon/client/daemon-client.c | 4 +- libdaemon/client/daemon-io.c | 99 ++++++++++ libdaemon/client/daemon-io.h | 30 +++ libdaemon/client/daemon-shared.c | 365 -------------------------------------- libdaemon/client/daemon-shared.h | 66 ------- libdaemon/server/daemon-server.c | 3 +- 12 files changed, 486 insertions(+), 437 deletions(-)
daemons/lvmetad/lvmetad-core.c +2 -1
@@ -15,7 +15,8 @@#define _XOPEN_SOURCE 500/* pthread */ #include "configure.h" -#include "daemon-shared.h" +#include "daemon-io.h" +#include "config-util.h" #include "daemon-server.h" #include "daemon-log.h"
include/.symlinks.in +2 -1
@@ -61,7 +61,8 @@ @top_srcdir@/lib/report/report.h @top_srcdir@/lib/uuid/uuid.h @top_srcdir@/libdaemon/client/daemon-client.h - at top_srcdir@/libdaemon/client/daemon-shared.h + at top_srcdir@/libdaemon/client/daemon-io.h + at top_srcdir@/libdaemon/client/config-util.h @top_srcdir@/libdm/libdevmapper.h @top_srcdir@/libdm/misc/dm-ioctl.h @top_srcdir@/libdm/misc/dm-logging.h
lib/cache/lvmetad.h +1 -1
@@ -15,7 +15,7 @@#ifndef _LVM_METAD_H#define _LVM_METAD_H -#include "daemon-shared.h" // XXX +#include "config-util.h" struct volume_group ;struct cmd_context ;
libdaemon/client/Makefile.in +1 -1
@@ -15,6 +15,6 @@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ LIB_STATIC = libdaemonclient.a -SOURCES = daemon-shared.c daemon-client.c +SOURCES = daemon-io.c config-util.c daemon-client.c include $(top_builddir)/make.tmpl
libdaemon/client/config-util.c new file +288 -0
288 lines not on this page · raw message
libdaemon/client/config-util.h new file +58 -0
58 lines not on this page · raw message
libdaemon/client/daemon-client.c +3 -1
@@ -12,8 +12,10 @@* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "daemon-shared.h" +#include "daemon-io.h" +#include "config-util.h" #include "daemon-client.h" +#include "dm-logging.h" #include <sys/un.h> #include <sys/socket.h>
libdaemon/client/daemon-io.c new file +99 -0
99 lines not on this page · raw message
libdaemon/client/daemon-io.h new file +30 -0
@@ -0,0 +1,30 @@ +/* +* Copyright (C) 2011-2012 Red Hat, Inc. +* +* This file is part of LVM2. +* +* 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 +*/ + +#ifndef _LVM_DAEMON_IO_H +#define _LVM_DAEMON_IO_H + +#include "configure.h" +#include "libdevmapper.h" + +#define _REENTRANT +#define _GNU_SOURCE +#define _FILE_OFFSET_BITS 64 + +/* TODO function names */ + +int read_buffer (int fd,char **buffer); +int write_buffer (int fd,const char *buffer,int length); + +#endif /* _LVM_DAEMON_SHARED_H */
libdaemon/client/daemon-shared.c deleted +0 -365
365 lines not on this page · raw message
libdaemon/client/daemon-shared.h deleted +0 -66
66 lines not on this page · raw message
libdaemon/server/daemon-server.c +2 -1
@@ -10,7 +10,8 @@* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "daemon-shared.h" +#include "daemon-io.h" +#include "config-util.h" #include "daemon-server.h" #include "daemon-log.h"