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 <adam.leventhal@delphix.com> Reviewed by: Christopher Siden <christopher.siden@delphix.com> Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Saso Kiselkov <skiselkov.ml@gmail.com> Approved by: Dan McDonald <danmcd@omniti.com> 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 <turbo@bayour.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #2669
This commit is contained in:
parent
ecfb0b5f42
commit
308a451f7f
@ -6661,6 +6661,8 @@ main(int argc, char **argv)
|
||||
(void) setlocale(LC_ALL, "");
|
||||
(void) textdomain(TEXT_DOMAIN);
|
||||
|
||||
dprintf_setup(&argc, argv);
|
||||
|
||||
opterr = 0;
|
||||
|
||||
/*
|
||||
|
@ -5879,6 +5879,8 @@ main(int argc, char **argv)
|
||||
(void) setlocale(LC_ALL, "");
|
||||
(void) textdomain(TEXT_DOMAIN);
|
||||
|
||||
dprintf_setup(&argc, argv);
|
||||
|
||||
opterr = 0;
|
||||
|
||||
/*
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user