factor: fix comments
[oweals/busybox.git] / coreutils / tty.c
index 282d9680f44f55da24c20ca2034fd0a77bc9bfbb..359e5bc9314b1a8a416f967eb34ebfa8d192cf30 100644 (file)
@@ -6,10 +6,32 @@
  *
  * Licensed under GPLv2 or later, see file LICENSE in this source tree.
  */
+//config:config TTY
+//config:      bool "tty"
+//config:      default y
+//config:      help
+//config:        tty is used to print the name of the current terminal to
+//config:        standard output.
+
+//applet:IF_TTY(APPLET(tty, BB_DIR_USR_BIN, BB_SUID_DROP))
+
+//kbuild:lib-$(CONFIG_TTY) += tty.o
 
 /* BB_AUDIT SUSv4 compliant */
 /* http://www.opengroup.org/onlinepubs/9699919799/utilities/tty.html */
 
+//usage:#define tty_trivial_usage
+//usage:       ""
+//usage:#define tty_full_usage "\n\n"
+//usage:       "Print file name of stdin's terminal"
+//usage:       IF_INCLUDE_SUSv2( "\n"
+//usage:     "\n       -s      Print nothing, only return exit status"
+//usage:       )
+//usage:
+//usage:#define tty_example_usage
+//usage:       "$ tty\n"
+//usage:       "/dev/tty2\n"
+
 #include "libbb.h"
 
 int tty_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;