9158a3f75983b5080f122e6cca38cbc07d3c1936
[hdw-linux/hdw-linux.git] / packages / hackbard / hdparm / readahead.patch
1 --- ./hdparm.c.orig     2004-07-14 14:31:02.000000000 +0200
2 +++ ./hdparm.c  2004-07-14 14:37:11.000000000 +0200
3 @@ -52,7 +52,7 @@
4  static int flagcount = 0, do_flush = 0, is_scsi_hd = 0, is_scsi_cd = 0, is_xt_hd = 0;
5  static int do_ctimings, do_timings = 0;
6  
7 -static unsigned long set_readahead= 0, get_readahead= 0, readahead= 0;     
8 +static unsigned long set_readahead= 0, get_readahead= 0, my_readahead= 0;     
9  static unsigned long set_readonly = 0, get_readonly = 0, readonly = 0;
10  static unsigned long set_unmask   = 0, get_unmask   = 0, unmask   = 0;     
11  static unsigned long set_mult     = 0, get_mult     = 0, mult     = 0;     
12 @@ -784,8 +784,8 @@
13  
14         if (set_readahead) {
15                 if (get_readahead)
16 -                       printf(" setting fs readahead to %ld\n", readahead);
17 -               if (ioctl(fd, BLKRASET, readahead)) 
18 +                       printf(" setting fs readahead to %ld\n", my_readahead);
19 +               if (ioctl(fd, BLKRASET, my_readahead)) 
20                         perror(" BLKRASET failed");
21         }
22  #ifdef HDIO_UNREGISTER_HWIF
23 @@ -1829,7 +1829,7 @@
24                                         case 'a':
25                                                 get_readahead = noisy;
26                                                 noisy = 1;
27 -                                               GET_NUMBER(set_readahead,readahead);
28 +                                               GET_NUMBER(set_readahead,my_readahead);
29                                                 break;
30                                         case 'B':
31                                                 get_apmmode = noisy;