summaryrefslogtreecommitdiff
path: root/lib/snapshot
diff options
context:
space:
mode:
authorPetr Rockai <prockai@redhat.com>2011-08-30 14:55:15 +0000
committerPetr Rockai <prockai@redhat.com>2011-08-30 14:55:15 +0000
commite59e2f7c3c1e2fa170dfca2ee0c29cca2d4f55c1 (patch)
tree197a579049ddab74d8944939a45f8e0d46b6c3cf /lib/snapshot
parentd35188058be01bd29128dcf1f5b79220fbcb135b (diff)
downloadlvm2-e59e2f7c3c1e2fa170dfca2ee0c29cca2d4f55c1.tar.gz
Move the core of the lib/config/config.c functionality into libdevmapper,
leaving behind the LVM-specific parts of the code (convenience wrappers that handle `struct device` and `struct cmd_context`, basically). A number of functions have been renamed (in addition to getting a dm_ prefix) -- namely, all of the config interface now has a dm_config_ prefix.
Diffstat (limited to 'lib/snapshot')
-rw-r--r--lib/snapshot/snapshot.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/snapshot/snapshot.c b/lib/snapshot/snapshot.c
index 8c4830895..ddb9f7f50 100644
--- a/lib/snapshot/snapshot.c
+++ b/lib/snapshot/snapshot.c
@@ -37,7 +37,7 @@ static const char *_snap_target_name(const struct lv_segment *seg,
return _snap_name(seg);
}
-static int _snap_text_import(struct lv_segment *seg, const struct config_node *sn,
+static int _snap_text_import(struct lv_segment *seg, const struct dm_config_node *sn,
struct dm_hash_table *pv_hash __attribute__((unused)))
{
uint32_t chunk_size;
@@ -45,28 +45,28 @@ static int _snap_text_import(struct lv_segment *seg, const struct config_node *s
struct logical_volume *org, *cow;
int old_suppress, merge = 0;
- if (!get_config_uint32(sn, "chunk_size", &chunk_size)) {
+ if (!dm_config_get_uint32(sn, "chunk_size", &chunk_size)) {
log_error("Couldn't read chunk size for snapshot.");
return 0;
}
old_suppress = log_suppress(1);
- if ((cow_name = find_config_str(sn, "merging_store", NULL))) {
- if (find_config_str(sn, "cow_store", NULL)) {
+ if ((cow_name = dm_config_find_str(sn, "merging_store", NULL))) {
+ if (dm_config_find_str(sn, "cow_store", NULL)) {
log_suppress(old_suppress);
log_error("Both snapshot cow and merging storage were specified.");
return 0;
}
merge = 1;
}
- else if (!(cow_name = find_config_str(sn, "cow_store", NULL))) {
+ else if (!(cow_name = dm_config_find_str(sn, "cow_store", NULL))) {
log_suppress(old_suppress);
log_error("Snapshot cow storage not specified.");
return 0;
}
- if (!(org_name = find_config_str(sn, "origin", NULL))) {
+ if (!(org_name = dm_config_find_str(sn, "origin", NULL))) {
log_suppress(old_suppress);
log_error("Snapshot origin not specified.");
return 0;