mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
const: _ops text_vg_version
This commit is contained in:
parent
41ffa8c74d
commit
ff699eab24
@ -61,7 +61,7 @@ struct text_vg_version_ops {
|
||||
struct lvmcache_vgsummary *vgsummary);
|
||||
};
|
||||
|
||||
struct text_vg_version_ops *text_vg_vsn1_init(void);
|
||||
const struct text_vg_version_ops *text_vg_vsn1_init(void);
|
||||
|
||||
int print_flags(char *buffer, size_t size, enum pv_vg_lv_e type, int mask, uint64_t status);
|
||||
int read_flags(uint64_t *status, enum pv_vg_lv_e type, int mask, const struct dm_config_value *cv);
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include "import-export.h"
|
||||
|
||||
/* FIXME Use tidier inclusion method */
|
||||
static struct text_vg_version_ops *(_text_vsn_list[2]);
|
||||
static const struct text_vg_version_ops *(_text_vsn_list[2]);
|
||||
|
||||
static int _text_import_initialised = 0;
|
||||
|
||||
@ -45,7 +45,7 @@ int text_read_metadata_summary(const struct format_type *fmt,
|
||||
struct lvmcache_vgsummary *vgsummary)
|
||||
{
|
||||
struct dm_config_tree *cft;
|
||||
struct text_vg_version_ops **vsn;
|
||||
const struct text_vg_version_ops **vsn;
|
||||
int r = 0;
|
||||
|
||||
_init_text_import();
|
||||
@ -117,7 +117,7 @@ struct volume_group *text_read_metadata(struct format_instance *fid,
|
||||
{
|
||||
struct volume_group *vg = NULL;
|
||||
struct dm_config_tree *cft;
|
||||
struct text_vg_version_ops **vsn;
|
||||
const struct text_vg_version_ops **vsn;
|
||||
int skip_parse;
|
||||
|
||||
/*
|
||||
@ -219,7 +219,7 @@ static struct volume_group *_import_vg_from_config_tree(struct cmd_context *cmd,
|
||||
const struct dm_config_tree *cft)
|
||||
{
|
||||
struct volume_group *vg = NULL;
|
||||
struct text_vg_version_ops **vsn;
|
||||
const struct text_vg_version_ops **vsn;
|
||||
int vg_missing;
|
||||
|
||||
_init_text_import();
|
||||
@ -256,7 +256,7 @@ struct volume_group *import_vg_from_config_tree(struct cmd_context *cmd,
|
||||
|
||||
struct volume_group *vg_from_config_tree(struct cmd_context *cmd, const struct dm_config_tree *cft)
|
||||
{
|
||||
static struct text_vg_version_ops *ops;
|
||||
const struct text_vg_version_ops *ops;
|
||||
|
||||
_init_text_import();
|
||||
|
||||
|
@ -1359,14 +1359,14 @@ static int _read_vgsummary(const struct format_type *fmt, const struct dm_config
|
||||
return 1;
|
||||
}
|
||||
|
||||
static struct text_vg_version_ops _vsn1_ops = {
|
||||
static const struct text_vg_version_ops _vsn1_ops = {
|
||||
.check_version = _vsn1_check_version,
|
||||
.read_vg = _read_vg,
|
||||
.read_desc = _read_desc,
|
||||
.read_vgsummary = _read_vgsummary
|
||||
};
|
||||
|
||||
struct text_vg_version_ops *text_vg_vsn1_init(void)
|
||||
const struct text_vg_version_ops *text_vg_vsn1_init(void)
|
||||
{
|
||||
return &_vsn1_ops;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user