diff options
-rw-r--r-- | include/usage.h | 2 | ||||
-rw-r--r-- | miscutils/hdparm.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/include/usage.h b/include/usage.h index 9bdfb3fe0..0349f6916 100644 --- a/include/usage.h +++ b/include/usage.h | |||
@@ -994,7 +994,7 @@ USE_FEATURE_DATE_ISOFMT( \ | |||
994 | #define hdparm_trivial_usage \ | 994 | #define hdparm_trivial_usage \ |
995 | "[options] [device] .." | 995 | "[options] [device] .." |
996 | #define hdparm_full_usage \ | 996 | #define hdparm_full_usage \ |
997 | USE_FEATURE_HDPARM_GET_IDENTITY("\tIf no device name is specified read from stdin.\n") \ | 997 | USE_FEATURE_HDPARM_GET_IDENTITY("\tIf no device name is specified try to read from stdin.\n") \ |
998 | "\nOptions:\n" \ | 998 | "\nOptions:\n" \ |
999 | "\t-a get/set fs readahead\n" \ | 999 | "\t-a get/set fs readahead\n" \ |
1000 | "\t-A set drive read-lookahead flag (0/1)\n" \ | 1000 | "\t-A set drive read-lookahead flag (0/1)\n" \ |
diff --git a/miscutils/hdparm.c b/miscutils/hdparm.c index 5703eceb5..512995a4b 100644 --- a/miscutils/hdparm.c +++ b/miscutils/hdparm.c | |||
@@ -2185,11 +2185,11 @@ int hdparm_main(int argc, char **argv) | |||
2185 | argc -= optind; | 2185 | argc -= optind; |
2186 | argv += optind; | 2186 | argv += optind; |
2187 | 2187 | ||
2188 | #if ENABLE_FEATURE_HDPARM_GET_IDENTITY | ||
2189 | if (argc < 1) { | 2188 | if (argc < 1) { |
2190 | identify_from_stdin(); /* EXIT */ | 2189 | if (ENABLE_FEATURE_HDPARM_GET_IDENTITY && !isatty(STDIN_FILENO)) |
2190 | identify_from_stdin(); /* EXIT */ | ||
2191 | else bb_show_usage(); | ||
2191 | } | 2192 | } |
2192 | #endif | ||
2193 | 2193 | ||
2194 | while (argc--) { | 2194 | while (argc--) { |
2195 | process_dev(*argv); | 2195 | process_dev(*argv); |