Lines Matching defs:buf
43 char buf[4096];
47 snprintf(buf, sizeof(buf), "/proc/%u", pid);
48 dir_fd = open(buf, O_RDONLY|O_DIRECTORY);
61 rv = read(fd, buf, sizeof(buf));
63 if (0 < rv && rv <= sizeof(buf)) {
68 assert(buf[rv - 1] == '\n');
69 buf[rv - 1] = '\0';
73 p = strrchr(buf, ' ');
78 p = strrchr(buf, ' ');
133 char buf[64];
138 snprintf(buf, sizeof(buf), "%d", i);
139 test_lookup_fail(fd, buf);
142 snprintf(buf, sizeof(buf), "%d", i);
143 test_lookup_fail(fd, buf);
146 snprintf(buf, sizeof(buf), "%u", u);
147 test_lookup_fail(fd, buf);
150 snprintf(buf, sizeof(buf), "%u", u);
151 test_lookup_fail(fd, buf);