mirror of
https://github.com/sheumann/hush.git
synced 2024-09-12 00:55:11 +00:00
getopt -> getopt_ulflags. noticed by Rob Sullivan
This commit is contained in:
parent
5a5d0fa044
commit
70678bc5b6
16
procps/top.c
16
procps/top.c
@ -438,6 +438,7 @@ static void sig_catcher (int sig)
|
||||
int top_main(int argc, char **argv)
|
||||
{
|
||||
int opt, interval, lines, col;
|
||||
char *sinterval;
|
||||
#ifdef CONFIG_FEATURE_USE_TERMIOS
|
||||
struct termios new_settings;
|
||||
struct timeval tv;
|
||||
@ -446,18 +447,13 @@ int top_main(int argc, char **argv)
|
||||
struct sigaction sa;
|
||||
#endif /* CONFIG_FEATURE_USE_TERMIOS */
|
||||
|
||||
/* do normal option parsing */
|
||||
opt = bb_getopt_ulflags(argc, argv, "d:", &sinterval);
|
||||
if((opt & 1)) {
|
||||
interval = atoi(sinterval);
|
||||
} else {
|
||||
/* Default update rate is 5 seconds */
|
||||
interval = 5;
|
||||
|
||||
/* do normal option parsing */
|
||||
while ((opt = getopt(argc, argv, "d:")) > 0) {
|
||||
switch (opt) {
|
||||
case 'd':
|
||||
interval = atoi(optarg);
|
||||
break;
|
||||
default:
|
||||
bb_show_usage();
|
||||
}
|
||||
}
|
||||
|
||||
/* Default to 25 lines - 5 lines for status */
|
||||
|
Loading…
Reference in New Issue
Block a user