diff options
author | Eric Andersen | 2003-08-06 08:57:35 +0000 |
---|---|---|
committer | Eric Andersen | 2003-08-06 08:57:35 +0000 |
commit | 0a57a79e387060e790d99e7d186be919dee3f92f (patch) | |
tree | aa5a9cb452a81f7226a55d6554adce918fcb64c0 /miscutils/hdparm.c | |
parent | 4b4e09854c55b060fb36ffc17b7dc08b98a9f387 (diff) | |
download | busybox-0a57a79e387060e790d99e7d186be919dee3f92f.zip busybox-0a57a79e387060e790d99e7d186be919dee3f92f.tar.gz |
Patch from Steven Scholz:
should we rename the define into CONFIG_FEATURE_HDPARM_HDIO_DMA and
use it for "set" and "get" ???
Since although CONFIG_FEATURE_HDPARM_HDIO_GET_DMA is _not_ set I still
can use "hdparm -d 1 /dev/hda" to switch the DMA on.
Is this desireable or meant to be like that?
So how about the applied patch?
Diffstat (limited to 'miscutils/hdparm.c')
-rw-r--r-- | miscutils/hdparm.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/miscutils/hdparm.c b/miscutils/hdparm.c index eb4991e..0263f28 100644 --- a/miscutils/hdparm.c +++ b/miscutils/hdparm.c @@ -1820,6 +1820,7 @@ static void process_dev (char *devname) if (ioctl(fd, HDIO_SET_UNMASKINTR, unmask)) bb_perror_msg(" HDIO_SET_UNMASKINTR failed"); } +#ifdef CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA if (set_dma) { no_scsi(); if (get_dma) { @@ -1829,6 +1830,7 @@ static void process_dev (char *devname) if (ioctl(fd, HDIO_SET_DMA, dma)) bb_perror_msg(" HDIO_SET_DMA failed"); } +#endif /* CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA */ if (set_dma_q) { no_scsi(); if (get_dma_q) { @@ -2080,7 +2082,7 @@ static void process_dev (char *devname) } } -#ifdef CONFIG_FEATURE_HDPARM_HDIO_GET_DMA +#ifdef CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA if ((verbose && !is_scsi_hd) || get_dma) { no_scsi(); if (ioctl(fd, HDIO_GET_DMA, &parm)) @@ -2382,6 +2384,7 @@ int hdparm_main(int argc, char **argv) unmask = *p++ - '0'; } break; +#ifdef CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA case 'd': get_dma = noisy; noisy = 1; @@ -2392,6 +2395,7 @@ int hdparm_main(int argc, char **argv) dma = *p++ - '0'; } break; +#endif /* CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA */ case 'n': get_nowerr = noisy; noisy = 1; |