buf 28 kernel/bio.c struct buf buf[NBUF]; buf 33 kernel/bio.c struct buf head; buf 39 kernel/bio.c struct buf *b; buf 46 kernel/bio.c for(b = bcache.buf; b < bcache.buf+NBUF; b++){ buf 58 kernel/bio.c static struct buf* buf 61 kernel/bio.c struct buf *b; buf 92 kernel/bio.c struct buf* buf 95 kernel/bio.c struct buf *b; buf 107 kernel/bio.c bwrite(struct buf *b) buf 117 kernel/bio.c brelse(struct buf *b) buf 140 kernel/bio.c bpin(struct buf *b) { buf 147 kernel/bio.c bunpin(struct buf *b) { buf 8 kernel/buf.h struct buf *prev; // LRU cache list buf 9 kernel/buf.h struct buf *next; buf 49 kernel/console.c char buf[INPUT_BUF_SIZE]; buf 99 kernel/console.c c = cons.buf[cons.r++ % INPUT_BUF_SIZE]; buf 146 kernel/console.c cons.buf[(cons.e-1) % INPUT_BUF_SIZE] != '\n'){ buf 166 kernel/console.c cons.buf[cons.e++ % INPUT_BUF_SIZE] = c; buf 1 kernel/defs.h struct buf; buf 14 kernel/defs.h struct buf* bread(uint, uint); buf 15 kernel/defs.h void brelse(struct buf*); buf 16 kernel/defs.h void bwrite(struct buf*); buf 17 kernel/defs.h void bpin(struct buf*); buf 18 kernel/defs.h void bunpin(struct buf*); buf 60 kernel/defs.h void ramdiskrw(struct buf*); buf 69 kernel/defs.h void log_write(struct buf*); buf 185 kernel/defs.h void virtio_disk_rw(struct buf *, int); buf 33 kernel/fs.c struct buf *bp; buf 53 kernel/fs.c struct buf *bp; buf 69 kernel/fs.c struct buf *bp; buf 94 kernel/fs.c struct buf *bp; buf 202 kernel/fs.c struct buf *bp; buf 228 kernel/fs.c struct buf *bp; buf 295 kernel/fs.c struct buf *bp; buf 386 kernel/fs.c struct buf *bp; buf 429 kernel/fs.c struct buf *bp; buf 475 kernel/fs.c struct buf *bp; buf 509 kernel/fs.c struct buf *bp; buf 74 kernel/log.c struct buf *lbuf = bread(log.dev, log.start+tail+1); // read log block buf 75 kernel/log.c struct buf *dbuf = bread(log.dev, log.lh.block[tail]); // read dst buf 89 kernel/log.c struct buf *buf = bread(log.dev, log.start); buf 90 kernel/log.c struct logheader *lh = (struct logheader *) (buf->data); buf 96 kernel/log.c brelse(buf); buf 105 kernel/log.c struct buf *buf = bread(log.dev, log.start); buf 106 kernel/log.c struct logheader *hb = (struct logheader *) (buf->data); buf 112 kernel/log.c bwrite(buf); buf 113 kernel/log.c brelse(buf); buf 184 kernel/log.c struct buf *to = bread(log.dev, log.start+tail+1); // log block buf 185 kernel/log.c struct buf *from = bread(log.dev, log.lh.block[tail]); // cache block buf 215 kernel/log.c log_write(struct buf *b) buf 31 kernel/printf.c char buf[16]; buf 42 kernel/printf.c buf[i++] = digits[x % base]; buf 46 kernel/printf.c buf[i++] = '-'; buf 49 kernel/printf.c consputc(buf[i]); buf 25 kernel/syscall.c fetchstr(uint64 addr, char *buf, int max) buf 28 kernel/syscall.c if(copyinstr(p->pagetable, buf, addr, max) < 0) buf 30 kernel/syscall.c return strlen(buf); buf 75 kernel/syscall.c argstr(int n, char *buf, int max) buf 79 kernel/syscall.c return fetchstr(addr, buf, max); buf 49 kernel/virtio_disk.c struct buf *b; buf 216 kernel/virtio_disk.c virtio_disk_rw(struct buf *b, int write) buf 319 kernel/virtio_disk.c struct buf *b = disk.info[id].b; buf 40 mkfs/mkfs.c void rsect(uint sec, void *buf); buf 74 mkfs/mkfs.c char buf[BSIZE]; buf 113 mkfs/mkfs.c memset(buf, 0, sizeof(buf)); buf 114 mkfs/mkfs.c memmove(buf, &sb, sizeof(sb)); buf 115 mkfs/mkfs.c wsect(1, buf); buf 159 mkfs/mkfs.c while((cc = read(fd, buf, sizeof(buf))) > 0) buf 160 mkfs/mkfs.c iappend(inum, buf, cc); buf 178 mkfs/mkfs.c wsect(uint sec, void *buf) buf 182 mkfs/mkfs.c if(write(fsfd, buf, BSIZE) != BSIZE) buf 189 mkfs/mkfs.c char buf[BSIZE]; buf 194 mkfs/mkfs.c rsect(bn, buf); buf 195 mkfs/mkfs.c dip = ((struct dinode*)buf) + (inum % IPB); buf 197 mkfs/mkfs.c wsect(bn, buf); buf 203 mkfs/mkfs.c char buf[BSIZE]; buf 208 mkfs/mkfs.c rsect(bn, buf); buf 209 mkfs/mkfs.c dip = ((struct dinode*)buf) + (inum % IPB); buf 214 mkfs/mkfs.c rsect(uint sec, void *buf) buf 218 mkfs/mkfs.c if(read(fsfd, buf, BSIZE) != BSIZE) buf 239 mkfs/mkfs.c uchar buf[BSIZE]; buf 244 mkfs/mkfs.c bzero(buf, BSIZE); buf 246 mkfs/mkfs.c buf[i/8] = buf[i/8] | (0x1 << (i%8)); buf 249 mkfs/mkfs.c wsect(sb.bmapstart, buf); buf 260 mkfs/mkfs.c char buf[BSIZE]; buf 287 mkfs/mkfs.c rsect(x, buf); buf 288 mkfs/mkfs.c bcopy(p, buf + off - (fbn * BSIZE), n1); buf 289 mkfs/mkfs.c wsect(x, buf); buf 5 user/cat.c char buf[512]; buf 12 user/cat.c while((n = read(fd, buf, sizeof(buf))) > 0) { buf 13 user/cat.c if (write(1, buf, n) != n) { buf 8 user/grep.c char buf[1024]; buf 18 user/grep.c while((n = read(fd, buf+m, sizeof(buf)-m-1)) > 0){ buf 20 user/grep.c buf[m] = '\0'; buf 21 user/grep.c p = buf; buf 31 user/grep.c m -= p - buf; buf 32 user/grep.c memmove(buf, p, m); buf 54 user/grind.c static char buf[999]; buf 90 user/grind.c write(fd, buf, sizeof(buf)); buf 92 user/grind.c read(fd, buf, sizeof(buf)); buf 280 user/grind.c char buf[4] = { 0, 0, 0, 0 }; buf 281 user/grind.c read(bb[0], buf+0, 1); buf 282 user/grind.c read(bb[0], buf+1, 1); buf 283 user/grind.c read(bb[0], buf+2, 1); buf 288 user/grind.c if(st1 != 0 || st2 != 0 || strcmp(buf, "hi\n") != 0){ buf 289 user/grind.c printf("grind: exec pipeline failed %d %d \"%s\"\n", st1, st2, buf); buf 10 user/ls.c static char buf[DIRSIZ+1]; buf 21 user/ls.c memmove(buf, p, strlen(p)); buf 22 user/ls.c memset(buf+strlen(p), ' ', DIRSIZ-strlen(p)); buf 23 user/ls.c return buf; buf 29 user/ls.c char buf[512], *p; buf 52 user/ls.c if(strlen(path) + 1 + DIRSIZ + 1 > sizeof buf){ buf 56 user/ls.c strcpy(buf, path); buf 57 user/ls.c p = buf+strlen(buf); buf 64 user/ls.c if(stat(buf, &st) < 0){ buf 65 user/ls.c printf("ls: cannot stat %s\n", buf); buf 68 user/ls.c printf("%s %d %d %d\n", fmtname(buf), st.type, st.ino, (int) st.size); buf 18 user/printf.c char buf[16]; buf 32 user/printf.c buf[i++] = digits[x % base]; buf 35 user/printf.c buf[i++] = '-'; buf 38 user/printf.c putc(fd, buf[i]); buf 135 user/sh.c getcmd(char *buf, int nbuf) buf 138 user/sh.c memset(buf, 0, nbuf); buf 139 user/sh.c gets(buf, nbuf); buf 140 user/sh.c if(buf[0] == 0) // EOF buf 148 user/sh.c static char buf[100]; buf 160 user/sh.c while(getcmd(buf, sizeof(buf)) >= 0){ buf 161 user/sh.c if(buf[0] == 'c' && buf[1] == 'd' && buf[2] == ' '){ buf 163 user/sh.c buf[strlen(buf)-1] = 0; // chop \n buf 164 user/sh.c if(chdir(buf+3) < 0) buf 165 user/sh.c fprintf(2, "cannot cd %s\n", buf+3); buf 169 user/sh.c runcmd(parsecmd(buf)); buf 67 user/ulib.c gets(char *buf, int max) buf 76 user/ulib.c buf[i++] = c; buf 80 user/ulib.c buf[i] = '\0'; buf 81 user/ulib.c return buf; buf 22 user/usertests.c char buf[BUFSZ]; buf 295 user/usertests.c char buf[32]; buf 303 user/usertests.c int n = read(fd2, buf, sizeof(buf)); buf 312 user/usertests.c n = read(fd3, buf, sizeof(buf)); buf 319 user/usertests.c n = read(fd2, buf, sizeof(buf)); buf 328 user/usertests.c n = read(fd3, buf, sizeof(buf)); buf 334 user/usertests.c n = read(fd2, buf, sizeof(buf)); buf 387 user/usertests.c char buf[32]; buf 400 user/usertests.c read(fd, buf, sizeof(buf)); buf 568 user/usertests.c i = read(fd, buf, N*SZ*2); buf 593 user/usertests.c ((int*)buf)[0] = i; buf 594 user/usertests.c if(write(fd, buf, BSIZE) != BSIZE){ buf 610 user/usertests.c i = read(fd, buf, BSIZE); buf 621 user/usertests.c if(((int*)buf)[0] != n){ buf 623 user/usertests.c n, ((int*)buf)[0]); buf 686 user/usertests.c char buf[3]; buf 722 user/usertests.c if (read(fd, buf, 2) != 2) { buf 727 user/usertests.c if(buf[0] == 'O' && buf[1] == 'K') buf 755 user/usertests.c buf[i] = seq++; buf 756 user/usertests.c if(write(fds[1], buf, SZ) != SZ){ buf 766 user/usertests.c while((n = read(fds[0], buf, cc)) > 0){ buf 768 user/usertests.c if((buf[i] & 0xff) != (seq++ & 0xff)){ buf 775 user/usertests.c if(cc > sizeof(buf)) buf 776 user/usertests.c cc = sizeof(buf); buf 862 user/usertests.c if(read(pfds[0], buf, sizeof(buf)) != 1){ buf 1101 user/usertests.c char buf[SZ]; buf 1110 user/usertests.c memset(buf, pid==0?'c':'p', sizeof(buf)); buf 1112 user/usertests.c if(write(fd, buf, sizeof(buf)) != sizeof(buf)){ buf 1133 user/usertests.c while((n = read(fd, buf, sizeof(buf))) > 0){ buf 1134 user/usertests.c for(i = 0; i < sizeof(buf); i++){ buf 1135 user/usertests.c if(buf[i] == 'c') buf 1137 user/usertests.c if(buf[i] == 'p') buf 1178 user/usertests.c memset(buf, '0'+pi, SZ); buf 1180 user/usertests.c if((n = write(fd, buf, SZ)) != SZ){ buf 1200 user/usertests.c while((n = read(fd, buf, sizeof(buf))) > 0){ buf 1202 user/usertests.c if(buf[j] != '0'+i){ buf 1319 user/usertests.c if(read(fd, buf, sizeof(buf)) != SZ){ buf 1323 user/usertests.c if(buf[0] != 'h'){ buf 1327 user/usertests.c if(write(fd, buf, 10) != 10){ buf 1371 user/usertests.c if(read(fd, buf, sizeof(buf)) != SZ){ buf 1567 user/usertests.c cc = read(fd, buf, sizeof(buf)); buf 1568 user/usertests.c if(cc != 2 || buf[0] != 'f'){ buf 1610 user/usertests.c if(read(fd, buf, sizeof(buf)) != 2){ buf 1719 user/usertests.c int cc = write(fd, buf, sz); buf 1744 user/usertests.c memset(buf, i, SZ); buf 1745 user/usertests.c if(write(fd, buf, SZ) != SZ){ buf 1759 user/usertests.c cc = read(fd, buf, SZ/2); buf 1770 user/usertests.c if(buf[0] != i/2 || buf[SZ/2-1] != i/2){ buf 2367 user/usertests.c int cc = write(fd, buf, BSIZE); buf 2731 user/usertests.c int sz = sizeof(buf); buf 2732 user/usertests.c int cc = write(fd, buf, sz); buf 2855 user/usertests.c char buf[BSIZE]; buf 2856 user/usertests.c if(write(fd, buf, BSIZE) != BSIZE){ buf 6 user/wc.c char buf[512]; buf 16 user/wc.c while((n = read(fd, buf, sizeof(buf))) > 0){ buf 19 user/wc.c if(buf[i] == '\n') buf 21 user/wc.c if(strchr(" \r\t\n\v", buf[i]))