mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
nvpair: Constify string functions
After addressing coverity complaints involving `nvpair_name()`, the compiler started complaining about dropping const. This lead to a rabbit hole where not only `nvpair_name()` needed to be constified, but also `nvpair_value_string()`, `fnvpair_value_string()` and a few other static functions, plus variable pointers throughout the code. The result became a fairly big change, so it has been split out into its own patch. Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Closes #14612
This commit is contained in:
committed by
Brian Behlendorf
parent
50f6934b9c
commit
d1807f168e
@@ -70,7 +70,7 @@ zfs_allocatable_devs(nvlist_t *nv)
|
||||
boolean_t
|
||||
zfs_special_devs(nvlist_t *nv, const char *type)
|
||||
{
|
||||
char *bias;
|
||||
const char *bias;
|
||||
uint_t c;
|
||||
nvlist_t **child;
|
||||
uint_t children;
|
||||
@@ -98,7 +98,7 @@ zpool_get_load_policy(nvlist_t *nvl, zpool_load_policy_t *zlpp)
|
||||
{
|
||||
nvlist_t *policy;
|
||||
nvpair_t *elem;
|
||||
char *nm;
|
||||
const char *nm;
|
||||
|
||||
/* Defaults */
|
||||
zlpp->zlp_rewind = ZPOOL_NO_REWIND;
|
||||
|
||||
Reference in New Issue
Block a user