MCPcopy Create free account
hub / github.com/F-Stack/f-stack / nvlist_remove_all

Function nvlist_remove_all

freebsd/contrib/openzfs/module/nvpair/nvpair.c:944–959  ·  view source on GitHub ↗

* Remove all with matching name */

Source from the content-addressed store, hash-verified

942 * Remove all with matching name
943 */
944int
945nvlist_remove_all(nvlist_t *nvl, const char *name)
946{
947 int error = ENOENT;
948
949 if (nvl == NULL || name == NULL || nvl->nvl_priv == 0)
950 return (EINVAL);
951
952 nvpair_t *nvp;
953 while ((nvp = nvt_lookup_name(nvl, name)) != NULL) {
954 VERIFY0(nvlist_remove_nvpair(nvl, nvp));
955 error = 0;
956 }
957
958 return (error);
959}
960
961/*
962 * Remove first one with matching name and type

Callers 15

nvlist_add_commonFunction · 0.85
fnvlist_removeFunction · 0.85
zfs_ioc_pool_createFunction · 0.85
zfs_fill_zplprops_implFunction · 0.85
spa_prop_validateFunction · 0.85
vdev_draid_spare_createFunction · 0.85
spa_history_log_nvlFunction · 0.85
zvol_create_cbFunction · 0.85
vdev_config_generateFunction · 0.85

Calls 2

nvt_lookup_nameFunction · 0.85
nvlist_remove_nvpairFunction · 0.85

Tested by

no test coverage detected