Skip to content

Const fixes

Zdenek Kabelac lvm-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest20 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/20Add more strict const pointers around config treelib/activate/activate.c lib/commands/toolcontext.c lib/config/config.c +17 more+105 -1010 replies
2/20Const fixes and additionslib/config/config.c lib/datastruct/btree.c lib/format_pool/format_pool.c +2 more+6 -60 replies
3/20Use const char* const *lib/device/dev-cache.c libdm/libdevmapper.h libdm/regex/matcher.c+4 -40 replies
4/20Remove wrong cast to (char*)liblvm/lvm_base.c+1 -10 replies
5/20Remove const from destroy callbacklib/error/errseg.c lib/format1/format1.c lib/format_pool/format_pool.c +10 more+24 -240 replies
6/20Replace void* arithmetic with char*lib/activate/activate.c tools/dmsetup.c+4 -40 replies
7/20Use const char * arithmetic for offset calculationlibdm/libdevmapper.h+1 -10 replies
8/20Use const char * for name and old_name in vglib/metadata/vg.h+2 -20 replies
9/20Replace stack trace with failure exit pathlib/filters/filter-regex.c+1 -10 replies
10/20Simplify usage fprintf clvmddaemons/clvmd/clvmd.c+20 -210 replies
11/20Add test for 'read' resulttools/lvmcmdline.c+10 -60 replies
12/20Add test for allocation results for node clonninglib/config/config.c+30 -170 replies
13/20Properly use dm_freedaemons/cmirrord/functions.c+12 -150 replies
14/20Remove dead store in _clog_ctrdaemons/cmirrord/functions.c+2 -30 replies
15/20Remove dead assignment in _init_logginglib/commands/toolcontext.c+1 -20 replies
16/20Remove dead store in lvm_run_commandtools/lvmcmdline.c+2 -20 replies
17/20Remove dead assignment in dev_manager_transientlib/activate/dev_manager.c+1 -10 replies
18/20Remove dead assignment in _removetools/dmsetup.c+1 -30 replies
19/20Remove unused dev_dir_providedtools/toollib.c+0 -20 replies
20/20Add internal error if pointer is uninitializedlib/format_pool/disk_rep.c+5 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/20] Const fixes

Primary reason for this patchset is to make stronger const limitation around config_tree handling. So we can be sure where this tree could be modified. It also cleanup quite a few hidden const warning (-Wbad-function-cast -Wcast-qual)

Patch is extended with few more minor patches gathers from my tree which should be easy to review. Some of them are probably some minor bugs in the code so it's worth to check them in.

Zdenek Kabelac (20):
Add more strict const pointers around config tree Const fixes and additions
Use const char* const *
Remove wrong cast to (char*)
Remove const from destroy callback
Replace void* arithmetic with char*
Use const char * arithmetic for offset calculation Use const char * for name and old_name in vg Replace stack trace with failure exit path Simplify usage fprintf clvmd
Add test for 'read' result
Add test for allocation results for node clonning Properly use dm_free
Remove dead store in _clog_ctr
Remove dead assignment in _init_logging Remove dead store in lvm_run_command Remove dead assignment in dev_manager_transient Remove dead assignment in _remove
Remove unused dev_dir_provided
Add internal error if pointer is uninitialized

 daemons/clvmd/clvmd.c           |   41 ++++++++--------
 daemons/cmirrord/functions.c    |   32 +++++-------
 lib/activate/activate.c         |    6 +-
 lib/activate/dev_manager.c      |    2 +-
 lib/commands/toolcontext.c      |   17 +++----
 lib/config/config.c             |  100 ++++++++++++++++++++++----------------
 lib/config/config.h             |   14 +++---
 lib/datastruct/btree.c          |    2 +-
 lib/device/dev-cache.c          |    6 +-
 lib/error/errseg.c              |    4 +-
 lib/filters/filter-persistent.c |    2 +-
 lib/filters/filter-regex.c      |    8 ++--
 lib/filters/filter-regex.h      |    2 +-
 lib/filters/filter.c            |    4 +-
 lib/format1/format1.c           |    4 +-
 lib/format_pool/disk_rep.c      |    5 ++
 lib/format_pool/format_pool.c   |    6 +-
 lib/format_text/flags.c         |    2 +-
 lib/format_text/format-text.c   |   12 ++--
 lib/format_text/import-export.h |   12 ++--
 lib/format_text/import.c        |    2 +-
 lib/format_text/import_vsn1.c   |   67 +++++++++++++-------------
 lib/format_text/tags.c          |    2 +-
 lib/freeseg/freeseg.c           |    4 +-
 lib/metadata/lv_manip.c         |    4 +-
 lib/metadata/metadata.h         |    4 +-
 lib/metadata/segtype.h          |    4 +-
 lib/metadata/vg.h               |    4 +-
 lib/mirror/mirrored.c           |    8 ++--
 lib/mm/memlock.c                |    2 +-
 lib/replicator/replicator.c     |    8 ++--
 lib/snapshot/snapshot.c         |    4 +-
 lib/striped/striped.c           |    6 +-
 lib/unknown/unknown.c           |    4 +-
 lib/zero/zero.c                 |    4 +-
 libdm/libdevmapper.h            |    4 +-
 libdm/regex/matcher.c           |    2 +-
 liblvm/lvm_base.c               |    2 +-
 tools/dmsetup.c                 |   10 ++--
 tools/lvmcmdline.c              |   20 +++++---
 tools/toollib.c                 |    2 -
 41 files changed, 232 insertions(+), 216 deletions(-)
Signature · 1 line
1.7.3.3