diff options
Diffstat (limited to 'miscutils')
-rw-r--r-- | miscutils/hdparm.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/miscutils/hdparm.c b/miscutils/hdparm.c index 5703ece..512995a 100644 --- a/miscutils/hdparm.c +++ b/miscutils/hdparm.c @@ -2185,11 +2185,11 @@ int hdparm_main(int argc, char **argv) argc -= optind; argv += optind; -#if ENABLE_FEATURE_HDPARM_GET_IDENTITY if (argc < 1) { - identify_from_stdin(); /* EXIT */ + if (ENABLE_FEATURE_HDPARM_GET_IDENTITY && !isatty(STDIN_FILENO)) + identify_from_stdin(); /* EXIT */ + else bb_show_usage(); } -#endif while (argc--) { process_dev(*argv); |