Home
last modified time | relevance | path

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

12345678910>>...16

/tools/iio/
A 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()
A Diio_utils.h55 return strlen(str) >= strlen(suffix) && in iioutils_check_suffix()
56 strncmp(str+strlen(str)-strlen(suffix), in iioutils_check_suffix()
57 suffix, strlen(suffix)) == 0; in iioutils_check_suffix()
A Diio_utils.c339 if (strcmp(ent->d_name + strlen(ent->d_name) - strlen("_en"), in build_channel_array()
381 if (strcmp(ent->d_name + strlen(ent->d_name) - strlen("_en"), in build_channel_array()
424 strlen(ent->d_name) - in build_channel_array()
425 strlen("_en")); in build_channel_array()
579 strlen(ent->d_name) > strlen(type) && in find_type_by_name()
599 filename = malloc(strlen(iio_dir) + strlen(type) in find_type_by_name()
658 char *temp = malloc(strlen(basedir) + strlen(filename) + 2); in _write_sysfs_int()
754 char *temp = malloc(strlen(basedir) + strlen(filename) + 2); in _write_sysfs_string()
861 char *temp = malloc(strlen(basedir) + strlen(filename) + 2); in read_sysfs_posint()
908 char *temp = malloc(strlen(basedir) + strlen(filename) + 2); in read_sysfs_float()
[all …]
/tools/perf/arch/s390/util/
A 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/powerpc/stringloops/
A DMakefile6 TEST_GEN_PROGS := memcmp_64 strlen
18 $(OUTPUT)/strlen: strlen.c string.c
21 $(OUTPUT)/strlen_32: strlen.c
/tools/testing/selftests/proc/
A Dproc-pid-vm.c356 const size_t len = strlen(buf0) + strlen(str_vsyscall); in main()
368 assert(memcmp(buf, buf0, strlen(buf0)) == 0); in main()
370 assert(memcmp(buf + strlen(buf0), str_vsyscall, strlen(str_vsyscall)) == 0); in main()
388 assert(rv >= strlen(buf0)); in main()
389 assert(memcmp(buf, buf0, strlen(buf0)) == 0); in main()
395 assert(memmem(buf, rv, RSS1, strlen(RSS1)) || in main()
396 memmem(buf, rv, RSS2, strlen(RSS2))); in main()
398 memmem(buf, rv, PSS2, strlen(PSS2))); in main()
444 assert(rv >= strlen(bufr)); in main()
448 memmem(buf, rv, RSS2, strlen(RSS2))); in main()
[all …]
A 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()
A Dproc-self-syscall.c52 if (rv < strlen(buf1)) in main()
54 if (strncmp(buf1, buf2, strlen(buf1)) != 0) in main()
/tools/testing/selftests/pidfd/
A Dpidfd_xattr_test.c59 ret = fsetxattr(self->child_pidfd, xattr_name, xattr_value, strlen(xattr_value), 0); in TEST_F()
68 ASSERT_EQ(ret, strlen(xattr_value)); in TEST_F()
77 for (char *it = list; it < list + ret; it += strlen(it) + 1) { in TEST_F()
103 …ret = fsetxattr(self->child_pidfd, "trusted.persistent", "persistent value", strlen("persistent va… in TEST_F()
108 ASSERT_EQ(ret, strlen("persistent value")); in TEST_F()
124 ASSERT_EQ(ret, strlen("persistent value")); in TEST_F()
/tools/tracing/rtla/src/
A Dutils.c326 if (strlen(comm_prefix) >= MAX_PATH) { in set_comm_sched_attr()
421 if (strlen(arg) < 4) in parse_prio()
753 if (strlen(start) >= sizeof_self_cg) in get_self_cgroup()
783 char cgroup_path[MAX_PATH - strlen("/cgroup.procs")]; in set_pid_cgroup()
797 sizeof(cgroup_path) - strlen(cgroup_path)); in set_pid_cgroup()
803 snprintf(&cgroup_path[strlen(cgroup_path)], in set_pid_cgroup()
817 retval = write(cg_fd, pid_str, strlen(pid_str)); in set_pid_cgroup()
841 char cgroup_path[MAX_PATH - strlen("/cgroup.procs")]; in set_comm_cgroup()
848 if (strlen(comm_prefix) >= MAX_PATH) { in set_comm_cgroup()
862 sizeof(cgroup_path) - strlen(cgroup_path)); in set_comm_cgroup()
[all …]
A Dactions.c70 action->trace_output = calloc(strlen(trace_output) + 1, sizeof(char)); in actions_add_trace_output()
104 action->command = calloc(strlen(command) + 1, sizeof(char)); in actions_add_shell()
134 char trigger_c[strlen(trigger)]; in actions_parse()
165 if (strlen(token) > 5 && strncmp(token, "file=", 5) == 0) { in actions_parse()
181 if (strlen(token) > 4 && strncmp(token, "num=", 4) == 0) { in actions_parse()
183 } else if (strlen(token) > 4 && strncmp(token, "pid=", 4) == 0) { in actions_parse()
204 if (strlen(token) > 8 && strncmp(token, "command=", 8) == 0) in actions_parse()
/tools/testing/selftests/powerpc/dexcr/
A Dchdexcr.c69 if (!strncmp(option, clear_prefix, strlen(clear_prefix))) { in apply_option()
70 opt = &option[strlen(clear_prefix)]; in apply_option()
72 } else if (!strncmp(option, set_prefix, strlen(set_prefix))) { in apply_option()
73 opt = &option[strlen(set_prefix)]; in apply_option()
/tools/perf/arch/riscv/util/
A Dheader.c52 if (!strncmp(line, CPUINFO_MVEN, strlen(CPUINFO_MVEN))) { in _get_cpuid()
56 } else if (!strncmp(line, CPUINFO_MARCH, strlen(CPUINFO_MARCH))) { in _get_cpuid()
60 } else if (!strncmp(line, CPUINFO_MIMP, strlen(CPUINFO_MIMP))) { in _get_cpuid()
89 if (sz < strlen(cpuid)) { in get_cpuid()
/tools/power/cpupower/bench/
A Dparse.c33 if (strncasecmp("high", str, strlen(str)) == 0) in string_to_prio()
35 else if (strncasecmp("default", str, strlen(str)) == 0) in string_to_prio()
37 else if (strncasecmp("low", str, strlen(str)) == 0) in string_to_prio()
70 len = strlen(dirname) + 30; in prepare_output()
78 len += strlen(sysdata.nodename) + strlen(sysdata.release); in prepare_output()
/tools/bpf/bpftool/
A Dmain.c219 if (strlen(str) < strlen(pfx)) in is_prefix()
222 return !memcmp(str, pfx, strlen(pfx)); in is_prefix()
240 strncat(msg, "' or '", sizeof(msg) - strlen(msg) - 1); in detect_common_prefix()
241 strncat(msg, ref, sizeof(msg) - strlen(msg) - 1); in detect_common_prefix()
244 strncat(msg, "'", sizeof(msg) - strlen(msg) - 1); in detect_common_prefix()
362 if (strlen(buf) == sizeof(buf) - 1) { in do_batch()
372 strlen(contline) == 0) { in do_batch()
383 if (strlen(buf) + strlen(contline) + 1 > sizeof(buf)) { in do_batch()
388 buf[strlen(buf) - 2] = '\0'; in do_batch()
/tools/gpio/
A Dgpio-utils.h23 return strlen(str) > strlen(prefix) && in check_prefix()
24 strncmp(str, prefix, strlen(prefix)) == 0; in check_prefix()
/tools/lib/api/fs/
A Dcgroup.c28 if (strlen(cached->mountpoint) < maxlen) { in cgroupfs_find_mountpoint()
85 if (!strchr(" ,", p[-1]) || !strchr(" ,", p[strlen(subsys)])) in cgroupfs_find_mountpoint()
102 if (mountpoint[0] && strlen(mountpoint) < maxlen) { in cgroupfs_find_mountpoint()
/tools/perf/util/
A Dstring.c202 int i1 = strlen(s1); in strtailcmp()
203 int i2 = strlen(s2); in strtailcmp()
327 memmove(d, s, strlen(s) + 1); in strdup_esc()
376 int len = strlen(d + 1) + 1; in strdup_esq()
387 memmove(d, d + 1, strlen(d + 1) + 1); in strdup_esq()
390 memmove(d, d + 1, strlen(d + 1) + 1); in strdup_esq()
423 int replace_len = strlen(replace); in strreplace_chars()
436 new_s = malloc(strlen(haystack) + (num * (replace_len - 1) + 1)); in strreplace_chars()
/tools/include/nolibc/
A Dstring.h133 size_t strlen(const char *str);
135 size_t strlen(const char *str) in strlen() function
148 #define nolibc_strlen(x) strlen(x)
149 #define strlen(str) ({ \ macro
171 len = strlen(str); in strdup()
300 len_needle = strlen(needle); in strstr()
304 len_haystack = strlen(haystack); in strstr()
/tools/usb/usbip/src/
A 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/perf/tests/
A Dpmu.c93 len = strlen("9999"); in test_pmu_get()
119 if (write(file, format->value, strlen(format->value)) < 0) { in test_pmu_get()
137 len = strlen(test_event); in test_pmu_get()
263 for (size_t i = 0; i < strlen(name); i++) { in permitted_event_name()
414 TEST_ASSERT_VAL("cpu", pmu_name_len_no_suffix("cpu") == strlen("cpu")); in test__name_len()
415 TEST_ASSERT_VAL("i915", pmu_name_len_no_suffix("i915") == strlen("i915")); in test__name_len()
416 TEST_ASSERT_VAL("cpum_cf", pmu_name_len_no_suffix("cpum_cf") == strlen("cpum_cf")); in test__name_len()
420 strlen("uncore_cha")); in test__name_len()
425 strlen("mrvl_ddr_pmu")); in test__name_len()
/tools/testing/selftests/exec/
A Drecursion-depth.c57 if (write(fd, S, strlen(S)) != strlen(S)) in main()
/tools/testing/selftests/bpf/prog_tests/
A 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()
/tools/testing/selftests/wireguard/qemu/
A Dinit.c55 …len = strlen(" WireGuard Test Suite on ") + strlen(utsname.sysname) + strlen(utsname.rele… in print_banner()
192 if (!success_dev || !strlen(success_dev)) in launch_tests()
/tools/laptop/freefall/
A 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()

Completed in 35 milliseconds

12345678910>>...16