]> sourceware.org Git - lvm2.git/commitdiff
const: _ops segtype handler
authorZdenek Kabelac <zkabelac@redhat.com>
Fri, 3 May 2024 09:59:05 +0000 (11:59 +0200)
committerZdenek Kabelac <zkabelac@redhat.com>
Fri, 3 May 2024 23:01:57 +0000 (01:01 +0200)
13 files changed:
lib/cache_segtype/cache.c
lib/error/errseg.c
lib/integrity/integrity.c
lib/metadata/segtype.h
lib/mirror/mirrored.c
lib/raid/raid.c
lib/snapshot/snapshot.c
lib/striped/striped.c
lib/thin/thin.c
lib/unknown/unknown.c
lib/vdo/vdo.c
lib/writecache/writecache.c
lib/zero/zero.c

index 20c575c8c48a0ed9f965d0472e99af76efbdf823..b6c47b07b1fe3c0639fb8e01bc22f9adb037fbb3 100644 (file)
@@ -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,
index bbdf235b8ec37b404fbc04e6d660f3b9caa14306..50f3b8c9022420b18bd5450012313ca319637615 100644 (file)
@@ -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,
index e4f99b4003a5c917d50aded4a1d9c449d43aed6b..1576c856f1503fd638302230676381788a5660ce 100644 (file)
@@ -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,
index 54f3f8330643d034192a1a3a4284a8463be18c3e..9f16cdb7c652f39ebbda0d72f9622c7f175ed14b 100644 (file)
@@ -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;
 
index 83f1bffcbff586bd2518c1d4a6aa80378a5b5ebf..cdf7a0d488a8710d346d4ca81640d6a546af4a57 100644 (file)
@@ -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,
index 2f1eb6cf860db192dd0c7d4bb46aa21a71573694..9732c3dd57632eb459e7f43a298d4719ae91d4be 100644 (file)
@@ -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,
index 8446a6914d6b0deb461694f301a29cbfe047678a..0ec5320c59a707c1c91baca27c4623335568d8aa 100644 (file)
@@ -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,
index efed16982e19d173e046b9df22e7e60827019618..1ff1ebdad69dd53b2902268c161885f4739c4a17 100644 (file)
@@ -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,
index 9ce04438d2f47a6f6a726917e6e081ca8a2e4911..eba2cce305adea953c1180694d769560e04f3245 100644 (file)
@@ -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[] = {
index b7c06ace6fc765273ee6e2314255d5a0a4e789de..51aaebba5808b0545cbc09593487a4802a5d2132 100644 (file)
@@ -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,
index 6d3b67421a97b03cb79b5ae227bad4a20da711a7..75a73eb57b86f81d9c83f53b272d7b25404f8380 100644 (file)
@@ -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,
index 8ccaca2d0ae5501ec0b69aae7d514efb28580664..4d56317f5da4033b8ec8184df9081cc0df7dd436 100644 (file)
@@ -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,
index cb204fc40e32d41784982983aab2167a3ff7959b..3e5bdbdc998830677f26fbc7f1dd798594fbd1ee 100644 (file)
@@ -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,
This page took 0.047826 seconds and 5 git commands to generate.