Lines Matching defs:buf
138 char buf[32];
144 while ((n = read(fd, buf, sizeof (buf) - 1)) < 0 &&
150 buf[n] = '\0';
151 *val = strtoull(buf, NULL, 0);
161 char buf[512];
164 len = snprintf(buf, sizeof(buf), "%s/%s", perf->sysfs_dev_dir, file);
165 if (len < 0 || len >= sizeof(buf)) {
170 return read_file_uint64(buf, value);
194 char buf[256];
197 len = snprintf(buf, sizeof(buf), "%s/metrics", perf->sysfs_dev_dir);
198 if (len < 0 || len >= sizeof(buf)) {
203 metricsdir = opendir(buf);
205 DBG("Failed to open %s: %m\n", buf);
211 if (!is_dir_or_link(metric_entry, buf) ||
221 DBG("Failed to read metric set id from %s: %m", buf);