When reading a vdev label skip libzfs_core_init()
There's no need to call libzfs_core_init() when `zdb -l` is used to read a vdev label. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: tiehexue <tiehexue@hotmail.com> Closes #18606
This commit is contained in:
+1
-1
@@ -10230,7 +10230,7 @@ main(int argc, char **argv)
|
|||||||
* Automate cachefile
|
* Automate cachefile
|
||||||
*/
|
*/
|
||||||
if (!spa_config_path_env && !config_path_console && target &&
|
if (!spa_config_path_env && !config_path_console && target &&
|
||||||
libzfs_core_init() == 0) {
|
!dump_opt['l'] && libzfs_core_init() == 0) {
|
||||||
char *pname = strdup(target);
|
char *pname = strdup(target);
|
||||||
const char *value;
|
const char *value;
|
||||||
nvlist_t *pnvl = NULL;
|
nvlist_t *pnvl = NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user