summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2011-10-20 10:31:27 +0000
committerZdenek Kabelac <zkabelac@redhat.com>2011-10-20 10:31:27 +0000
commit7b199dc599dfa429b5075a3dcfd037d15181f708 (patch)
tree0e9d102b77dcee32fdfcb96dad8aecd46fc4a90c
parentd1a259d867bc9701148da5c39f0bdbcf932c6f41 (diff)
downloadlvm2-7b199dc599dfa429b5075a3dcfd037d15181f708.tar.gz
lvm2-7b199dc599dfa429b5075a3dcfd037d15181f708.tar.xz
lvm2-7b199dc599dfa429b5075a3dcfd037d15181f708.zip
Use const pointers in thin API were appropriate
-rw-r--r--lib/thin/thin.c4
-rw-r--r--libdm/libdevmapper.h2
-rw-r--r--libdm/libdm-deptree.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/thin/thin.c b/lib/thin/thin.c
index e3d95a81..1237b2ce 100644
--- a/lib/thin/thin.c
+++ b/lib/thin/thin.c
@@ -150,7 +150,7 @@ static int _thin_pool_text_import_area_count(const struct dm_config_node *sn,
static int _thin_pool_text_export(const struct lv_segment *seg, struct formatter *f)
{
unsigned cnt = 0;
- struct lv_thin_message *tmsg;
+ const struct lv_thin_message *tmsg;
outf(f, "pool = \"%s\"", seg_lv(seg, 0)->name);
outf(f, "metadata = \"%s\"", seg->pool_metadata_lv->name);
@@ -220,7 +220,7 @@ static int _thin_pool_add_target_line(struct dev_manager *dm,
uint32_t *pvmove_mirror_count __attribute__((unused)))
{
char *metadata_dlid, *pool_dlid;
- struct lv_thin_message *lmsg;
+ const struct lv_thin_message *lmsg;
struct dm_thin_message dmsg;
if (!(metadata_dlid = build_dm_uuid(mem, seg->pool_metadata_lv->lvid.s, NULL))) {
diff --git a/libdm/libdevmapper.h b/libdm/libdevmapper.h
index 87d6936b..a28a6f29 100644
--- a/libdm/libdevmapper.h
+++ b/libdm/libdevmapper.h
@@ -589,7 +589,7 @@ struct dm_thin_message {
};
int dm_tree_node_add_thin_pool_message(struct dm_tree_node *node,
- struct dm_thin_message *message);
+ const struct dm_thin_message *message);
int dm_tree_node_add_thin_target(struct dm_tree_node *node,
uint64_t size,
diff --git a/libdm/libdm-deptree.c b/libdm/libdm-deptree.c
index aebaf9e0..836bad3e 100644
--- a/libdm/libdm-deptree.c
+++ b/libdm/libdm-deptree.c
@@ -2874,7 +2874,7 @@ int dm_tree_node_add_thin_pool_target(struct dm_tree_node *node,
}
int dm_tree_node_add_thin_pool_message(struct dm_tree_node *node,
- struct dm_thin_message *message)
+ const struct dm_thin_message *message)
{
struct load_segment *seg;
struct thin_message *tm;