Print this page
5558 pargs is missing -l option in usage
Reviewed by: Marcel Telka <marcel@telka.sk>
Reviewed by: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>


1314                 }
1315         }
1316 
1317         /* -a is the default if no options are specified */
1318         if ((aflag + eflag + xflag + lflag) == 0) {
1319                 aflag++;
1320                 content |= CC_CONTENT_STACK;
1321         }
1322 
1323         /* -l cannot be used with the -x or -e flags */
1324         if (lflag && (xflag || eflag)) {
1325                 (void) fprintf(stderr, "-l is incompatible with -x and -e\n");
1326                 errflg++;
1327         }
1328 
1329         argc -= optind;
1330         argv += optind;
1331 
1332         if (errflg || argc <= 0) {
1333                 (void) fprintf(stderr,
1334                     "usage:  %s [-acexF] { pid | core } ...\n"
1335                     "  (show process arguments and environment)\n"
1336                     "  -a: show process arguments (default)\n"
1337                     "  -c: interpret characters as 7-bit ascii regardless of "
1338                     "locale\n"
1339                     "  -e: show environment variables\n"

1340                     "  -l: display arguments as command line\n"
1341                     "  -x: show aux vector entries\n"
1342                     "  -F: force grabbing of the target process\n", command);
1343                 return (2);
1344         }
1345 
1346         while (argc-- > 0) {
1347                 char *arg;
1348                 int gret, r;
1349                 psinfo_t psinfo;
1350                 char *psargs_conv;
1351                 struct ps_prochandle *Pr;
1352                 pargs_data_t datap;
1353                 char *info;
1354                 size_t info_sz;
1355                 int pstate;
1356                 char execname[PATH_MAX];
1357                 int unprintable;
1358                 int diflocale;
1359 
1360                 (void) fflush(stdout);
1361                 arg = *argv++;
1362 




1314                 }
1315         }
1316 
1317         /* -a is the default if no options are specified */
1318         if ((aflag + eflag + xflag + lflag) == 0) {
1319                 aflag++;
1320                 content |= CC_CONTENT_STACK;
1321         }
1322 
1323         /* -l cannot be used with the -x or -e flags */
1324         if (lflag && (xflag || eflag)) {
1325                 (void) fprintf(stderr, "-l is incompatible with -x and -e\n");
1326                 errflg++;
1327         }
1328 
1329         argc -= optind;
1330         argv += optind;
1331 
1332         if (errflg || argc <= 0) {
1333                 (void) fprintf(stderr,
1334                     "usage:  %s [-aceFlx] { pid | core } ...\n"
1335                     "  (show process arguments and environment)\n"
1336                     "  -a: show process arguments (default)\n"
1337                     "  -c: interpret characters as 7-bit ascii regardless of "
1338                     "locale\n"
1339                     "  -e: show environment variables\n"
1340                     "  -F: force grabbing of the target process\n"
1341                     "  -l: display arguments as command line\n"
1342                     "  -x: show aux vector entries\n", command);

1343                 return (2);
1344         }
1345 
1346         while (argc-- > 0) {
1347                 char *arg;
1348                 int gret, r;
1349                 psinfo_t psinfo;
1350                 char *psargs_conv;
1351                 struct ps_prochandle *Pr;
1352                 pargs_data_t datap;
1353                 char *info;
1354                 size_t info_sz;
1355                 int pstate;
1356                 char execname[PATH_MAX];
1357                 int unprintable;
1358                 int diflocale;
1359 
1360                 (void) fflush(stdout);
1361                 arg = *argv++;
1362