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
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;
10 #ifdef CONFIG_FEATURE_HDPARM_GET_IDENTITY
11 static int get_IDentity = 0;
12 @@ -2123,6 +2124,20 @@
14 bb_ioctl(fd, HDIO_DRIVE_CMD, &args,"HDIO_DRIVE_CMD");
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");
27 + bb_ioctl(fd, HDIO_GET_ACOUSTIC, (unsigned long*)&parm,"HDIO_GET_ACOUSTIC");
28 + printf(" acoustic = %2ld (128=quiet ... 254=fast)\n", parm);
33 @@ -2831,6 +2846,13 @@
35 p=GET_NUMBER(p,&set_readahead,&Xreadahead);
38 + get_acoustic = noisy;
40 + if (!*p && argc && isalnum(**argv))
41 + p = *argv++, --argc;
42 + p=GET_NUMBER(p,&set_acoustic,&acoustic);