View | Details | Raw Unified | Return to bug 88319
Collapse All | Expand All

(-)files/patch-ad (-15 / +20 lines)
Lines 1-14 Link Here
1
--- rawio.c.orig	Sun Nov 26 22:28:19 2000
1
2
+++ rawio.c	Wed Oct 26 14:07:30 2005
2
$FreeBSD$
3
@@ -58,6 +58,7 @@
3
4
--- rawio.c.orig
5
+++ rawio.c
6
@@ -57,7 +57,9 @@
7
 #include <sys/ioctl.h>
4
 #endif
8
 #endif
5
 #ifdef BSD4_4
9
 #ifdef BSD4_4
10
+#include <sys/queue.h>
6
 #include <sys/disklabel.h>
11
 #include <sys/disklabel.h>
7
+#include <sys/disk.h>
12
+#include <sys/disk.h>
8
 #endif
13
 #endif
9
 #include "randoms.h"
14
 #include "randoms.h"
10
 
15
 
11
@@ -99,6 +100,7 @@
16
@@ -99,6 +101,7 @@
12
 char *buf;						    /* and what we're using, for alignment */
17
 char *buf;						    /* and what we're using, for alignment */
13
 int file;
18
 int file;
14
 size_t length;
19
 size_t length;
Lines 16-22 Link Here
16
 
21
 
17
 int count;
22
 int count;
18
 enum operation
23
 enum operation
19
@@ -331,13 +333,7 @@
24
@@ -331,13 +334,7 @@
20
 	maxchunk = (size_t) atoi (arg);
25
 	maxchunk = (size_t) atoi (arg);
21
 	if (maxchunk < (size_t) 512)
26
 	if (maxchunk < (size_t) 512)
22
 	  {
27
 	  {
Lines 31-37 Link Here
31
 	  }
36
 	  }
32
 	if (maxchunk > (size_t) MAXPHYS)
37
 	if (maxchunk > (size_t) MAXPHYS)
33
 	  {
38
 	  {
34
@@ -423,7 +419,7 @@
39
@@ -423,7 +420,7 @@
35
 	  printf ("No arg to n flag\n");
40
 	  printf ("No arg to n flag\n");
36
 	  break;
41
 	  break;
37
 	  }
42
 	  }
Lines 40-46 Link Here
40
 	break;
45
 	break;
41
 
46
 
42
       case 'S':
47
       case 'S':
43
@@ -500,11 +496,6 @@
48
@@ -500,11 +497,6 @@
44
   buf = (char *) (((int) &physbuf [MAXPHYS]) & ~ (alignment - 1)); /* where to put the aligned buffer */
49
   buf = (char *) (((int) &physbuf [MAXPHYS]) & ~ (alignment - 1)); /* where to put the aligned buffer */
45
   if (op == 0)						    /* no ops specified, */
50
   if (op == 0)						    /* no ops specified, */
46
     op = RandomRead | SequentialRead;			    /* default to the read tests */
51
     op = RandomRead | SequentialRead;			    /* default to the read tests */
Lines 52-58 Link Here
52
   if (device == NULL)
57
   if (device == NULL)
53
     {
58
     {
54
     fprintf (stderr, "No file name specified\n");
59
     fprintf (stderr, "No file name specified\n");
55
@@ -565,6 +556,27 @@
60
@@ -565,6 +557,27 @@
56
     fprintf (stderr, "No file size specified\n");
61
     fprintf (stderr, "No file size specified\n");
57
     usage ();
62
     usage ();
58
     }
63
     }
Lines 80-86 Link Here
80
   if (id == NULL)					    /* no ID specified, */
85
   if (id == NULL)					    /* no ID specified, */
