* Remove first one with matching name and type */
| 962 | * Remove first one with matching name and type |
| 963 | */ |
| 964 | int |
| 965 | nvlist_remove(nvlist_t *nvl, const char *name, data_type_t type) |
| 966 | { |
| 967 | if (nvl == NULL || name == NULL || nvl->nvl_priv == 0) |
| 968 | return (EINVAL); |
| 969 | |
| 970 | nvpair_t *nvp = nvt_lookup_name_type(nvl, name, type); |
| 971 | if (nvp == NULL) |
| 972 | return (ENOENT); |
| 973 | |
| 974 | return (nvlist_remove_nvpair(nvl, nvp)); |
| 975 | } |
| 976 | |
| 977 | int |
| 978 | nvlist_remove_nvpair(nvlist_t *nvl, nvpair_t *nvp) |
no test coverage detected