diff options
author | Susan Kamm-Worrell <Susan.Kamm-Worrell@Sun.COM> | 2010-07-02 07:28:02 -0700 |
---|---|---|
committer | Susan Kamm-Worrell <Susan.Kamm-Worrell@Sun.COM> | 2010-07-02 07:28:02 -0700 |
commit | 12a8b243cfaa0a3c7097fde03e4b94e7c49f0492 (patch) | |
tree | 9d0ba5003bd1860942dad29ae0bf713954a83d80 | |
parent | be614d1f0a69404eb91b32b9dc9fb1d5d9ed0bd3 (diff) | |
download | illumos-gate-12a8b243cfaa0a3c7097fde03e4b94e7c49f0492.tar.gz |
6959462 fix for 6914152 was halfway done
-rw-r--r-- | usr/src/cmd/zonecfg/zonecfg.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/usr/src/cmd/zonecfg/zonecfg.c b/usr/src/cmd/zonecfg/zonecfg.c index 5261e82342..7a6e3cdcef 100644 --- a/usr/src/cmd/zonecfg/zonecfg.c +++ b/usr/src/cmd/zonecfg/zonecfg.c @@ -918,7 +918,7 @@ usage(boolean_t verbose, uint_t flags) FILE *fp = verbose ? stdout : stderr; FILE *newfp; boolean_t need_to_close = B_FALSE; - char *pager; + char *pager, *space; int i; struct stat statbuf; @@ -927,7 +927,12 @@ usage(boolean_t verbose, uint_t flags) if ((pager = getenv("PAGER")) == NULL) pager = PAGER; + space = strchr(pager, ' '); + if (space) + *space = '\0'; if (stat(pager, &statbuf) == 0) { + if (space) + *space = ' '; if ((newfp = popen(pager, "w")) != NULL) { need_to_close = B_TRUE; fp = newfp; @@ -5337,7 +5342,7 @@ info_func(cmd_t *cmd) { FILE *fp = stdout; boolean_t need_to_close = B_FALSE; - char *pager; + char *pager, *space; int type; int res1, res2; uint64_t swap_limit; @@ -5353,8 +5358,12 @@ info_func(cmd_t *cmd) if (interactive_mode) { if ((pager = getenv("PAGER")) == NULL) pager = PAGER; - + space = strchr(pager, ' '); + if (space) + *space = '\0'; if (stat(pager, &statbuf) == 0) { + if (space) + *space = ' '; if ((fp = popen(pager, "w")) != NULL) need_to_close = B_TRUE; else |