]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
common: add cmd_getval_cast_or()
authorRonen Friedman <rfriedma@redhat.com>
Wed, 12 Mar 2025 09:26:54 +0000 (04:26 -0500)
committerRonen Friedman <rfriedma@redhat.com>
Wed, 19 Mar 2025 07:12:02 +0000 (02:12 -0500)
commitae1e251c5f3287701f5bb2b22ce0a9a1580ddfc7
tree96287c2d0a4293e115a057342c339e646ddcdddf
parent6e4da22a7242cc55af47d19c01c94c6966851f4a
common: add cmd_getval_cast_or()

This slight variation of cmd_getval_or() can be used where
the object type is different from the configuration item
type (as when the object is a wrapper around an integer).
It allows specifying the 'default' value in the object type.

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
src/common/cmdparse.h