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 [email protected]
Reviewed by: Adam Leventhal [email protected]

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 <[email protected]>
  • Loading branch information
ahrens authored and FransUrbo committed Nov 5, 2014
1 parent 8475969 commit 2254cbd
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 2254cbd

Please sign in to comment.