81
     {
86
     {
82
     id = strrchr (device, '/');				    /* find the basename */
87
     id = strrchr (device, '/');				    /* find the basename */
83
@@ -580,7 +592,11 @@
88
@@ -580,7 +593,11 @@
84
   childinfo = mmap (NULL,
89
   childinfo = mmap (NULL,
85
 		    nproc * sizeof (struct childinfo),
90
 		    nproc * sizeof (struct childinfo),
86
 		    PROT_READ | PROT_WRITE,
91
 		    PROT_READ | PROT_WRITE,
Lines 92-98 Link Here
92
 		    -1,
97
 		    -1,
93
 		    (off_t) 0 );
98
 		    (off_t) 0 );
94
 #else
99
 #else
95
@@ -835,14 +851,6 @@
100
@@ -835,14 +852,6 @@
96
   childinfo [proc].writes = 0;
101
   childinfo [proc].writes = 0;
97
   childinfo [proc].bytes_written = 0;
102
   childinfo [proc].bytes_written = 0;
98
 
103
 
Lines 107-113 Link Here
107
   /* Don't jump the gun */
112
   /* Don't jump the gun */
108
   sigemptyset (&allsigs);
113
   sigemptyset (&allsigs);
109
   if (sigaction (SIGUSR1, &ignore, NULL) < 0)
114
   if (sigaction (SIGUSR1, &ignore, NULL) < 0)
110
@@ -863,20 +871,13 @@
115
@@ -863,20 +872,13 @@
111
 	length = maxchunk;
116
 	length = maxchunk;
112
       else
117
       else
113
 	length = (myrandom (proc + nproc * i * 2)
118
 	length = (myrandom (proc + nproc * i * 2)
Lines 133-139 Link Here
133
 
138
 
134
 	fprintf (stderr,
139
 	fprintf (stderr,
135
 		 "offset %" Quad "d, filesize %" Quad "d\n",
140
 		 "offset %" Quad "d, filesize %" Quad "d\n",
136
@@ -915,9 +916,9 @@
141
@@ -915,9 +917,9 @@
137
     if (fixedoffset)
142
     if (fixedoffset)
138
       offset = SKIPSTART;				    /* start at the beginning */
143
       offset = SKIPSTART;				    /* start at the beginning */
139
     else						    /* random start */
144
     else						    /* random start */
Lines 145-151 Link Here
145
     if ((offset + maxrecs * length) > filesize)		    /* XXX */
150
     if ((offset + maxrecs * length) > filesize)		    /* XXX */
146
       {
151
       {
147
       printf ("Overrun: offset %" Quad "d, end %" Quad "d, file size %" Quad "d\n",
152
       printf ("Overrun: offset %" Quad "d, end %" Quad "d, file size %" Quad "d\n",
148
@@ -928,18 +929,12 @@
153
@@ -928,18 +930,12 @@
149
       }
154
       }
150
     if ((verbose > 2) && ! fixedoffset)
155
     if ((verbose > 2) && ! fixedoffset)
151
       printf ("Child %d reading from %" Quad "d\n", proc, offset);
156
       printf ("Child %d reading from %" Quad "d\n", proc, offset);
Lines 166-172 Link Here
166
 
171
 
167
 	fprintf (stderr,
172
 	fprintf (stderr,
168
 		 "offset %" Quad "d, filesize %" Quad "d\n",
173
 		 "offset %" Quad "d, filesize %" Quad "d\n",
169
@@ -976,30 +971,28 @@
174
@@ -976,30 +972,28 @@
170
 	length = maxchunk;
175
 	length = maxchunk;
171
       else
176
       else
172
 	length = (myrandom (proc + nproc * i * 2)
177
 	length = (myrandom (proc + nproc * i * 2)
Lines 204-210 Link Here
204
 
209
 
205
 	  fprintf (stderr,
210
 	  fprintf (stderr,
206
 		   "offset %" Quad "d, filesize %" Quad "d\n", offset,
211
 		   "offset %" Quad "d, filesize %" Quad "d\n", offset,
207
@@ -1032,36 +1025,30 @@
212
@@ -1032,36 +1026,30 @@
208
     if (fixedoffset)
213
     if (fixedoffset)
209
       offset = SKIPSTART;				    /* start at the beginning */
214
       offset = SKIPSTART;				    /* start at the beginning */
210
     else						    /* random start */
215
     else						    /* random start */

Return to bug 88319