diff --git a/cmd/zfs/zfs_main.c b/cmd/zfs/zfs_main.c index 5b469cfc7f..c361e18b9f 100644 --- a/cmd/zfs/zfs_main.c +++ b/cmd/zfs/zfs_main.c @@ -6661,6 +6661,8 @@ main(int argc, char **argv) (void) setlocale(LC_ALL, ""); (void) textdomain(TEXT_DOMAIN); + dprintf_setup(&argc, argv); + opterr = 0; /* diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c index 9e37eb228a..ca37374751 100644 --- a/cmd/zpool/zpool_main.c +++ b/cmd/zpool/zpool_main.c @@ -5879,6 +5879,8 @@ main(int argc, char **argv) (void) setlocale(LC_ALL, ""); (void) textdomain(TEXT_DOMAIN); + dprintf_setup(&argc, argv); + opterr = 0; /* diff --git a/lib/libzpool/kernel.c b/lib/libzpool/kernel.c index 9136560df2..85fe24afde 100644 --- a/lib/libzpool/kernel.c +++ b/lib/libzpool/kernel.c @@ -837,6 +837,9 @@ dprintf_setup(int *argc, char **argv) */ if (dprintf_find_string("on")) dprintf_print_all = 1; + + if (dprintf_string != NULL) + zfs_flags |= ZFS_DEBUG_DPRINTF; } /*