2
* Copyright (C) 2011-2012 Red Hat, Inc.
4
* This file is part of LVM2.
6
* This copyrighted material is made available to anyone wishing to use,
7
* modify, copy, or redistribute it subject to the terms and conditions
8
* of the GNU Lesser General Public License v.2.1.
10
* You should have received a copy of the GNU Lesser General Public License
11
* along with this program; if not, write to the Free Software Foundation,
12
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
15
#ifndef _LVM_DAEMON_CONFIG_UTIL_H
16
#define _LVM_DAEMON_CONFIG_UTIL_H
18
#include "configure.h"
19
#include "libdevmapper.h"
29
int buffer_append_vf(struct buffer *buf, va_list ap);
30
int buffer_append_f(struct buffer *buf, ...);
31
int buffer_append(struct buffer *buf, const char *string);
32
void buffer_init(struct buffer *buf);
33
void buffer_destroy(struct buffer *buf);
34
int buffer_realloc(struct buffer *buf, int required);
36
int buffer_line(const char *line, void *baton);
38
int set_flag(struct dm_config_tree *cft, struct dm_config_node *parent,
39
const char *field, const char *flag, int want);
41
struct dm_config_node *make_config_node(struct dm_config_tree *cft,
43
struct dm_config_node *parent,
44
struct dm_config_node *pre_sib);
46
struct dm_config_node *make_text_node(struct dm_config_tree *cft,
49
struct dm_config_node *parent,
50
struct dm_config_node *pre_sib);
52
struct dm_config_node *make_int_node(struct dm_config_tree *cft,
55
struct dm_config_node *parent,
56
struct dm_config_node *pre_sib);
58
struct dm_config_node *config_make_nodes_v(struct dm_config_tree *cft,
59
struct dm_config_node *parent,
60
struct dm_config_node *pre_sib,
62
struct dm_config_node *config_make_nodes(struct dm_config_tree *cft,
63
struct dm_config_node *parent,
64
struct dm_config_node *pre_sib,
67
#endif /* _LVM_DAEMON_SHARED_H */