Home
last modified time | relevance | path

Searched refs:strlen (Results 1 – 25 of 238) sorted by relevance

12345678910

/tools/iio/
Dlsiio.c30 return strlen(str) > strlen(prefix) && in check_prefix()
31 strncmp(str, prefix, strlen(prefix)) == 0; in check_prefix()
36 return strlen(str) > strlen(postfix) && in check_postfix()
37 strcmp(str + strlen(str) - strlen(postfix), postfix) == 0; in check_postfix()
64 ret = sscanf(dev_dir_name + strlen(iio_dir) + strlen(type_device), "%i", in dump_one_device()
87 ret = sscanf(dev_dir_name + strlen(iio_dir) + strlen(type_trigger), in dump_one_trigger()
Diio_utils.h54 return strlen(str) >= strlen(suffix) && in iioutils_check_suffix()
55 strncmp(str+strlen(str)-strlen(suffix), in iioutils_check_suffix()
56 suffix, strlen(suffix)) == 0; in iioutils_check_suffix()
Diio_utils.c38 strlen(iio_direction[i]))) { in iioutils_break_up_name()
43 current = strdup(full_name + strlen(prefix) + 1); in iioutils_break_up_name()
336 if (strcmp(ent->d_name + strlen(ent->d_name) - strlen("_en"), in build_channel_array()
378 if (strcmp(ent->d_name + strlen(ent->d_name) - strlen("_en"), in build_channel_array()
421 strlen(ent->d_name) - in build_channel_array()
422 strlen("_en")); in build_channel_array()
575 strlen(ent->d_name) > strlen(type) && in find_type_by_name()
576 strncmp(ent->d_name, type, strlen(type)) == 0) { in find_type_by_name()
578 ret = sscanf(ent->d_name + strlen(type), "%d", &number); in find_type_by_name()
593 if (strncmp(ent->d_name + strlen(type) + numstrlen, in find_type_by_name()
[all …]
/tools/perf/arch/s390/util/
Dheader.c61 if (!strncmp(line, SYSINFO_MANU, strlen(SYSINFO_MANU))) { in get_cpuid()
62 line2 = line + strlen(SYSINFO_MANU); in get_cpuid()
70 if (!strncmp(line, SYSINFO_TYPE, strlen(SYSINFO_TYPE))) { in get_cpuid()
71 line2 = line + strlen(SYSINFO_TYPE); in get_cpuid()
79 if (!strncmp(line, SYSINFO_MODEL, strlen(SYSINFO_MODEL))) { in get_cpuid()
80 line2 = line + strlen(SYSINFO_MODEL); in get_cpuid()
104 if (strncmp(line, SRVLVL_CPUMF, strlen(SRVLVL_CPUMF))) in get_cpuid()
107 line2 = line + strlen(SRVLVL_CPUMF); in get_cpuid()
110 strlen(SRVLVL_VERSION))) { in get_cpuid()
117 strlen(SRVLVL_AUTHORIZATION))) { in get_cpuid()
/tools/testing/selftests/proc/
Dproc-pid-vm.c315 const size_t len = strlen(buf0) + (g_vsyscall ? strlen(str_vsyscall) : 0); in main()
327 assert(memcmp(buf, buf0, strlen(buf0)) == 0); in main()
329 assert(memcmp(buf + strlen(buf0), str_vsyscall, strlen(str_vsyscall)) == 0); in main()
347 assert(rv >= strlen(buf0)); in main()
348 assert(memcmp(buf, buf0, strlen(buf0)) == 0); in main()
354 assert(memmem(buf, rv, RSS1, strlen(RSS1)) || in main()
355 memmem(buf, rv, RSS2, strlen(RSS2))); in main()
356 assert(memmem(buf, rv, PSS1, strlen(PSS1)) || in main()
357 memmem(buf, rv, PSS2, strlen(PSS2))); in main()
372 assert(memmem(buf, rv, S[i], strlen(S[i]))); in main()
[all …]
Dsetns-sysvipc.c123 if (rv == strlen(S32)) { in main()
124 assert(memcmp(buf, S32, strlen(S32)) == 0); in main()
125 } else if (rv == strlen(S64)) { in main()
126 assert(memcmp(buf, S64, strlen(S64)) == 0); in main()
Dproc-self-syscall.c52 if (rv < strlen(buf1)) in main()
54 if (strncmp(buf1, buf2, strlen(buf1)) != 0) in main()
Dsetns-dcache.c124 assert(rv == strlen(S)); in main()
125 assert(memcmp(buf, S, strlen(S)) == 0); in main()
/tools/testing/selftests/powerpc/stringloops/
DMakefile9 TEST_GEN_PROGS := memcmp_64 strlen
21 $(OUTPUT)/strlen: strlen.c string.c
24 $(OUTPUT)/strlen_32: strlen.c
/tools/perf/util/
Dsmt.c25 size_t strlen; in smt_on() local
30 if (sysfs__read_str(fn, &str, &strlen) < 0) { in smt_on()
34 if (sysfs__read_str(fn, &str, &strlen) < 0) in smt_on()
Dtopdown.c15 len += strlen(attr[i]) + 1; in topdown_filter_events()
34 s += strlen(s); in topdown_filter_events()
/tools/bpf/bpftool/
Dmain.c145 if (strlen(str) < strlen(pfx)) in is_prefix()
148 return !memcmp(str, pfx, strlen(pfx)); in is_prefix()
166 strncat(msg, "' or '", sizeof(msg) - strlen(msg) - 1); in detect_common_prefix()
167 strncat(msg, ref, sizeof(msg) - strlen(msg) - 1); in detect_common_prefix()
170 strncat(msg, "'", sizeof(msg) - strlen(msg) - 1); in detect_common_prefix()
308 if (strlen(buf) == sizeof(buf) - 1) { in do_batch()
318 strlen(contline) == 0) { in do_batch()
329 if (strlen(buf) + strlen(contline) + 1 > sizeof(buf)) { in do_batch()
334 buf[strlen(buf) - 2] = '\0'; in do_batch()
/tools/power/cpupower/bench/
Dparse.c32 if (strncasecmp("high", str, strlen(str)) == 0) in string_to_prio()
34 else if (strncasecmp("default", str, strlen(str)) == 0) in string_to_prio()
36 else if (strncasecmp("low", str, strlen(str)) == 0) in string_to_prio()
69 len = strlen(dirname) + 30; in prepare_output()
77 len += strlen(sysdata.nodename) + strlen(sysdata.release); in prepare_output()
/tools/gpio/
Dgpio-utils.h23 return strlen(str) > strlen(prefix) && in check_prefix()
24 strncmp(str, prefix, strlen(prefix)) == 0; in check_prefix()
/tools/usb/usbip/src/
Dusbip_bind.c48 rc = write_sysfs_attribute(bind_attr_path, busid, strlen(busid)); in bind_usbip()
89 if (!strncmp(bDevClass, "09", strlen(bDevClass))) { in unbind_other()
102 strlen(USBIP_HOST_DRV_NAME))) { in unbind_other()
113 rc = write_sysfs_attribute(unbind_attr_path, busid, strlen(busid)); in unbind_other()
/tools/testing/selftests/net/
Dtls.c91 ASSERT_EQ(strlen(test_str) + 1, send_len); in TEST_F()
199 int to_send = strlen(test_str) + 1; in TEST_F()
291 send_len = strlen(test_str) + 1; in TEST_F()
411 test_strs[i] = (char *)malloc(strlen(test_str) + 1); in TEST_F()
412 snprintf(test_strs[i], strlen(test_str) + 1, "%s", test_str); in TEST_F()
414 vec[i].iov_len = strlen(test_strs[i]) + 1; in TEST_F()
425 strlen(test_strs[i])), in TEST_F()
427 len_cmp += strlen(buf + len_cmp) + 1; in TEST_F()
448 test_strs[i] = (char *)malloc(strlen(test_str) + 1); in TEST_F()
449 snprintf(test_strs[i], strlen(test_str) + 1, "%s", test_str); in TEST_F()
[all …]
/tools/testing/selftests/exec/
Drecursion-depth.c55 if (write(fd, S, strlen(S)) != strlen(S)) { in main()
Dexecveat.c73 int pathlen = path ? strlen(path) : 0; in check_execveat_invoked_rc()
121 char *result = malloc(strlen(left) + strlen(right) + 1); in concat()
174 count = (PATH_MAX - 3 - strlen(cwd)) / XX_DIR_LEN; in check_execveat_pathmax()
179 len = (PATH_MAX - 3 - strlen(cwd)) - (count * XX_DIR_LEN); in check_execveat_pathmax()
197 src, strlen(longpath)); in check_execveat_pathmax()
201 strlen(longpath), errno, strerror(errno)); in check_execveat_pathmax()
391 write(fd, script, strlen(script)); in prerequisites()
/tools/testing/selftests/bpf/prog_tests/
Dtask_fd_query_rawtp.c44 len == strlen("sys_enter"); in test_task_fd_query_rawtp()
56 len == strlen("sys_enter"); in test_task_fd_query_rawtp()
68 len == strlen("sys_enter") && in test_task_fd_query_rawtp()
Dd_path.c143 CHECK(bss->rets_stat[i] != strlen(bss->paths_stat[i]) + 1, in test_d_path()
146 i, bss->rets_stat[i], strlen(bss->paths_stat[i]) + 1, in test_d_path()
148 CHECK(bss->rets_close[i] != strlen(bss->paths_stat[i]) + 1, in test_d_path()
151 i, bss->rets_close[i], strlen(bss->paths_close[i]) + 1, in test_d_path()
/tools/testing/selftests/wireguard/qemu/
Dinit.c53 …len = strlen(" WireGuard Test Suite on ") + strlen(utsname.sysname) + strlen(utsname.rele… in print_banner()
197 if (!success_dev || !strlen(success_dev)) in launch_tests()
/tools/power/cpupower/lib/
Dcpufreq.c145 if (result[strlen(result) - 1] == '\n') in sysfs_cpufreq_get_one_string()
146 result[strlen(result) - 1] = '\0'; in sysfs_cpufreq_get_one_string()
558 if (!passed_gov || (strlen(passed_gov) > 19)) in verify_gov()
615 max, strlen(max)); in cpufreq_set_policy()
621 strlen(min)); in cpufreq_set_policy()
627 max, strlen(max)); in cpufreq_set_policy()
633 gov, strlen(gov)); in cpufreq_set_policy()
644 value, strlen(value)); in cpufreq_modify_policy_min()
655 value, strlen(value)); in cpufreq_modify_policy_max()
662 if ((!governor) || (strlen(governor) > 19)) in cpufreq_modify_policy_governor()
[all …]
/tools/laptop/freefall/
Dfreefall.c31 if (strlen(device) <= 5 || strncmp(device, "/dev/", 5) != 0) in set_unload_heads_path()
65 if (write(fd, buf, strlen(buf)) != strlen(buf)) { in write_int()
/tools/lib/subcmd/
Dhelp.c161 size_t len = strlen(filename); in has_extension()
162 size_t extlen = strlen(ext); in has_extension()
180 prefix_len = strlen(prefix); in list_commands_in_dir()
194 entlen = strlen(de->d_name) - prefix_len; in list_commands_in_dir()
257 mput_char('-', strlen(title) + strlen(exec_path)); in list_commands()
267 mput_char('-', strlen(title)); in list_commands()
/tools/testing/selftests/cgroup/
Dcgroup_util.c60 size_t len = strlen(root) + strlen(name) + 2; in cg_name()
70 size_t len = strlen(root) + strlen(name) + 10; in cg_name_indexed()
80 size_t len = strlen(cgroup) + strlen(control) + 2; in cg_control()
111 size = strlen(expected) + 1; in cg_read_strcmp()
159 return atol(ptr + strlen(key)); in cg_read_key_long()
181 ssize_t len = strlen(buf); in cg_write()

12345678910