Lines Matching defs:buf
69 fill(size_t off, char *buf, size_t len)
75 buf[i] = (off >> 8);
82 char buf[64*1024], cmp[64*1024];
102 len = random() % sizeof buf + 1;
103 fill(off, buf, sizeof buf);
104 if (qcowfile.pwrite(qcowfile.p, buf, len, off) == -1)
106 rawfile.pwrite(rawfile.p, buf, len, off);
108 if (qcowfile.pread(qcowfile.p, buf, len, off) == -1)
111 if (memcmp(buf, cmp, len) != 0) {
120 for (off = 0; off < DISKSZ; off += sizeof buf) {
121 if (qcowfile.pread(qcowfile.p, buf, sizeof buf, off) == -1)
123 rawfile.pread(rawfile.p, cmp, sizeof buf, off);
124 if (memcmp(buf, cmp, sizeof buf) != 0) {