Home
last modified time | relevance | path

Searched refs:buflen (Results 1 – 25 of 40) sorted by relevance

12

/tools/lib/
Dstr_error_r.c21 char *str_error_r(int errnum, char *buf, size_t buflen) in str_error_r() argument
23 int err = strerror_r(errnum, buf, buflen); in str_error_r()
25 snprintf(buf, buflen, "INTERNAL ERROR: strerror_r(%d, [buf], %zd)=%d", errnum, buflen, err); in str_error_r()
/tools/perf/util/
Dtarget.c149 char *buf, size_t buflen) in target__strerror() argument
154 BUG_ON(buflen == 0); in target__strerror()
157 str_error_r(errnum, buf, buflen); in target__strerror()
170 snprintf(buf, buflen, "%s", msg); in target__strerror()
175 snprintf(buf, buflen, msg, target->uid_str); in target__strerror()
Dtarget.h58 int target__strerror(struct target *target, int errnum, char *buf, size_t buflen);
/tools/power/cpupower/lib/
Dcpupower_intern.h11 unsigned int cpupower_read_sysfs(const char *path, char *buf, size_t buflen);
12 unsigned int cpupower_write_sysfs(const char *path, char *buf, size_t buflen);
Dacpi_cppc.c18 char *buf, size_t buflen) in acpi_cppc_read_file() argument
24 return cpupower_read_sysfs(path, buf, buflen); in acpi_cppc_read_file()
Dcpupower.c24 unsigned int cpupower_read_sysfs(const char *path, char *buf, size_t buflen) in cpupower_read_sysfs() argument
33 numread = read(fd, buf, buflen - 1); in cpupower_read_sysfs()
45 unsigned int cpupower_write_sysfs(const char *path, char *buf, size_t buflen) in cpupower_write_sysfs() argument
54 numwritten = write(fd, buf, buflen - 1); in cpupower_write_sysfs()
Dcpuidle.c54 size_t buflen) in cpuidle_state_read_file() argument
67 numread = read(fd, buf, buflen - 1); in cpuidle_state_read_file()
315 size_t buflen) in sysfs_cpuidle_read_file() argument
321 return cpupower_read_sysfs(path, buf, buflen); in sysfs_cpuidle_read_file()
Dpowercap.c18 static unsigned int sysfs_read_file(const char *path, char *buf, size_t buflen) in sysfs_read_file() argument
27 numread = read(fd, buf, buflen - 1); in sysfs_read_file()
85 int powercap_get_driver(char *driver, int buflen) in powercap_get_driver() argument
94 } else if (buflen > 10) { in powercap_get_driver()
Dpowercap.h44 int powercap_get_driver(char *driver, int buflen);
/tools/power/cpupower/utils/helpers/
Dbitmask.c249 static inline int emit(char *buf, int buflen, int rbot, int rtop, int len) in emit() argument
252 len += snprintf(buf + len, max(buflen - len, 0), ","); in emit()
254 len += snprintf(buf + len, max(buflen - len, 0), "%d", rbot); in emit()
256 len += snprintf(buf + len, max(buflen - len, 0), "%d-%d", in emit()
275 int bitmask_displaylist(char *buf, int buflen, const struct bitmask *bmp) in bitmask_displaylist() argument
281 if (buflen > 0) in bitmask_displaylist()
288 len = emit(buf, buflen, rbot, rtop, len); in bitmask_displaylist()
Dsysfs.c18 unsigned int sysfs_read_file(const char *path, char *buf, size_t buflen) in sysfs_read_file() argument
27 numread = read(fd, buf, buflen - 1); in sysfs_read_file()
125 const char *fname, char *buf, size_t buflen) in sysfs_idlestate_read_file() argument
138 numread = read(fd, buf, buflen - 1); in sysfs_idlestate_read_file()
385 size_t buflen) in sysfs_cpuidle_read_file() argument
391 return sysfs_read_file(path, buf, buflen); in sysfs_cpuidle_read_file()
Dsysfs.h9 extern unsigned int sysfs_read_file(const char *path, char *buf, size_t buflen);
/tools/virtio/linux/
Dscatterlist.h162 unsigned int buflen) in sg_set_buf() argument
164 sg_set_page(sg, virt_to_page(buf), buflen, offset_in_page(buf)); in sg_set_buf()
168 const void *buf, unsigned int buflen) in sg_init_one() argument
171 sg_set_buf(sg, buf, buflen); in sg_init_one()
/tools/testing/vsock/
Dcontrol.c182 size_t buflen = 0; in control_readln() local
189 if (idx >= buflen) { in control_readln()
192 new_buf = realloc(buf, buflen + 80); in control_readln()
199 buflen += 80; in control_readln()
/tools/testing/selftests/mm/
Dthp_settings.h59 int read_file(const char *path, char *buf, size_t buflen);
60 int write_file(const char *path, const char *buf, size_t buflen);
Dthp_settings.c45 int read_file(const char *path, char *buf, size_t buflen) in read_file() argument
54 numread = read(fd, buf, buflen - 1); in read_file()
66 int write_file(const char *path, const char *buf, size_t buflen) in write_file() argument
78 numwritten = write(fd, buf, buflen - 1); in write_file()
Dsplit_huge_page_test.c53 static int write_file(const char *path, const char *buf, size_t buflen) in write_file() argument
62 numwritten = write(fd, buf, buflen - 1); in write_file()
/tools/testing/selftests/bpf/prog_tests/
Dtrace_vprintk.c19 size_t buflen; in serial_test_trace_vprintk() local
52 while (getline(&buf, &buflen, fp) >= 0 || errno == EAGAIN) { in serial_test_trace_vprintk()
Dtrace_printk.c19 size_t buflen; in serial_test_trace_printk() local
59 while (getline(&buf, &buflen, fp) >= 0 || errno == EAGAIN) { in serial_test_trace_printk()
/tools/accounting/
Dprocacct.c131 int r, buflen; in send_cmd() local
150 buflen = msg.n.nlmsg_len; in send_cmd()
153 while ((r = sendto(sd, buf, buflen, 0, (struct sockaddr *) &nladdr, in send_cmd()
154 sizeof(nladdr))) < buflen) { in send_cmd()
157 buflen -= r; in send_cmd()
Dgetdelays.c124 int r, buflen; in send_cmd() local
143 buflen = msg.n.nlmsg_len ; in send_cmd()
146 while ((r = sendto(sd, buf, buflen, 0, (struct sockaddr *) &nladdr, in send_cmd()
147 sizeof(nladdr))) < buflen) { in send_cmd()
150 buflen -= r; in send_cmd()
/tools/testing/selftests/filesystems/
Ddevpts_pts.c82 static int resolve_procfd_symlink(int fd, char *buf, size_t buflen) in resolve_procfd_symlink() argument
91 ret = readlink(procfd, buf, buflen); in resolve_procfd_symlink()
92 if (ret < 0 || (size_t)ret >= buflen) in resolve_procfd_symlink()
/tools/include/linux/
Dstring.h31 char *str_error_r(int errnum, char *buf, size_t buflen);
/tools/testing/selftests/netfilter/
Dnf-queue.c272 unsigned int buflen = 64 * 1024 + MNL_SOCKET_BUFFER_SIZE; in mainloop() local
279 buf = malloc(buflen); in mainloop()
291 ret = mnl_socket_recvfrom(nl, buf, buflen); in mainloop()
/tools/testing/selftests/bpf/
Dtesting_helpers.c177 size_t buflen = 0; in parse_test_list_file() local
188 while (getline(&buf, &buflen, f) != -1) { in parse_test_list_file()

12