mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
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.
This commit is contained in:
parent
e552824dc0
commit
b7741f0a83
@ -12,15 +12,14 @@
|
|||||||
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "daemon-io.h"
|
||||||
|
#include "dm-logging.h"
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.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)
|
int buffer_append_vf(struct buffer *buf, va_list ap)
|
||||||
{
|
{
|
||||||
char *append;
|
char *append;
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
#ifndef _LVM_DAEMON_CONFIG_UTIL_H
|
#ifndef _LVM_DAEMON_CONFIG_UTIL_H
|
||||||
#define _LVM_DAEMON_CONFIG_UTIL_H
|
#define _LVM_DAEMON_CONFIG_UTIL_H
|
||||||
|
|
||||||
#include "configure.h"
|
|
||||||
#include "libdevmapper.h"
|
#include "libdevmapper.h"
|
||||||
|
|
||||||
#include <stdarg.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,
|
struct dm_config_node *pre_sib,
|
||||||
...);
|
...);
|
||||||
|
|
||||||
#endif /* _LVM_DAEMON_SHARED_H */
|
#endif /* _LVM_DAEMON_CONFIG_UTIL_H */
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "daemon-io.h"
|
#include "daemon-io.h"
|
||||||
#include "config-util.h"
|
|
||||||
#include "daemon-client.h"
|
#include "daemon-client.h"
|
||||||
#include "dm-logging.h"
|
#include "dm-logging.h"
|
||||||
|
|
||||||
@ -208,4 +207,3 @@ void daemon_request_destroy(daemon_request r) {
|
|||||||
dm_config_destroy(r.cft);
|
dm_config_destroy(r.cft);
|
||||||
buffer_destroy(&r.buffer);
|
buffer_destroy(&r.buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _LVM_DAEMON_COMMON_CLIENT_H
|
#ifndef _LVM_DAEMON_CLIENT_H
|
||||||
#define _LVM_DAEMON_COMMON_CLIENT_H
|
#define _LVM_DAEMON_CLIENT_H
|
||||||
|
|
||||||
#include "libdevmapper.h"
|
#include "libdevmapper.h"
|
||||||
#include "config-util.h"
|
#include "config-util.h"
|
||||||
|
@ -12,14 +12,14 @@
|
|||||||
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "daemon-io.h"
|
||||||
|
#include "libdevmapper.h"
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include "daemon-io.h"
|
|
||||||
#include "libdevmapper.h"
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Read a single message from a (socket) filedescriptor. Messages are delimited
|
* 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
|
* by blank lines. This call will block until all of a message is received. The
|
||||||
|
@ -16,16 +16,16 @@
|
|||||||
#define _LVM_DAEMON_IO_H
|
#define _LVM_DAEMON_IO_H
|
||||||
|
|
||||||
#include "configure.h"
|
#include "configure.h"
|
||||||
#include "config-util.h"
|
|
||||||
#include "libdevmapper.h"
|
|
||||||
|
|
||||||
#define _REENTRANT
|
#define _REENTRANT
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
#define _FILE_OFFSET_BITS 64
|
#define _FILE_OFFSET_BITS 64
|
||||||
|
|
||||||
|
#include "config-util.h"
|
||||||
|
|
||||||
/* TODO function names */
|
/* TODO function names */
|
||||||
|
|
||||||
int buffer_read(int fd, struct buffer *buffer);
|
int buffer_read(int fd, struct buffer *buffer);
|
||||||
int buffer_write(int fd, const struct buffer *buffer);
|
int buffer_write(int fd, const struct buffer *buffer);
|
||||||
|
|
||||||
#endif /* _LVM_DAEMON_SHARED_H */
|
#endif /* _LVM_DAEMON_IO_H */
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "daemon-io.h"
|
#include "daemon-io.h"
|
||||||
#include "config-util.h"
|
|
||||||
#include "daemon-server.h"
|
#include "daemon-server.h"
|
||||||
#include "daemon-log.h"
|
#include "daemon-log.h"
|
||||||
|
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _LVM_DAEMON_COMMON_SERVER_H
|
#ifndef _LVM_DAEMON_SERVER_H
|
||||||
#define _LVM_DAEMON_COMMON_SERVER_H
|
#define _LVM_DAEMON_SERVER_H
|
||||||
|
|
||||||
#include "daemon-client.h"
|
#include "daemon-client.h"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user