Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F137081470
D6828.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
531 B
Referenced Files
None
Subscribers
None
D6828.id.diff
View Options
Index: head/usr.bin/tty/tty.c
===================================================================
--- head/usr.bin/tty/tty.c
+++ head/usr.bin/tty/tty.c
@@ -63,17 +63,18 @@
case '?':
default:
usage();
+ /* NOTREACHED */
}
- t = ttyname(0);
+ t = ttyname(STDIN_FILENO);
if (!sflag)
puts(t ? t : "not a tty");
- exit(t ? 0 : 1);
+ exit(t ? EXIT_SUCCESS : EXIT_FAILURE);
}
static void
usage(void)
{
- fprintf(stderr, "usage: tty [-s]\n");
+ fprintf(stderr, "usage: %s [-s]\n", getprogname());
exit(2);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 22, 2:48 AM (13 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25879681
Default Alt Text
D6828.id.diff (531 B)
Attached To
Mode
D6828: usr.bin/tty/tty.c: Use proper definition of exit status code and stdin macro
Attached
Detach File
Event Timeline
Log In to Comment