top: for symmetry with 'E' add 'e' command line switch
Several years after the 'e' & 'E' interactive commands were introduce to affect memory scaling, an 'E' switch was added. This was after discovering a dropped Redhat patch which provided a unique 'M' command line switch. If only for symmetry it makes sense to offer a similar command switch ('e') for the Task Area memory scaling. As was true with 'E', top's help text will show 'e' as if it were a switch without arguments in order to keep help text displayed without wrap in an 80x24 terminal. The man page, however, will show all of the arguments. Reference(s): https://gitlab.com/procps-ng/procps/-/issues/165 . 03/2017, added 'E' command line switch commitb2bd65407a
. 12/2012, added 'e' interactive command commit21e550bc08
. 12/2012, added 'E' interactive command commitbc46f67f9a
Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
@@ -3767,6 +3767,15 @@ static void parse_args (char **args) {
|
||||
if (0 > tmp_delay)
|
||||
error_exit(N_txt(DELAY_badarg_txt));
|
||||
break;
|
||||
case 'e':
|
||||
{ const char *get = "kmgtp", *got;
|
||||
if (cp[1]) cp++;
|
||||
else if (*args) cp = *args++;
|
||||
else error_exit(fmtmk(N_fmt(MISSING_args_fmt), ch));
|
||||
if (!(got = strchr(get, tolower(*cp))))
|
||||
error_exit(fmtmk(N_fmt(BAD_memscale_fmt), *cp));
|
||||
Rc.task_mscale = (int)(got - get);
|
||||
} goto bump_cp;
|
||||
case 'E':
|
||||
{ const char *get = "kmgtpe", *got;
|
||||
if (cp[1]) cp++;
|
||||
|
Reference in New Issue
Block a user