X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;ds=sidebyside;f=tty.c;h=f3c7fb74f5ceefb3297a839c6b170ebfd1a6da3f;hb=89bc256c9480a137a2286b5b16ff4207e35659e5;hp=8ac1c1fcd1d28501c08612aeb5dbf86bae3451e3;hpb=e49d5ecbbe51718fa925b6890a735e5937cc2aa2;p=oweals%2Fbusybox.git diff --git a/tty.c b/tty.c index 8ac1c1fcd..f3c7fb74f 100644 --- a/tty.c +++ b/tty.c @@ -24,10 +24,13 @@ #include #include -static const char tty_usage[] = "tty\n\n" - "Print the file name of the terminal connected to standard input.\n" - - "\t-s\tprint nothing, only return an exit status\n"; +static const char tty_usage[] = "tty\n" +#ifndef BB_FEATURE_TRIVIAL_HELP + "\nPrint the file name of the terminal connected to standard input.\n\n" + "Options:\n" + "\t-s\tprint nothing, only return an exit status\n" +#endif + ; extern int tty_main(int argc, char **argv) { @@ -43,5 +46,5 @@ extern int tty_main(int argc, char **argv) else puts("not a tty"); } - exit(isatty(0) ? TRUE : FALSE); + return(isatty(0) ? TRUE : FALSE); }