| /tools/lib/ |
| A D | str_error_r.c | 21 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/include/nolibc/sys/ |
| A D | random.h | 23 ssize_t sys_getrandom(void *buf, size_t buflen, unsigned int flags) in sys_getrandom() argument 25 return my_syscall3(__NR_getrandom, buf, buflen, flags); in sys_getrandom() 29 ssize_t getrandom(void *buf, size_t buflen, unsigned int flags) in getrandom() argument 31 return __sysret(sys_getrandom(buf, buflen, flags)); in getrandom()
|
| /tools/testing/selftests/net/tcp_ao/lib/ |
| A D | utils.c | 5 void randomize_buffer(void *buf, size_t buflen) in randomize_buffer() argument 8 size_t words = buflen / sizeof(int); in randomize_buffer() 9 size_t leftover = buflen % sizeof(int); in randomize_buffer() 11 if (!buflen) in randomize_buffer() 20 memcpy(buf + buflen - leftover, &tmp, leftover); in randomize_buffer()
|
| /tools/power/cpupower/lib/ |
| A D | cpupower_intern.h | 11 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);
|
| A D | acpi_cppc.c | 18 char *buf, size_t buflen) in acpi_cppc_read_file() argument 24 return cpupower_read_sysfs(path, buf, buflen); in acpi_cppc_read_file()
|
| A D | cpuidle.c | 54 size_t buflen) in cpuidle_state_read_file() argument 67 numread = read(fd, buf, buflen - 1); in cpuidle_state_read_file() 323 size_t buflen) in sysfs_cpuidle_read_file() argument 329 return cpupower_read_sysfs(path, buf, buflen); in sysfs_cpuidle_read_file()
|
| A D | cpupower.c | 25 unsigned int cpupower_read_sysfs(const char *path, char *buf, size_t buflen) in cpupower_read_sysfs() argument 34 numread = read(fd, buf, buflen - 1); in cpupower_read_sysfs() 46 unsigned int cpupower_write_sysfs(const char *path, char *buf, size_t buflen) in cpupower_write_sysfs() argument 55 numwritten = write(fd, buf, buflen - 1); in cpupower_write_sysfs()
|
| A D | powercap.c | 18 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() 93 int powercap_get_driver(char *driver, int buflen) in powercap_get_driver() argument 102 } else if (buflen > 10) { in powercap_get_driver()
|
| A D | powercap.h | 44 int powercap_get_driver(char *driver, int buflen);
|
| /tools/perf/util/ |
| A D | target.c | 112 char *buf, size_t buflen) in target__strerror() argument 117 BUG_ON(buflen == 0); in target__strerror() 120 str_error_r(errnum, buf, buflen); in target__strerror() 133 snprintf(buf, buflen, "%s", msg); in target__strerror()
|
| A D | target.h | 50 int target__strerror(struct target *target, int errnum, char *buf, size_t buflen);
|
| /tools/power/cpupower/utils/helpers/ |
| A D | bitmask.c | 249 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()
|
| A D | sysfs.c | 18 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()
|
| A D | sysfs.h | 9 extern unsigned int sysfs_read_file(const char *path, char *buf, size_t buflen);
|
| /tools/virtio/linux/ |
| A D | scatterlist.h | 162 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/ |
| A D | control.c | 179 size_t buflen = 0; in control_readln() local 186 if (idx >= buflen) { in control_readln() 189 new_buf = realloc(buf, buflen + 80); in control_readln() 196 buflen += 80; in control_readln()
|
| /tools/testing/selftests/mm/ |
| A D | thp_settings.h | 65 int read_file(const char *path, char *buf, size_t buflen); 66 int write_file(const char *path, const char *buf, size_t buflen);
|
| A D | thp_settings.c | 46 int read_file(const char *path, char *buf, size_t buflen) in read_file() argument 55 numread = read(fd, buf, buflen - 1); in read_file() 67 int write_file(const char *path, const char *buf, size_t buflen) in write_file() argument 79 numwritten = write(fd, buf, buflen - 1); in write_file()
|
| /tools/accounting/ |
| A D | procacct.c | 131 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()
|
| A D | getdelays.c | 124 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/ |
| A D | devpts_pts.c | 82 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/ |
| A D | string.h | 33 char *str_error_r(int errnum, char *buf, size_t buflen);
|
| /tools/testing/selftests/net/ |
| A D | busy_poller.c | 201 static void write_chunk(int fd, char *buf, ssize_t buflen) in write_chunk() argument 203 ssize_t remaining = buflen; in write_chunk() 208 while (writelen < buflen) { in write_chunk()
|
| /tools/testing/selftests/net/netfilter/ |
| A D | nf_queue.c | 272 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/power/cpupower/bindings/python/ |
| A D | raw_pylibcpupower.swg | 23 unsigned int cpupower_read_sysfs(const char *path, char *buf, size_t buflen); 25 unsigned int cpupower_write_sysfs(const char *path, char *buf, size_t buflen); 240 int powercap_get_driver(char *driver, int buflen);
|