svn commit: r304114 - stable/9/cddl/contrib/opensolaris/cmd/zdb
Andriy Gapon
avg at FreeBSD.org
Mon Aug 15 08:44:24 UTC 2016
Author: avg
Date: Mon Aug 15 08:44:22 2016
New Revision: 304114
URL: https://svnweb.freebsd.org/changeset/base/304114
Log:
MFC r303084: 6391 Override default SPA config location via environment
Note that there was a merge conflict because of an unmerged earlier
change.
Modified:
stable/9/cddl/contrib/opensolaris/cmd/zdb/zdb.c
Directory Properties:
stable/9/cddl/contrib/opensolaris/cmd/zdb/ (props changed)
Modified: stable/9/cddl/contrib/opensolaris/cmd/zdb/zdb.c
==============================================================================
--- stable/9/cddl/contrib/opensolaris/cmd/zdb/zdb.c Mon Aug 15 08:20:37 2016 (r304113)
+++ stable/9/cddl/contrib/opensolaris/cmd/zdb/zdb.c Mon Aug 15 08:44:22 2016 (r304114)
@@ -3273,12 +3273,22 @@ main(int argc, char **argv)
nvlist_t *policy = NULL;
uint64_t max_txg = UINT64_MAX;
int rewind = ZPOOL_NEVER_REWIND;
+ char *spa_config_path_env;
(void) setrlimit(RLIMIT_NOFILE, &rl);
(void) enable_extended_FILE_stdio(-1, -1);
dprintf_setup(&argc, argv);
+ /*
+ * If there is an environment variable SPA_CONFIG_PATH it overrides
+ * default spa_config_path setting. If -U flag is specified it will
+ * override this environment variable settings once again.
+ */
+ spa_config_path_env = getenv("SPA_CONFIG_PATH");
+ if (spa_config_path_env != NULL)
+ spa_config_path = spa_config_path_env;
+
while ((c = getopt(argc, argv, "bcdhilmM:suCDRSAFLXevp:t:U:P")) != -1) {
switch (c) {
case 'b':
More information about the svn-src-stable-9
mailing list