X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;ds=sidebyside;f=tty.c;h=f3c7fb74f5ceefb3297a839c6b170ebfd1a6da3f;hb=89bc256c9480a137a2286b5b16ff4207e35659e5;hp=6f98d1b797404ce25829c19d7567a42471d85509;hpb=e5b6c7dd9cb32852a7f5b19a9855cf3c32543396;p=oweals%2Fbusybox.git diff --git a/tty.c b/tty.c index 6f98d1b79..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\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"; + "\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); }