Home
last modified time | relevance | path

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

12

/tools/lib/traceevent/
Dtep_strerror.c30 enum tep_errno errnum, char *buf, size_t buflen) in tep_strerror() argument
35 if (!buflen) in tep_strerror()
39 int err = strerror_r(errnum, buf, buflen); in tep_strerror()
40 buf[buflen - 1] = 0; in tep_strerror()
50 snprintf(buf, buflen, "%s", msg); in tep_strerror()
/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.c117 char *buf, size_t buflen) in target__strerror() argument
122 BUG_ON(buflen == 0); in target__strerror()
125 str_error_r(errnum, buf, buflen); in target__strerror()
138 snprintf(buf, buflen, "%s", msg); in target__strerror()
143 snprintf(buf, buflen, msg, target->uid_str); in target__strerror()
Dtarget.h50 int target__strerror(struct target *target, int errnum, char *buf, size_t buflen);
Ddso.c1424 int dso__strerror_load(struct dso *dso, char *buf, size_t buflen) in dso__strerror_load() argument
1438 BUG_ON(buflen == 0); in dso__strerror_load()
1441 const char *err = str_error_r(errnum, buf, buflen); in dso__strerror_load()
1444 scnprintf(buf, buflen, "%s", err); in dso__strerror_load()
1453 scnprintf(buf, buflen, "%s", dso_load__error_str[idx]); in dso__strerror_load()
/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/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/testing/selftests/android/ion/
Dionutils.h15 unsigned long buflen; member
24 unsigned long buflen; member
Dionapp_import.c55 info.buflen = ION_BUFFER_LEN; in main()
64 map_len = info.buflen; in main()
Dionutils.c128 ion_info->buflen = maplen; in ion_export_buffer_fd()
161 map_len = ion_info->buflen; in ion_import_buffer_fd()
179 ion_info->buflen = map_len; in ion_import_buffer_fd()
195 munmap(ion_info->buffer, ion_info->buflen); in ion_close_buffer_fd()
Dionapp_export.c105 map_len = info.buflen; in main()
111 skinfo.buflen = map_len; in main()
/tools/testing/vsock/
Dcontrol.c154 size_t buflen = 0; in control_readln() local
161 if (idx >= buflen) { in control_readln()
164 new_buf = realloc(buf, buflen + 80); in control_readln()
171 buflen += 80; in control_readln()
/tools/testing/selftests/bpf/prog_tests/
Dtrace_printk.c18 size_t buflen; in test_trace_printk() local
57 while (getline(&buf, &buflen, fp) >= 0 || errno == EAGAIN) { in test_trace_printk()
/tools/power/cpupower/lib/
Dcpupower_intern.h6 unsigned int cpupower_read_sysfs(const char *path, char *buf, size_t buflen);
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()
Dcpupower.c17 unsigned int cpupower_read_sysfs(const char *path, char *buf, size_t buflen) in cpupower_read_sysfs() argument
26 numread = read(fd, buf, buflen - 1); in cpupower_read_sysfs()
/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/accounting/
Dgetdelays.c125 int r, buflen; in send_cmd() local
144 buflen = msg.n.nlmsg_len ; in send_cmd()
147 while ((r = sendto(sd, buf, buflen, 0, (struct sockaddr *) &nladdr, in send_cmd()
148 sizeof(nladdr))) < buflen) { in send_cmd()
151 buflen -= r; in send_cmd()
/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/rseq/
Dparam_test.c302 intptr_t buflen; member
319 intptr_t buflen; member
701 if (offset == buffer->c[cpu].buflen) in this_cpu_buffer_push()
830 buffer.c[i].buflen = CPU_SETSIZE * BUFFER_ITEM_PER_CPU; in test_percpu_buffer()
907 if (offset == buffer->c[cpu].buflen) in this_cpu_memcpy_buffer_push()
1045 buffer.c[i].buflen = CPU_SETSIZE * MEMCPY_BUFFER_ITEM_PER_CPU; in test_percpu_memcpy_buffer()
/tools/testing/selftests/vm/
Dkhugepaged.c123 static int read_file(const char *path, char *buf, size_t buflen) in read_file() argument
132 numread = read(fd, buf, buflen - 1); in read_file()
144 static int write_file(const char *path, const char *buf, size_t buflen) in write_file() argument
153 numwritten = write(fd, buf, buflen - 1); in write_file()
/tools/perf/util/intel-pt-decoder/
Dintel-pt-decoder.h271 int intel_pt__strerror(int code, char *buf, size_t buflen);

12