summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSusan Kamm-Worrell <Susan.Kamm-Worrell@Sun.COM>2010-07-02 07:28:02 -0700
committerSusan Kamm-Worrell <Susan.Kamm-Worrell@Sun.COM>2010-07-02 07:28:02 -0700
commit12a8b243cfaa0a3c7097fde03e4b94e7c49f0492 (patch)
tree9d0ba5003bd1860942dad29ae0bf713954a83d80
parentbe614d1f0a69404eb91b32b9dc9fb1d5d9ed0bd3 (diff)
downloadillumos-gate-12a8b243cfaa0a3c7097fde03e4b94e7c49f0492.tar.gz
6959462 fix for 6914152 was halfway done
-rw-r--r--usr/src/cmd/zonecfg/zonecfg.c15
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