- /*
- * If the user has specified the default device name explicitly,
- * pretend they hadn't.
- */
- p = isatty(0)? ttyname(0): NULL;
- if (p == NULL) {
- if (default_device) {
- option_error("no device specified and stdin is not a tty");
- exit(1);
- }
- } else {
- if (default_device)
- strlcpy(devnam, p, sizeof(devnam));
- else if (strcmp(devnam, p) == 0)
- default_device = 1;