aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/applets.h3
-rw-r--r--include/usage.h75
2 files changed, 78 insertions, 0 deletions
diff --git a/include/applets.h b/include/applets.h
index 5fe01de5f..2a90b66c5 100644
--- a/include/applets.h
+++ b/include/applets.h
@@ -241,6 +241,9 @@
#ifdef CONFIG_HALT
APPLET(halt, halt_main, _BB_DIR_SBIN, _BB_SUID_NEVER)
#endif
+#ifdef CONFIG_HDPARM
+ APPLET(hdparm, hdparm_main, _BB_DIR_SBIN, _BB_SUID_NEVER)
+#endif
#ifdef CONFIG_HEAD
APPLET(head, head_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)
#endif
diff --git a/include/usage.h b/include/usage.h
index d7de5e09e..6f8558800 100644
--- a/include/usage.h
+++ b/include/usage.h
@@ -805,6 +805,81 @@
#define halt_full_usage \
"Halt the system."
+#ifdef CONFIG_FEATURE_HDPARM_GET_IDENTITY
+#define USAGE_HDPARM_IDENT(a) a
+#else
+#define USAGE_HDPARM_IDENT(a)
+#endif
+
+#ifdef CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF
+#define USAGE_SCAN_HWIF(a) a
+#else
+#define USAGE_SCAN_HWIF(a)
+#endif
+
+#ifdef CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF
+#define USAGE_UNREGISTER_HWIF(a) a
+#else
+#define USAGE_UNREGISTER_HWIF(a)
+#endif
+
+#ifdef CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET
+#define USAGE_DRIVE_RESET(a) a
+#else
+#define USAGE_DRIVE_RESET(a)
+#endif
+
+#ifdef CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF
+#define USAGE_TRISTATE_HWIF(a) a
+#else
+#define USAGE_TRISTATE_HWIF(a)
+#endif
+
+#define hdparm_trivial_usage \
+ "[options] [device] .."
+#define hdparm_full_usage \
+ "Options:" \
+ " -a get/set fs readahead\n" \
+ " -A set drive read-lookahead flag (0/1)\n" \
+ " -b get/set bus state (0 == off, 1 == on, 2 == tristate)\n" \
+ " -B set Advanced Power Management setting (1-255)\n" \
+ " -c get/set IDE 32-bit IO setting\n" \
+ " -C check IDE power mode status\n" \
+ " -d get/set using_dma flag\n" \
+ " -D enable/disable drive defect-mgmt\n" \
+ " -f flush buffer cache for device on exit\n" \
+ " -g display drive geometry\n" \
+ " -h display terse usage information\n" \
+ " -i display drive identification\n" \
+ USAGE_HDPARM_IDENT(" -I detailed/current information directly from drive\n") \
+ USAGE_HDPARM_IDENT(" -Istdin similar to -I, but wants /proc/ide/" "*" "/hd?/identify as input\n") \
+ " -k get/set keep_settings_over_reset flag (0/1)\n" \
+ " -K set drive keep_features_over_reset flag (0/1)\n" \
+ " -L set drive doorlock (0/1) (removable harddisks only)\n" \
+ " -m get/set multiple sector count\n" \
+ " -n get/set ignore-write-errors flag (0/1)\n" \
+ " -p set PIO mode on IDE interface chipset (0,1,2,3,4,...)\n" \
+ " -P set drive prefetch count\n" \
+ " -q change next setting quietly\n" \
+ " -Q get/set DMA tagged-queuing depth (if supported)\n" \
+ " -r get/set readonly flag (DANGEROUS to set)\n" \
+ USAGE_SCAN_HWIF(" -R register an IDE interface (DANGEROUS)\n") \
+ " -S set standby (spindown) timeout\n" \
+ " -t perform device read timings\n" \
+ " -T perform cache read timings\n" \
+ " -u get/set unmaskirq flag (0/1)\n" \
+ USAGE_UNREGISTER_HWIF(" -U un-register an IDE interface (DANGEROUS)\n") \
+ " -v defaults; same as -mcudkrag for IDE drives\n" \
+ " -V display program version and exit immediately\n" \
+ USAGE_DRIVE_RESET(" -w perform device reset (DANGEROUS)\n") \
+ " -W set drive write-caching flag (0/1) (DANGEROUS)\n" \
+ USAGE_TRISTATE_HWIF(" -x tristate device for hotswap (0/1) (DANGEROUS)\n") \
+ " -X set IDE xfer mode (DANGEROUS)\n" \
+ " -y put IDE drive in standby mode\n" \
+ " -Y put IDE drive to sleep\n" \
+ " -Z disable Seagate auto-powersaving mode\n" \
+ " -z re-read partition table\n"
+
#ifdef CONFIG_FEATURE_FANCY_HEAD
#define USAGE_FANCY_HEAD(a) a
#else