diff options
Diffstat (limited to 'meta/packages/busybox/busybox-1.01/hdparm_M.patch')
-rw-r--r-- | meta/packages/busybox/busybox-1.01/hdparm_M.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/meta/packages/busybox/busybox-1.01/hdparm_M.patch b/meta/packages/busybox/busybox-1.01/hdparm_M.patch new file mode 100644 index 0000000000..170906535e --- /dev/null +++ b/meta/packages/busybox/busybox-1.01/hdparm_M.patch | |||
@@ -0,0 +1,47 @@ | |||
1 | diff -Naur busybox-1.00/miscutils/hdparm.c busybox-1.00-patched/miscutils/hdparm.c | ||
2 | --- busybox-1.00/miscutils/hdparm.c 2004-07-21 00:53:59.000000000 +0200 | ||
3 | +++ busybox-1.00-patched/miscutils/hdparm.c 2004-10-21 15:17:13.000000000 +0200 | ||
4 | @@ -1254,6 +1254,7 @@ | ||
5 | static unsigned long set_sleepnow = 0, get_sleepnow = 0; | ||
6 | static unsigned long get_powermode = 0; | ||
7 | static unsigned long set_apmmode = 0, get_apmmode= 0, apmmode = 0; | ||
8 | +static unsigned long set_acoustic = 0, get_acoustic = 0, acoustic = 0; | ||
9 | #endif | ||
10 | #ifdef CONFIG_FEATURE_HDPARM_GET_IDENTITY | ||
11 | static int get_IDentity = 0; | ||
12 | @@ -2123,6 +2124,20 @@ | ||
13 | } | ||
14 | bb_ioctl(fd, HDIO_DRIVE_CMD, &args,"HDIO_DRIVE_CMD"); | ||
15 | } | ||
16 | + if (set_acoustic) | ||
17 | + { | ||
18 | + no_scsi(); | ||
19 | + acoustic=check_if_min_and_set_val(acoustic,0); | ||
20 | + acoustic=check_if_maj_and_set_val(acoustic,254); | ||
21 | + if_printf(get_acoustic," setting AAM level to 0x%02lX (%ld)\n", acoustic, acoustic); | ||
22 | + bb_ioctl(fd, HDIO_SET_ACOUSTIC, (int*)acoustic,"HDIO_SET_ACOUSTIC"); | ||
23 | + } | ||
24 | + if (get_acoustic) | ||
25 | + { | ||
26 | + no_scsi(); | ||
27 | + bb_ioctl(fd, HDIO_GET_ACOUSTIC, (unsigned long*)&parm,"HDIO_GET_ACOUSTIC"); | ||
28 | + printf(" acoustic = %2ld (128=quiet ... 254=fast)\n", parm); | ||
29 | + } | ||
30 | if (set_wcache) | ||
31 | { | ||
32 | #ifdef DO_FLUSHCACHE | ||
33 | @@ -2831,6 +2846,13 @@ | ||
34 | p = *argv++, --argc; | ||
35 | p=GET_NUMBER(p,&set_readahead,&Xreadahead); | ||
36 | break; | ||
37 | + case 'M': | ||
38 | + get_acoustic = noisy; | ||
39 | + noisy = 1; | ||
40 | + if (!*p && argc && isalnum(**argv)) | ||
41 | + p = *argv++, --argc; | ||
42 | + p=GET_NUMBER(p,&set_acoustic,&acoustic); | ||
43 | + break; | ||
44 | case 'B': | ||
45 | get_apmmode = noisy; | ||
46 | noisy = 1; | ||
47 | |||