free, slabtop and uptime would happily take extra command line
arguments and doing nothing about them. The programs now check
optind after option processing and will give you usage screen
if there is anything extra.
References:
procps-ng/procps#181
* vmstat: Wide mode gives wider proc columns merge #48
* watch: Add environment variable for interval merge #62
* watch: Add no linewrap option issue #182
+ * free,uptime,slabtop: complain about extra ops issue #181
procps-ng-3.3.16
----------------
default:
usage(stderr);
}
+ if (optind != argc)
+ usage(stderr);
if (procps_meminfo_new(&mem_info) < 0)
xerrx(EXIT_FAILURE,
usage(stderr);
}
}
+ if (optind != argc)
+ usage(stderr);
}
static void print_summary (void)
usage(stderr);
}
+ if (optind != argc)
+ usage(stderr);
+
if (p)
printf("%s\n", procps_uptime_sprint_short());
else