Home
last modified time | relevance | path

Searched refs:buff (Results 1 – 10 of 10) sorted by relevance

/tools/testing/selftests/bpf/
Dbpf_util.h14 char buff[128]; in bpf_num_possible_cpus() local
24 if (!fgets(buff, sizeof(buff), fp)) { in bpf_num_possible_cpus()
29 len = strlen(buff); in bpf_num_possible_cpus()
31 if (buff[i] == ',' || buff[i] == '\0') { in bpf_num_possible_cpus()
32 buff[i] = '\0'; in bpf_num_possible_cpus()
33 n = sscanf(&buff[j], "%u-%u", &start, &end); in bpf_num_possible_cpus()
Dtest_tag.c94 char buff[256]; in tag_from_fdinfo() local
98 snprintf(buff, sizeof(buff), "/proc/%d/fdinfo/%d", getpid(), in tag_from_fdinfo()
100 fp = fopen(buff, "r"); in tag_from_fdinfo()
103 while (fgets(buff, sizeof(buff), fp)) { in tag_from_fdinfo()
104 if (strncmp(buff, "prog_tag:\t", prefix_len)) in tag_from_fdinfo()
106 ret = hex2bin(tag, buff + prefix_len, len); in tag_from_fdinfo()
/tools/usb/usbip/libsrc/
Dusbip_common.c78 char buff[100]; in dump_usb_interface() local
80 usbip_names_get_class(buff, sizeof(buff), in dump_usb_interface()
84 dbg("%-20s = %s", "Interface(C/SC/P)", buff); in dump_usb_interface()
89 char buff[100]; in dump_usb_device() local
94 usbip_names_get_class(buff, sizeof(buff), in dump_usb_device()
98 dbg("%-20s = %s", "Device(C/SC/P)", buff); in dump_usb_device()
102 usbip_names_get_product(buff, sizeof(buff), in dump_usb_device()
105 dbg("%-20s = %s", "Vendor/Product", buff); in dump_usb_device()
253 void usbip_names_get_product(char *buff, size_t size, uint16_t vendor, in usbip_names_get_product() argument
267 snprintf(buff, size, "%s : %s (%04x:%04x)", vend, prod, vendor, product); in usbip_names_get_product()
[all …]
Dvhci_driver.c359 char buff[200]; /* what size should be ? */ in usbip_vhci_attach_device2() local
365 snprintf(buff, sizeof(buff), "%u %d %u %u", in usbip_vhci_attach_device2()
367 dbg("writing: %s", buff); in usbip_vhci_attach_device2()
374 ret = write_sysfs_attribute(attach_attr_path, buff, strlen(buff)); in usbip_vhci_attach_device2()
403 char buff[200]; /* what size should be ? */ in usbip_vhci_detach_device() local
407 snprintf(buff, sizeof(buff), "%u", port); in usbip_vhci_detach_device()
408 dbg("writing: %s", buff); in usbip_vhci_detach_device()
415 ret = write_sysfs_attribute(detach_attr_path, buff, strlen(buff)); in usbip_vhci_detach_device()
Dusbip_common.h136 void usbip_names_get_product(char *buff, size_t size, uint16_t vendor,
138 void usbip_names_get_class(char *buff, size_t size, uint8_t class,
/tools/net/
Dbpf_jit_disasm.c98 char *buff; in get_klog_buff() local
104 buff = malloc(len); in get_klog_buff()
105 if (!buff) in get_klog_buff()
108 ret = klogctl(CMD_ACTION_READ_ALL, buff, len); in get_klog_buff()
110 free(buff); in get_klog_buff()
115 return buff; in get_klog_buff()
122 char *buff; in get_flog_buff() local
133 buff = malloc(len); in get_flog_buff()
134 if (!buff) in get_flog_buff()
137 memset(buff, 0, len); in get_flog_buff()
[all …]
/tools/usb/usbip/src/
Dusbip_network.c107 static ssize_t usbip_net_xmit(int sockfd, void *buff, size_t bufflen, in usbip_net_xmit() argument
118 nbytes = send(sockfd, buff, bufflen, 0); in usbip_net_xmit()
120 nbytes = recv(sockfd, buff, bufflen, MSG_WAITALL); in usbip_net_xmit()
125 buff = (void *)((intptr_t) buff + nbytes); in usbip_net_xmit()
134 ssize_t usbip_net_recv(int sockfd, void *buff, size_t bufflen) in usbip_net_recv() argument
136 return usbip_net_xmit(sockfd, buff, bufflen, 0); in usbip_net_recv()
139 ssize_t usbip_net_send(int sockfd, void *buff, size_t bufflen) in usbip_net_send() argument
141 return usbip_net_xmit(sockfd, buff, bufflen, 1); in usbip_net_send()
Dusbip_attach.c55 char buff[MAX_BUFF+1]; in record_connection() local
79 snprintf(buff, MAX_BUFF, "%s %s %s\n", in record_connection()
82 ret = write(fd, buff, strlen(buff)); in record_connection()
83 if (ret != (ssize_t) strlen(buff)) { in record_connection()
Dusbip_network.h170 ssize_t usbip_net_recv(int sockfd, void *buff, size_t bufflen);
171 ssize_t usbip_net_send(int sockfd, void *buff, size_t bufflen);
/tools/testing/selftests/mqueue/
Dmq_perf_tests.c320 char buff[MSG_SIZE]; in cont_thread() local
329 while (mq_send(queue, buff, sizeof(buff), 0) == 0) in cont_thread()
331 mq_receive(queue, buff, sizeof(buff), &priority); in cont_thread()
336 while (mq_receive(queue, buff, MSG_SIZE, &prio_in) == MSG_SIZE)
340 if (mq_send(queue, buff, MSG_SIZE, prio_out)) \
347 if (mq_send(queue, buff, MSG_SIZE, prio_out)) \
350 if (mq_receive(queue, buff, MSG_SIZE, &prio_in) != MSG_SIZE) \
422 char buff[MSG_SIZE]; in perf_test_thread() local