Home | History | Annotate | Download | only in pread

Lines Matching refs:K1

82 #define K1              1024
83 #define K2 (K1 * 2)
84 #define K3 (K1 * 3)
85 #define K4 (K1 * 4)
116 * Call pread() of K1 data (should be 2's) at offset K2.
118 nread = pread(fildes, read_buf[2], K1, K2);
121 if (nread != K1) {
135 /* pread() K1 of data (should be 3's) at offset K3. */
136 nread = pread(fildes, read_buf[3], K1, K3);
137 if (nread != K1) {
146 * Do a normal read() of K1 data (should be 0's)
148 * file pointer to an offset of K1.
150 if ((nread = read(fildes, read_buf[0], K1)) != K1) {
155 /* We should now be at an offset of K1. */
156 l_seek(fildes, 0, SEEK_CUR, K1);
158 /* pread() of K1 data (should be 1's) at offset K1. */
159 nread = pread(fildes, read_buf[1], K1, K1);
160 if (nread != K1) {
161 tst_brkm(TFAIL, cleanup, "pread() at off. K1 failed: "
165 /* We should still be at offset K1. */
166 l_seek(fildes, 0, SEEK_CUR, K1);
209 /* pwrite() K1 of data (0's) at offset 0 of temporary file */
210 if ((nwrite = pwrite(fildes, write_buf[0], K1, 0)) != K1) {
219 l_seek(fildes, K1 / 2, SEEK_SET, K1 / 2);
221 /* Again, pwrite() K1 of data (2's) at offset K2 of temporary file */
222 if ((nwrite = pwrite(fildes, write_buf[2], K1, K2)) != K1) {
229 l_seek(fildes, 0, SEEK_CUR, K1 / 2);
235 * Using write(), write of K1 of data (3's) which should take
238 if ((nwrite = write(fildes, write_buf[3], K1)) != K1) {
246 /* Again, pwrite() K1 of data (1's) at offset K1. */
247 if ((nwrite = pwrite(fildes, write_buf[1], K1, K1)) != K1) {
249 "on %s, errno=%d : %s", K1, TEMPFILE, errno,
268 write_buf[count] = malloc(K1);
269 read_buf[count] = malloc(K1);
275 memset(write_buf[count], count, K1);
313 if (memcmp(write_buf[count], read_buf[count], K1) != 0) {