mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
const: _ops segtype handler
This commit is contained in:
parent
effafa8fc8
commit
64cb8b5940
@ -423,7 +423,7 @@ static int _modules_needed(struct dm_pool *mem,
|
||||
}
|
||||
#endif /* DEVMAPPER_SUPPORT */
|
||||
|
||||
static struct segtype_handler _cache_pool_ops = {
|
||||
static const struct segtype_handler _cache_pool_ops = {
|
||||
.display = _cache_display,
|
||||
.text_import = _cache_pool_text_import,
|
||||
.text_import_area_count = _cache_pool_text_import_area_count,
|
||||
@ -762,7 +762,7 @@ static int _cache_add_target_line(struct dev_manager *dm,
|
||||
}
|
||||
#endif /* DEVMAPPER_SUPPORT */
|
||||
|
||||
static struct segtype_handler _cache_ops = {
|
||||
static const struct segtype_handler _cache_ops = {
|
||||
.display = _cache_display,
|
||||
.text_import = _cache_text_import,
|
||||
.text_import_area_count = _cache_text_import_area_count,
|
||||
|
@ -81,7 +81,7 @@ static void _errseg_destroy(struct segment_type *segtype)
|
||||
free(segtype);
|
||||
}
|
||||
|
||||
static struct segtype_handler _error_ops = {
|
||||
static const struct segtype_handler _error_ops = {
|
||||
.merge_segments = _errseg_merge_segments,
|
||||
#ifdef DEVMAPPER_SUPPORT
|
||||
.add_target_line = _errseg_add_target_line,
|
||||
|
@ -307,7 +307,7 @@ static int _integrity_add_target_line(struct dev_manager *dm,
|
||||
}
|
||||
#endif /* DEVMAPPER_SUPPORT */
|
||||
|
||||
static struct segtype_handler _integrity_ops = {
|
||||
static const struct segtype_handler _integrity_ops = {
|
||||
.display = _integrity_display,
|
||||
.text_import = _integrity_text_import,
|
||||
.text_import_area_count = _integrity_text_import_area_count,
|
||||
|
@ -236,7 +236,7 @@ struct segment_type {
|
||||
uint64_t flags;
|
||||
uint32_t parity_devs; /* Parity drives required by segtype */
|
||||
|
||||
struct segtype_handler *ops;
|
||||
const struct segtype_handler *ops;
|
||||
const char *name;
|
||||
const char *dso;
|
||||
|
||||
|
@ -491,7 +491,7 @@ static void _mirrored_destroy(struct segment_type *segtype)
|
||||
free(segtype);
|
||||
}
|
||||
|
||||
static struct segtype_handler _mirrored_ops = {
|
||||
static const struct segtype_handler _mirrored_ops = {
|
||||
.display = _mirrored_display,
|
||||
.text_import_area_count = _mirrored_text_import_area_count,
|
||||
.text_import = _mirrored_text_import,
|
||||
|
@ -616,7 +616,7 @@ static int _raid_target_unmonitor_events(struct lv_segment *seg, int events)
|
||||
# endif /* DMEVENTD */
|
||||
#endif /* DEVMAPPER_SUPPORT */
|
||||
|
||||
static struct segtype_handler _raid_ops = {
|
||||
static const struct segtype_handler _raid_ops = {
|
||||
.display = _raid_display,
|
||||
.text_import_area_count = _raid_text_import_area_count,
|
||||
.text_import = _raid_text_import,
|
||||
|
@ -229,7 +229,7 @@ static void _snap_destroy(struct segment_type *segtype)
|
||||
free(segtype);
|
||||
}
|
||||
|
||||
static struct segtype_handler _snapshot_ops = {
|
||||
static const struct segtype_handler _snapshot_ops = {
|
||||
.target_name = _snap_target_name,
|
||||
.text_import = _snap_text_import,
|
||||
.text_export = _snap_text_export,
|
||||
|
@ -216,7 +216,7 @@ static void _striped_destroy(struct segment_type *segtype)
|
||||
free(segtype);
|
||||
}
|
||||
|
||||
static struct segtype_handler _striped_ops = {
|
||||
static const struct segtype_handler _striped_ops = {
|
||||
.name = _striped_name,
|
||||
.display = _striped_display,
|
||||
.text_import_area_count = _striped_text_import_area_count,
|
||||
|
@ -743,7 +743,7 @@ static void _thin_destroy(struct segment_type *segtype)
|
||||
free(segtype);
|
||||
}
|
||||
|
||||
static struct segtype_handler _thin_pool_ops = {
|
||||
static const struct segtype_handler _thin_pool_ops = {
|
||||
.display = _thin_pool_display,
|
||||
.text_import = _thin_pool_text_import,
|
||||
.text_import_area_count = _thin_pool_text_import_area_count,
|
||||
@ -762,7 +762,7 @@ static struct segtype_handler _thin_pool_ops = {
|
||||
.destroy = _thin_destroy,
|
||||
};
|
||||
|
||||
static struct segtype_handler _thin_ops = {
|
||||
static const struct segtype_handler _thin_ops = {
|
||||
.display = _thin_display,
|
||||
.text_import = _thin_text_import,
|
||||
.text_export = _thin_text_export,
|
||||
@ -783,7 +783,7 @@ int init_multiple_segtypes(struct cmd_context *cmd, struct segtype_library *segl
|
||||
#endif
|
||||
{
|
||||
static const struct {
|
||||
struct segtype_handler *ops;
|
||||
const struct segtype_handler *ops;
|
||||
const char name[16];
|
||||
uint32_t flags;
|
||||
} reg_segtypes[] = {
|
||||
|
@ -54,7 +54,7 @@ static void _unknown_destroy(struct segment_type *segtype)
|
||||
free(segtype);
|
||||
}
|
||||
|
||||
static struct segtype_handler _unknown_ops = {
|
||||
static const struct segtype_handler _unknown_ops = {
|
||||
.text_import = _unknown_text_import,
|
||||
.text_export = _unknown_text_export,
|
||||
.destroy = _unknown_destroy,
|
||||
|
@ -562,7 +562,7 @@ static void _vdo_pool_destroy(struct segment_type *segtype)
|
||||
free((void *)segtype);
|
||||
}
|
||||
|
||||
static struct segtype_handler _vdo_ops = {
|
||||
static const struct segtype_handler _vdo_ops = {
|
||||
.name = _vdo_name,
|
||||
.display = _vdo_display,
|
||||
.text_import = _vdo_text_import,
|
||||
@ -578,7 +578,7 @@ static struct segtype_handler _vdo_ops = {
|
||||
.destroy = _vdo_pool_destroy,
|
||||
};
|
||||
|
||||
static struct segtype_handler _vdo_pool_ops = {
|
||||
static const struct segtype_handler _vdo_pool_ops = {
|
||||
.name = _vdo_pool_name,
|
||||
.display = _vdo_pool_display,
|
||||
.text_import = _vdo_pool_text_import,
|
||||
|
@ -357,7 +357,7 @@ static int _writecache_add_target_line(struct dev_manager *dm,
|
||||
}
|
||||
#endif /* DEVMAPPER_SUPPORT */
|
||||
|
||||
static struct segtype_handler _writecache_ops = {
|
||||
static const struct segtype_handler _writecache_ops = {
|
||||
.display = _writecache_display,
|
||||
.text_import = _writecache_text_import,
|
||||
.text_import_area_count = _writecache_text_import_area_count,
|
||||
|
@ -75,7 +75,7 @@ static void _zero_destroy(struct segment_type *segtype)
|
||||
free(segtype);
|
||||
}
|
||||
|
||||
static struct segtype_handler _zero_ops = {
|
||||
static const struct segtype_handler _zero_ops = {
|
||||
.merge_segments = _zero_merge_segments,
|
||||
#ifdef DEVMAPPER_SUPPORT
|
||||
.add_target_line = _zero_add_target_line,
|
||||
|
Loading…
Reference in New Issue
Block a user