Skip to content

Commit

Permalink
2669: turbo/illumos-5134 - if ZFS_DEBUG or debug= is set, libzpool sh…
Browse files Browse the repository at this point in the history
…ould enable debug prints

Reviewed by: Christopher Siden christopher.siden@delphix.com
Reviewed by: Adam Leventhal adam.leventhal@delphix.com

References:
  https://www.illumos.org/projects/illumos-gate/issues/5134
  illumos/illumos-gate@7fa49ea

Porting notes:
  Run dprintf_setup() in main.

Ported by: Turbo Fredriksson <turbo@bayour.com>
  • Loading branch information
ahrens authored and FransUrbo committed Nov 27, 2014
1 parent 9ec04f2 commit 0d39c81
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/zpool/zpool_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -5851,6 +5851,8 @@ main(int argc, char **argv)
(void) setlocale(LC_ALL, "");
(void) textdomain(TEXT_DOMAIN);

dprintf_setup(&argc, argv);

opterr = 0;

/*
Expand Down
3 changes: 3 additions & 0 deletions lib/libzpool/kernel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/*
Expand Down

0 comments on commit 0d39c81

Please sign in to comment.