Lines Matching refs:buf
63 char buf[512]; in proc_scan() local
65 if (snprintf(buf, sizeof(buf), "%s/devices", pci_get_param(a, "proc.path")) == sizeof(buf)) in proc_scan()
67 f = fopen(buf, "r"); in proc_scan()
69 a->error("Cannot open %s", buf); in proc_scan()
70 while (fgets(buf, sizeof(buf)-1, f)) in proc_scan()
78 cnt = sscanf(buf, "%x %x %x" F F F F F F F F F F F F F F "%n", in proc_scan()
116 while (buf[offset] && isspace(buf[offset])) in proc_scan()
118 driver = &buf[offset]; in proc_scan()
119 while (buf[offset] && !isspace(buf[offset])) in proc_scan()
121 buf[offset] = '\0'; in proc_scan()
141 char buf[1024]; in proc_setup() local
145 e = snprintf(buf, sizeof(buf), "%s/%02x/%02x.%d", in proc_setup()
148 if (e < 0 || e >= (int) sizeof(buf)) in proc_setup()
151 a->fd = open(buf, a->fd_rw ? O_RDWR : O_RDONLY); in proc_setup()
154 e = snprintf(buf, sizeof(buf), "%s/%04x:%02x/%02x.%d", in proc_setup()
157 if (e < 0 || e >= (int) sizeof(buf)) in proc_setup()
159 a->fd = open(buf, a->fd_rw ? O_RDWR : O_RDONLY); in proc_setup()
162 a->warning("Cannot open %s", buf); in proc_setup()
169 proc_read(struct pci_dev *d, int pos, byte *buf, int len) in proc_read() argument
176 res = pread(fd, buf, len, pos); in proc_read()
188 proc_write(struct pci_dev *d, int pos, byte *buf, int len) in proc_write() argument
195 res = pwrite(fd, buf, len, pos); in proc_write()