buf 32 bio.c struct buf buf[NBUF]; buf 36 bio.c struct buf head; buf 42 bio.c struct buf *b; buf 50 bio.c for(b = bcache.buf; b < bcache.buf+NBUF; b++){ buf 62 bio.c static struct buf* buf 65 bio.c struct buf *b; buf 99 bio.c struct buf* buf 102 bio.c struct buf *b; buf 5 buf.h struct buf *prev; // LRU cache list buf 6 buf.h struct buf *next; buf 7 buf.h struct buf *qnext; // disk queue buf 5 cat.c char buf[512]; buf 12 cat.c while((n = read(fd, buf, sizeof(buf))) > 0) buf 13 cat.c write(1, buf, n); buf 30 console.c char buf[16]; buf 41 console.c buf[i++] = digits[x % base]; buf 45 console.c buf[i++] = '-'; buf 48 console.c consputc(buf[i]); buf 179 console.c char buf[INPUT_BUF]; buf 200 console.c input.buf[(input.e-1) % INPUT_BUF] != '\n'){ buf 214 console.c input.buf[input.e++ % INPUT_BUF] = c; buf 245 console.c c = input.buf[input.r++ % INPUT_BUF]; buf 273 console.c consputc(buf[i] & 0xff); buf 1 defs.h struct buf; buf 14 defs.h struct buf* bread(uint, uint); buf 31 fs.c struct buf *bp; buf 42 fs.c struct buf *bp; buf 57 fs.c struct buf *bp; buf 81 fs.c struct buf *bp; buf 180 fs.c struct buf *bp; buf 202 fs.c struct buf *bp; buf 269 fs.c struct buf *bp; buf 360 fs.c struct buf *bp; buf 395 fs.c struct buf *bp; buf 438 fs.c struct buf *bp; buf 466 fs.c struct buf *bp; buf 7 grep.c char buf[1024]; buf 17 grep.c while((n = read(fd, buf+m, sizeof(buf)-m-1)) > 0){ buf 19 grep.c buf[m] = '\0'; buf 20 grep.c p = buf; buf 29 grep.c if(p == buf) buf 32 grep.c m -= p - buf; buf 33 grep.c memmove(buf, p, m); buf 29 ide.c static struct buf *idequeue; buf 102 ide.c struct buf *b; buf 136 ide.c struct buf **pp; buf 74 log.c struct buf *lbuf = bread(log.dev, log.start+tail+1); // read log block buf 75 log.c struct buf *dbuf = bread(log.dev, log.lh.block[tail]); // read dst buf 87 log.c struct buf *buf = bread(log.dev, log.start); buf 88 log.c struct logheader *lh = (struct logheader *) (buf->data); buf 94 log.c brelse(buf); buf 103 log.c struct buf *buf = bread(log.dev, log.start); buf 104 log.c struct logheader *hb = (struct logheader *) (buf->data); buf 110 log.c bwrite(buf); buf 111 log.c brelse(buf); buf 180 log.c struct buf *to = bread(log.dev, log.start+tail+1); // log block buf 181 log.c struct buf *from = bread(log.dev, log.lh.block[tail]); // cache block buf 9 ls.c static char buf[DIRSIZ+1]; buf 20 ls.c memmove(buf, p, strlen(p)); buf 21 ls.c memset(buf+strlen(p), ' ', DIRSIZ-strlen(p)); buf 22 ls.c return buf; buf 28 ls.c char buf[512], *p; buf 50 ls.c if(strlen(path) + 1 + DIRSIZ + 1 > sizeof buf){ buf 54 ls.c strcpy(buf, path); buf 55 ls.c p = buf+strlen(buf); buf 62 ls.c if(stat(buf, &st) < 0){ buf 63 ls.c printf(1, "ls: cannot stat %s\n", buf); buf 66 ls.c printf(1, "%s %d %d %d\n", fmtname(buf), st.type, st.ino, st.size); buf 73 mkfs.c char buf[BSIZE]; buf 113 mkfs.c memset(buf, 0, sizeof(buf)); buf 114 mkfs.c memmove(buf, &sb, sizeof(sb)); buf 115 mkfs.c wsect(1, buf); buf 152 mkfs.c while((cc = read(fd, buf, sizeof(buf))) > 0) buf 153 mkfs.c iappend(inum, buf, cc); buf 177 mkfs.c if(write(fsfd, buf, BSIZE) != BSIZE){ buf 186 mkfs.c char buf[BSIZE]; buf 191 mkfs.c rsect(bn, buf); buf 192 mkfs.c dip = ((struct dinode*)buf) + (inum % IPB); buf 194 mkfs.c wsect(bn, buf); buf 200 mkfs.c char buf[BSIZE]; buf 205 mkfs.c rsect(bn, buf); buf 206 mkfs.c dip = ((struct dinode*)buf) + (inum % IPB); buf 217 mkfs.c if(read(fsfd, buf, BSIZE) != BSIZE){ buf 240 mkfs.c uchar buf[BSIZE]; buf 245 mkfs.c bzero(buf, BSIZE); buf 247 mkfs.c buf[i/8] = buf[i/8] | (0x1 << (i%8)); buf 250 mkfs.c wsect(sb.bmapstart, buf); buf 261 mkfs.c char buf[BSIZE]; buf 288 mkfs.c rsect(x, buf); buf 289 mkfs.c bcopy(p, buf + off - (fbn * BSIZE), n1); buf 290 mkfs.c wsect(x, buf); buf 15 printf.c char buf[16]; buf 29 printf.c buf[i++] = digits[x % base]; buf 32 printf.c buf[i++] = '-'; buf 35 printf.c putc(fd, buf[i]); buf 137 sh.c memset(buf, 0, nbuf); buf 138 sh.c gets(buf, nbuf); buf 139 sh.c if(buf[0] == 0) // EOF buf 147 sh.c static char buf[100]; buf 159 sh.c while(getcmd(buf, sizeof(buf)) >= 0){ buf 160 sh.c if(buf[0] == 'c' && buf[1] == 'd' && buf[2] == ' '){ buf 163 sh.c buf[strlen(buf)-1] = 0; // chop \n buf 164 sh.c if(chdir(buf+3) < 0) buf 165 sh.c printf(2, "cannot cd %s\n", buf+3); buf 169 sh.c runcmd(parsecmd(buf)); buf 62 ulib.c buf[i++] = c; buf 66 ulib.c buf[i] = '\0'; buf 67 ulib.c return buf; buf 11 usertests.c char buf[8192]; buf 171 usertests.c i = read(fd, buf, 2000); buf 201 usertests.c ((int*)buf)[0] = i; buf 202 usertests.c if(write(fd, buf, 512) != 512){ buf 218 usertests.c i = read(fd, buf, 512); buf 229 usertests.c if(((int*)buf)[0] != n){ buf 231 usertests.c n, ((int*)buf)[0]); buf 321 usertests.c buf[i] = seq++; buf 322 usertests.c if(write(fds[1], buf, 1033) != 1033){ buf 332 usertests.c while((n = read(fds[0], buf, cc)) > 0){ buf 334 usertests.c if((buf[i] & 0xff) != (seq++ & 0xff)){ buf 341 usertests.c if(cc > sizeof(buf)) buf 342 usertests.c cc = sizeof(buf); buf 387 usertests.c if(read(pfds[0], buf, sizeof(buf)) != 1){ buf 468 usertests.c char buf[10]; buf 479 usertests.c memset(buf, pid==0?'c':'p', sizeof(buf)); buf 481 usertests.c if(write(fd, buf, sizeof(buf)) != sizeof(buf)){ buf 497 usertests.c while((n = read(fd, buf, sizeof(buf))) > 0){ buf 498 usertests.c for(i = 0; i < sizeof(buf); i++){ buf 499 usertests.c if(buf[i] == 'c') buf 501 usertests.c if(buf[i] == 'p') buf 543 usertests.c memset(buf, '0'+pi, 512); buf 545 usertests.c if((n = write(fd, buf, 500)) != 500){ buf 562 usertests.c while((n = read(fd, buf, sizeof(buf))) > 0){ buf 564 usertests.c if(buf[j] != '0'+i){ buf 684 usertests.c if(read(fd, buf, sizeof(buf)) != 5){ buf 688 usertests.c if(buf[0] != 'h'){ buf 692 usertests.c if(write(fd, buf, 10) != 10){ buf 738 usertests.c if(read(fd, buf, sizeof(buf)) != 5){ buf 978 usertests.c cc = read(fd, buf, sizeof(buf)); buf 979 usertests.c if(cc != 2 || buf[0] != 'f'){ buf 1021 usertests.c if(read(fd, buf, sizeof(buf)) != 2){ buf 1134 usertests.c int cc = write(fd, buf, sz); buf 1161 usertests.c memset(buf, i, 600); buf 1162 usertests.c if(write(fd, buf, 600) != 600){ buf 1176 usertests.c cc = read(fd, buf, 300); buf 1187 usertests.c if(buf[0] != i/2 || buf[299] != i/2){ buf 1671 usertests.c int cc = write(fd, buf, 512); buf 360 vm.c char *buf, *pa0; buf 363 vm.c buf = (char*)p; buf 372 vm.c memmove(pa0 + (va - va0), buf, n); buf 374 vm.c buf += n; buf 5 wc.c char buf[512]; buf 15 wc.c while((n = read(fd, buf, sizeof(buf))) > 0){ buf 18 wc.c if(buf[i] == '\n') buf 20 wc.c if(strchr(" \r\t\n\v", buf[i]))