1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Fix the "const discarded" warnings introduced in the unknown segment patch.

This commit is contained in:
Petr Rockai 2009-10-22 10:38:07 +00:00
parent 1e2ed180ca
commit 6ce24f679a
3 changed files with 5 additions and 4 deletions

View File

@ -451,7 +451,7 @@ static int _write_value(struct output_line *outline, struct config_value *v)
return 1;
}
static int _write_config(struct config_node *n, int only_one,
static int _write_config(const struct config_node *n, int only_one,
struct output_line *outline, int level)
{
char space[MAX_INDENT + 1];
@ -504,7 +504,7 @@ static int _write_config(struct config_node *n, int only_one,
return 1;
}
int write_config_node(struct config_node *cn, putline_fn putline, void *baton)
int write_config_node(const struct config_node *cn, putline_fn putline, void *baton)
{
struct output_line outline;
outline.fp = NULL;

View File

@ -71,7 +71,7 @@ int write_config_file(struct config_tree *cft, const char *file,
int argc, char **argv);
typedef int (*putline_fn)(const char *line, void *baton);
int write_config_node(struct config_node *cn, putline_fn putline, void *baton);
int write_config_node(const struct config_node *cn, putline_fn putline, void *baton);
time_t config_file_timestamp(struct config_tree *cft);
int config_file_changed(struct config_tree *cft);

View File

@ -35,7 +35,8 @@ static const char *_unknown_name(const struct lv_segment *seg)
static int _unknown_text_import(struct lv_segment *seg, const struct config_node *sn,
struct dm_hash_table *pv_hash)
{
struct config_node *new, *last = NULL, *current, *head = NULL;
struct config_node *new, *last = NULL, *head = NULL;
const struct config_node *current;
log_verbose("importing unknown segment");
for (current = sn; current != NULL; current = current->sib) {
if (!strcmp(current->key, "type") || !strcmp(current->key, "start_extent") ||