diff options
author | Matthew Ahrens <[email protected]> | 2014-09-06 00:03:09 +0200 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2015-04-28 10:13:40 -0700 |
commit | 308a451f7f5ecded4f194a50abab5ca123b6d397 (patch) | |
tree | f5d7d487e24c5ea7a0ddeb67ab7e2a5d4e1578be /lib/libzpool | |
parent | ecfb0b5f42c3662e36d5cd444c0aa2ebc8501589 (diff) |
Illumos 5134 - if ZFS_DEBUG or debug= is set, libzpool should enable debug prints
5134 if ZFS_DEBUG or debug= is set, libzpool should enable debug prints
Reviewed by: Adam Leventhal <[email protected]>
Reviewed by: Christopher Siden <[email protected]>
Reviewed by: George Wilson <[email protected]>
Reviewed by: Saso Kiselkov <[email protected]>
Approved by: Dan McDonald <[email protected]>
References:
https://www.illumos.org/projects/illumos-gate/issues/5134
https://github.com/illumos/illumos-gate/commit/7fa49ea
Porting notes:
Added dprintf_setup() to main in zfs_main.c and zpool_main.c.
Ported by: Turbo Fredriksson <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #2669
Diffstat (limited to 'lib/libzpool')
-rw-r--r-- | lib/libzpool/kernel.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libzpool/kernel.c b/lib/libzpool/kernel.c index 9136560df..85fe24afd 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; } /* |