Changeset View
Changeset View
Standalone View
Standalone View
sys/contrib/openzfs/lib/libzfs_core/libzfs_core.c
Show First 20 Lines • Show All 1,619 Lines • ▼ Show 20 Lines | lzc_wait_fs(const char *fs, zfs_wait_activity_t activity, boolean_t *waited) | ||||
return (error); | return (error); | ||||
} | } | ||||
/* | /* | ||||
* Set the bootenv contents for the given pool. | * Set the bootenv contents for the given pool. | ||||
*/ | */ | ||||
int | int | ||||
lzc_set_bootenv(const char *pool, const char *env) | lzc_set_bootenv(const char *pool, const nvlist_t *env) | ||||
{ | { | ||||
nvlist_t *args = fnvlist_alloc(); | return (lzc_ioctl(ZFS_IOC_SET_BOOTENV, pool, (nvlist_t *)env, NULL)); | ||||
fnvlist_add_string(args, "envmap", env); | |||||
int error = lzc_ioctl(ZFS_IOC_SET_BOOTENV, pool, args, NULL); | |||||
fnvlist_free(args); | |||||
return (error); | |||||
} | } | ||||
/* | /* | ||||
* Get the contents of the bootenv of the given pool. | * Get the contents of the bootenv of the given pool. | ||||
*/ | */ | ||||
int | int | ||||
lzc_get_bootenv(const char *pool, nvlist_t **outnvl) | lzc_get_bootenv(const char *pool, nvlist_t **outnvl) | ||||
{ | { | ||||
return (lzc_ioctl(ZFS_IOC_GET_BOOTENV, pool, NULL, outnvl)); | return (lzc_ioctl(ZFS_IOC_GET_BOOTENV, pool, NULL, outnvl)); | ||||
} | } |