Date: Mon, 15 Aug 2016 08:44:48 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r304115 - stable/10/cddl/contrib/opensolaris/cmd/zdb Message-ID: <201608150844.u7F8imER052606@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avg Date: Mon Aug 15 08:44:48 2016 New Revision: 304115 URL: https://svnweb.freebsd.org/changeset/base/304115 Log: MFC r303084: 6391 Override default SPA config location via environment Modified: stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c Mon Aug 15 08:44:22 2016 (r304114) +++ stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c Mon Aug 15 08:44:48 2016 (r304115) @@ -3559,12 +3559,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, "bcdhilmMI:suCDRSAFLXx:evp:t:U:P")) != -1) { switch (c) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201608150844.u7F8imER052606>