mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
Fix the "const discarded" warnings introduced in the unknown segment patch.
This commit is contained in:
parent
1e2ed180ca
commit
6ce24f679a
@ -451,7 +451,7 @@ static int _write_value(struct output_line *outline, struct config_value *v)
|
|||||||
return 1;
|
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)
|
struct output_line *outline, int level)
|
||||||
{
|
{
|
||||||
char space[MAX_INDENT + 1];
|
char space[MAX_INDENT + 1];
|
||||||
@ -504,7 +504,7 @@ static int _write_config(struct config_node *n, int only_one,
|
|||||||
return 1;
|
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;
|
struct output_line outline;
|
||||||
outline.fp = NULL;
|
outline.fp = NULL;
|
||||||
|
@ -71,7 +71,7 @@ int write_config_file(struct config_tree *cft, const char *file,
|
|||||||
int argc, char **argv);
|
int argc, char **argv);
|
||||||
|
|
||||||
typedef int (*putline_fn)(const char *line, void *baton);
|
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);
|
time_t config_file_timestamp(struct config_tree *cft);
|
||||||
int config_file_changed(struct config_tree *cft);
|
int config_file_changed(struct config_tree *cft);
|
||||||
|
@ -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,
|
static int _unknown_text_import(struct lv_segment *seg, const struct config_node *sn,
|
||||||
struct dm_hash_table *pv_hash)
|
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");
|
log_verbose("importing unknown segment");
|
||||||
for (current = sn; current != NULL; current = current->sib) {
|
for (current = sn; current != NULL; current = current->sib) {
|
||||||
if (!strcmp(current->key, "type") || !strcmp(current->key, "start_extent") ||
|
if (!strcmp(current->key, "type") || !strcmp(current->key, "start_extent") ||
|
||||||
|
Loading…
Reference in New Issue
Block a user