version 1.22, 2006/04/26 02:32:41 |
version 1.23, 2006/04/26 02:35:08 |
|
|
usemine = 1; |
usemine = 1; |
break; |
break; |
case 't': |
case 't': |
sectimeout = strtonum(optarg, 1, INT_MAX, &errstr); |
sectimeout = (int)strtonum(optarg, 1, INT_MAX, &errstr); |
if (errstr) |
if (errstr) |
errx(1, "timeout %s: %s", errstr, optarg); |
errx(1, "timeout %s: %s", errstr, optarg); |
break; |
break; |
|
|
exit(0); |
exit(0); |
} |
} |
|
|
|
/*ARGSUSED*/ |
void |
void |
hi(int dummy) |
hi(int signo) |
{ |
{ |
char buf[1024], buf2[1024]; |
char buf[1024], buf2[1024]; |
time_t now; |
time_t now; |
|
|
(void)snprintf(buf2, sizeof buf2, " timeout in %d:%d minutes", |
(void)snprintf(buf2, sizeof buf2, " timeout in %d:%d minutes", |
(nexttime - now) / 60, (nexttime - now) % 60); |
(nexttime - now) / 60, (nexttime - now) % 60); |
} |
} |
snprintf(buf, sizeof buf, "%s: type in the unlock key.%s\n", |
(void)snprintf(buf, sizeof buf, "%s: type in the unlock key.%s\n", |
__progname, buf2); |
__progname, buf2); |
(void) write(STDERR_FILENO, buf, strlen(buf)); |
(void) write(STDERR_FILENO, buf, strlen(buf)); |
} |
} |
|
|
|
/*ARGSUSED*/ |
void |
void |
bye(int dummy) |
bye(int signo) |
{ |
{ |
|
|
if (!no_timeout) |
if (!no_timeout) |