summaryrefslogtreecommitdiffstats
path: root/libdaemon/client
diff options
context:
space:
mode:
Diffstat (limited to 'libdaemon/client')
-rw-r--r--libdaemon/client/daemon-client.c17
-rw-r--r--libdaemon/client/daemon-client.h6
-rw-r--r--libdaemon/client/daemon-shared.c16
-rw-r--r--libdaemon/client/daemon-shared.h26
4 files changed, 60 insertions, 5 deletions
diff --git a/libdaemon/client/daemon-client.c b/libdaemon/client/daemon-client.c
index 558f770e..3b336a32 100644
--- a/libdaemon/client/daemon-client.c
+++ b/libdaemon/client/daemon-client.c
@@ -1,5 +1,20 @@
-#include "daemon-client.h"
+/*
+ * 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
+ */
+
#include "daemon-shared.h"
+#include "daemon-client.h"
+
#include <sys/un.h>
#include <sys/socket.h>
#include <string.h>
diff --git a/libdaemon/client/daemon-client.h b/libdaemon/client/daemon-client.h
index 9f99fcfb..7b2a8067 100644
--- a/libdaemon/client/daemon-client.h
+++ b/libdaemon/client/daemon-client.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011 Red Hat, Inc. All rights reserved.
+ * Copyright (C) 2011-2012 Red Hat, Inc.
*
* This file is part of LVM2.
*
@@ -12,11 +12,11 @@
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "libdevmapper.h" // for dm_list, needed by config.h
-
#ifndef _LVM_DAEMON_COMMON_CLIENT_H
#define _LVM_DAEMON_COMMON_CLIENT_H
+#include "libdevmapper.h"
+
typedef struct {
int socket_fd; /* the fd we use to talk to the daemon */
const char *protocol;
diff --git a/libdaemon/client/daemon-shared.c b/libdaemon/client/daemon-shared.c
index 5301d2f9..33ff48f7 100644
--- a/libdaemon/client/daemon-shared.c
+++ b/libdaemon/client/daemon-shared.c
@@ -1,10 +1,26 @@
+/*
+ * 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
+ */
+
#include <errno.h>
#include <stdio.h>
#include <malloc.h>
#include <string.h>
#include <unistd.h>
#include <assert.h>
+
#include "daemon-shared.h"
+#include "libdevmapper.h"
/*
* Read a single message from a (socket) filedescriptor. Messages are delimited
diff --git a/libdaemon/client/daemon-shared.h b/libdaemon/client/daemon-shared.h
index a15e6fdd..3e5fa9cb 100644
--- a/libdaemon/client/daemon-shared.h
+++ b/libdaemon/client/daemon-shared.h
@@ -1,6 +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_SHARED_H
+#define _LVM_DAEMON_SHARED_H
+
+#include "configure.h"
+
+#define _REENTRANT
+#define _GNU_SOURCE
+#define _FILE_OFFSET_BITS 64
+
#include <stdarg.h>
-#include <libdevmapper.h>
int read_buffer(int fd, char **buffer);
int write_buffer(int fd, const char *buffer, int length);
char *format_buffer(const char *what, const char *id, va_list ap);
+
+#endif /* _LVM_DAEMON_SHARED_H */