summaryrefslogtreecommitdiff
path: root/packages/busybox/busybox-1.00/hdparm_M.patch
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2005-06-30 08:19:37 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2005-06-30 08:19:37 +0000
commitc8e5702127e507e82e6f68a4b8c546803accea9d (patch)
tree00583491f40ecc640f2b28452af995e3a63a09d7 /packages/busybox/busybox-1.00/hdparm_M.patch
parent87ec8ca4d2e2eb4d1c1e1e1a6b46a395d56805b9 (diff)
import clean BK tree at cset 1.3670
Diffstat (limited to 'packages/busybox/busybox-1.00/hdparm_M.patch')
-rw-r--r--packages/busybox/busybox-1.00/hdparm_M.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/packages/busybox/busybox-1.00/hdparm_M.patch b/packages/busybox/busybox-1.00/hdparm_M.patch
index e69de29bb2..170906535e 100644
--- a/packages/busybox/busybox-1.00/hdparm_M.patch
+++ b/packages/busybox/busybox-1.00/hdparm_M.patch
@@ -0,0 +1,47 @@
+diff -Naur busybox-1.00/miscutils/hdparm.c busybox-1.00-patched/miscutils/hdparm.c
+--- busybox-1.00/miscutils/hdparm.c 2004-07-21 00:53:59.000000000 +0200
++++ busybox-1.00-patched/miscutils/hdparm.c 2004-10-21 15:17:13.000000000 +0200
+@@ -1254,6 +1254,7 @@
+ static unsigned long set_sleepnow = 0, get_sleepnow = 0;
+ static unsigned long get_powermode = 0;
+ static unsigned long set_apmmode = 0, get_apmmode= 0, apmmode = 0;
++static unsigned long set_acoustic = 0, get_acoustic = 0, acoustic = 0;
+ #endif
+ #ifdef CONFIG_FEATURE_HDPARM_GET_IDENTITY
+ static int get_IDentity = 0;
+@@ -2123,6 +2124,20 @@
+ }
+ bb_ioctl(fd, HDIO_DRIVE_CMD, &args,"HDIO_DRIVE_CMD");
+ }
++ if (set_acoustic)
++ {
++ no_scsi();
++ acoustic=check_if_min_and_set_val(acoustic,0);
++ acoustic=check_if_maj_and_set_val(acoustic,254);
++ if_printf(get_acoustic," setting AAM level to 0x%02lX (%ld)\n", acoustic, acoustic);
++ bb_ioctl(fd, HDIO_SET_ACOUSTIC, (int*)acoustic,"HDIO_SET_ACOUSTIC");
++ }
++ if (get_acoustic)
++ {
++ no_scsi();
++ bb_ioctl(fd, HDIO_GET_ACOUSTIC, (unsigned long*)&parm,"HDIO_GET_ACOUSTIC");
++ printf(" acoustic = %2ld (128=quiet ... 254=fast)\n", parm);
++ }
+ if (set_wcache)
+ {
+ #ifdef DO_FLUSHCACHE
+@@ -2831,6 +2846,13 @@
+ p = *argv++, --argc;
+ p=GET_NUMBER(p,&set_readahead,&Xreadahead);
+ break;
++ case 'M':
++ get_acoustic = noisy;
++ noisy = 1;
++ if (!*p && argc && isalnum(**argv))
++ p = *argv++, --argc;
++ p=GET_NUMBER(p,&set_acoustic,&acoustic);
++ break;
+ case 'B':
+ get_apmmode = noisy;
+ noisy = 1;
+