Home
last modified time | relevance | path

Searched refs:ret (Results 1 – 25 of 710) sorted by relevance

12345678910>>...29

/tools/testing/selftests/filesystems/
Ddevpts_pts.c18 int ret; in terminal_dup2() local
20 ret = dup2(duplicate, original); in terminal_dup2()
21 if (ret < 0) in terminal_dup2()
44 int ret; in login_pty() local
48 ret = ioctl(fd, TIOCSCTTY, NULL); in login_pty()
49 if (ret < 0) in login_pty()
52 ret = terminal_set_stdfds(fd); in login_pty()
53 if (ret < 0) in login_pty()
64 int status, ret; in wait_for_pid() local
67 ret = waitpid(pid, &status, 0); in wait_for_pid()
[all …]
/tools/gpio/
Dgpio-utils.c67 int ret; in gpiotools_request_linehandle() local
69 ret = asprintf(&chrdev_name, "/dev/%s", device_name); in gpiotools_request_linehandle()
70 if (ret < 0) in gpiotools_request_linehandle()
75 ret = -errno; in gpiotools_request_linehandle()
90 ret = ioctl(fd, GPIO_GET_LINEHANDLE_IOCTL, &req); in gpiotools_request_linehandle()
91 if (ret == -1) { in gpiotools_request_linehandle()
92 ret = -errno; in gpiotools_request_linehandle()
94 "GPIO_GET_LINEHANDLE_IOCTL", ret, strerror(errno)); in gpiotools_request_linehandle()
101 return ret < 0 ? ret : req.fd; in gpiotools_request_linehandle()
134 int ret; in gpiotools_request_line() local
[all …]
/tools/power/x86/intel-speed-select/
Disst-core.c12 int ret; in isst_write_pm_config() local
19 ret = isst_send_mbox_command(cpu, WRITE_PM_CONFIG, PM_FEATURE, 0, req, in isst_write_pm_config()
21 if (ret) in isst_write_pm_config()
22 return ret; in isst_write_pm_config()
32 int ret; in isst_read_pm_config() local
34 ret = isst_send_mbox_command(cpu, READ_PM_CONFIG, PM_FEATURE, 0, 0, in isst_read_pm_config()
36 if (ret) in isst_read_pm_config()
37 return ret; in isst_read_pm_config()
50 int ret; in isst_get_ctdp_levels() local
52 ret = isst_send_mbox_command(cpu, CONFIG_TDP, in isst_get_ctdp_levels()
[all …]
/tools/testing/selftests/uevent/
Duevent_filtering.c32 ssize_t ret; in read_nointr() local
35 ret = read(fd, buf, count); in read_nointr()
36 if (ret < 0 && errno == EINTR) in read_nointr()
39 return ret; in read_nointr()
44 ssize_t ret; in write_nointr() local
47 ret = write(fd, buf, count); in write_nointr()
48 if (ret < 0 && errno == EINTR) in write_nointr()
51 return ret; in write_nointr()
56 int status, ret; in wait_for_pid() local
59 ret = waitpid(pid, &status, 0); in wait_for_pid()
[all …]
/tools/perf/util/arm-spe-decoder/
Darm-spe-pkt-decoder.c140 int ret = arm_spe_get_payload(buf, len, packet); in arm_spe_get_events() local
149 packet->index = ret - 1; in arm_spe_get_events()
151 return ret; in arm_spe_get_events()
261 int ret; in arm_spe_get_packet() local
263 ret = arm_spe_do_get_packet(buf, len, packet); in arm_spe_get_packet()
267 if (ret > 0 && packet->type == ARM_SPE_PAD) { in arm_spe_get_packet()
268 while (ret < 16 && len > (size_t)ret && !buf[ret]) in arm_spe_get_packet()
269 ret += 1; in arm_spe_get_packet()
271 return ret; in arm_spe_get_packet()
277 int ret, ns, el, idx = packet->index; in arm_spe_pkt_desc() local
[all …]
/tools/testing/selftests/powerpc/ptrace/
Dptrace-pkey.c74 int ret; in child() local
77 ret = wait_parent(&info->child_sync); in child()
78 if (ret) in child()
79 return ret; in child()
131 ret = prod_parent(&info->child_sync); in child()
132 CHILD_FAIL_IF(ret, &info->child_sync); in child()
134 ret = wait_parent(&info->child_sync); in child()
135 if (ret) in child()
136 return ret; in child()
147 ret = prod_parent(&info->child_sync); in child()
[all …]
Dptrace.h62 int ret; in start_trace() local
64 ret = ptrace(PTRACE_ATTACH, child, NULL, NULL); in start_trace()
65 if (ret) { in start_trace()
69 ret = waitpid(child, NULL, 0); in start_trace()
70 if (ret != child) { in start_trace()
79 int ret; in stop_trace() local
81 ret = ptrace(PTRACE_DETACH, child, NULL, NULL); in stop_trace()
82 if (ret) { in stop_trace()
91 int ret; in cont_trace() local
93 ret = ptrace(PTRACE_CONT, child, NULL, NULL); in cont_trace()
[all …]
Dcore-pkey.c77 int ret; in increase_core_file_limit() local
79 ret = getrlimit(RLIMIT_CORE, &rlim); in increase_core_file_limit()
80 FAIL_IF(ret); in increase_core_file_limit()
89 ret = setrlimit(RLIMIT_CORE, &rlim); in increase_core_file_limit()
90 FAIL_IF(ret); in increase_core_file_limit()
93 ret = getrlimit(RLIMIT_FSIZE, &rlim); in increase_core_file_limit()
94 FAIL_IF(ret); in increase_core_file_limit()
103 ret = setrlimit(RLIMIT_FSIZE, &rlim); in increase_core_file_limit()
104 FAIL_IF(ret); in increase_core_file_limit()
114 int *ptr, ret; in child() local
[all …]
/tools/iio/
Diio_utils.c34 int i, ret; in iioutils_break_up_name() local
65 ret = asprintf(generic_name, "%s_%s", prefix, working); in iioutils_break_up_name()
68 return (ret == -1) ? -ENOMEM : 0; in iioutils_break_up_name()
91 int ret; in iioutils_get_type() local
98 ret = asprintf(&scan_el_dir, FORMAT_SCAN_ELEMENTS_DIR, device_dir); in iioutils_get_type()
99 if (ret < 0) in iioutils_get_type()
102 ret = asprintf(&builtname, FORMAT_TYPE_FILE, name); in iioutils_get_type()
103 if (ret < 0) { in iioutils_get_type()
104 ret = -ENOMEM; in iioutils_get_type()
107 ret = asprintf(&builtname_generic, FORMAT_TYPE_FILE, generic_name); in iioutils_get_type()
[all …]
/tools/testing/selftests/dmabuf-heaps/
Ddmabuf-heap.c26 int ret; in check_vgem() local
31 ret = ioctl(fd, DRM_IOCTL_VERSION, &version); in check_vgem()
32 if (ret) in check_vgem()
71 int ret; in import_vgem_fd() local
73 ret = ioctl(vgem_fd, DRM_IOCTL_PRIME_FD_TO_HANDLE, &import_handle); in import_vgem_fd()
74 if (ret == 0) in import_vgem_fd()
76 return ret; in import_vgem_fd()
90 int ret, fd; in dmabuf_heap_open() local
93 ret = snprintf(buf, 256, "%s/%s", DEVPATH, name); in dmabuf_heap_open()
94 if (ret < 0) { in dmabuf_heap_open()
[all …]
/tools/bootconfig/
Dmain.c114 int ret = 0; in xbc_show_list() local
117 ret = xbc_node_compose_key(leaf, key, XBC_KEYLEN_MAX); in xbc_show_list()
118 if (ret < 0) { in xbc_show_list()
119 fprintf(stderr, "Failed to compose key %d\n", ret); in xbc_show_list()
135 int ret; in load_xbc_fd() local
141 ret = read(fd, *buf, size); in load_xbc_fd()
142 if (ret < 0) in load_xbc_fd()
146 return ret; in load_xbc_fd()
153 int fd, ret; in load_xbc_file() local
158 ret = fstat(fd, &stat); in load_xbc_file()
[all …]
/tools/testing/selftests/bpf/progs/
Dtest_tunnel_kern.c24 #define ERROR(ret) do {\ argument
26 bpf_trace_printk(fmt, sizeof(fmt), __LINE__, ret); \
48 int ret; in _gre_set_tunnel() local
57 ret = bpf_skb_set_tunnel_key(skb, &key, sizeof(key), in _gre_set_tunnel()
59 if (ret < 0) { in _gre_set_tunnel()
60 ERROR(ret); in _gre_set_tunnel()
70 int ret; in _gre_get_tunnel() local
74 ret = bpf_skb_get_tunnel_key(skb, &key, sizeof(key), 0); in _gre_get_tunnel()
75 if (ret < 0) { in _gre_get_tunnel()
76 ERROR(ret); in _gre_get_tunnel()
[all …]
/tools/testing/selftests/timers/
Dset-2038.c51 int ret; in settime() local
56 ret = settimeofday(&now, NULL); in settime()
58 printf("Setting time to 0x%lx: %d\n", (long)time, ret); in settime()
59 return ret; in settime()
64 int ret; in do_tests() local
66 ret = system("date"); in do_tests()
67 ret = system("./inconsistency-check -c 0 -t 20"); in do_tests()
68 ret |= system("./nanosleep"); in do_tests()
69 ret |= system("./nsleep-lat"); in do_tests()
70 return ret; in do_tests()
[all …]
Dchange_skew.c39 int ret; in change_skew_test() local
44 ret = adjtimex(&tx); in change_skew_test()
45 if (ret < 0) { in change_skew_test()
47 return ret; in change_skew_test()
50 ret = system("./raw_skew"); in change_skew_test()
51 ret |= system("./inconsistency-check"); in change_skew_test()
52 ret |= system("./nanosleep"); in change_skew_test()
54 return ret; in change_skew_test()
61 int i, ret; in main() local
66 ret = system("killall -9 ntpd"); in main()
[all …]
/tools/perf/tests/
Dexpr.c24 int ret; in test__expr() local
31 ret = test(&ctx, "1+1", 2); in test__expr()
32 ret |= test(&ctx, "FOO+BAR", 3); in test__expr()
33 ret |= test(&ctx, "(BAR/2)%2", 1); in test__expr()
34 ret |= test(&ctx, "1 - -4", 5); in test__expr()
35 ret |= test(&ctx, "(FOO-1)*2 + (BAR/2)%2 - -4", 5); in test__expr()
36 ret |= test(&ctx, "1-1 | 1", 1); in test__expr()
37 ret |= test(&ctx, "1-1 & 1", 0); in test__expr()
38 ret |= test(&ctx, "min(1,2) + 1", 2); in test__expr()
39 ret |= test(&ctx, "max(1,2) + 1", 3); in test__expr()
[all …]
Dexpand-cgroup.c19 int i, ret = TEST_FAIL; in test_expand_events() local
50 ret = evlist__expand_cgroup(evlist, cgrp_str, metric_events, false); in test_expand_events()
51 if (ret < 0) { in test_expand_events()
56 ret = TEST_FAIL; in test_expand_events()
92 ret = TEST_OK; in test_expand_events()
97 return ret; in test_expand_events()
102 int ret; in expand_default_events() local
110 ret = test_expand_events(evlist, &metric_events); in expand_default_events()
112 return ret; in expand_default_events()
117 int ret; in expand_group_events() local
[all …]
/tools/testing/selftests/filesystems/binderfs/
Dbinderfs_test.c41 int ret; in change_mountns() local
43 ret = unshare(CLONE_NEWNS); in change_mountns()
44 ASSERT_EQ(ret, 0) { in change_mountns()
49 ret = mount(NULL, "/", NULL, MS_REC | MS_PRIVATE, 0); in change_mountns()
50 ASSERT_EQ(ret, 0) { in change_mountns()
58 int fd, ret, saved_errno, result = 1; in __do_binderfs_test() local
74 ret = mount(NULL, binderfs_mntpt, "binder", 0, 0); in __do_binderfs_test()
75 EXPECT_EQ(ret, 0) { in __do_binderfs_test()
94 ret = ioctl(fd, BINDER_CTL_ADD, &device); in __do_binderfs_test()
98 EXPECT_GE(ret, 0) { in __do_binderfs_test()
[all …]
/tools/testing/selftests/futex/functional/
Dfutex_requeue_pi.c53 int ret; member
73 int ret; in create_rt_thread() local
80 ret = pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED); in create_rt_thread()
81 if (ret) { in create_rt_thread()
82 error("pthread_attr_setinheritsched\n", ret); in create_rt_thread()
86 ret = pthread_attr_setschedpolicy(&attr, policy); in create_rt_thread()
87 if (ret) { in create_rt_thread()
88 error("pthread_attr_setschedpolicy\n", ret); in create_rt_thread()
93 ret = pthread_attr_setschedparam(&attr, &schedp); in create_rt_thread()
94 if (ret) { in create_rt_thread()
[all …]
/tools/perf/jvmti/
Dlibjvmti.c20 static void print_error(jvmtiEnv *jvmti, const char *msg, jvmtiError ret) in print_error() argument
24 err = (*jvmti)->GetErrorName(jvmti, ret, &err_msg); in print_error()
29 warnx("%s failed with an unknown error %d", msg, ret); in print_error()
40 jvmtiError ret; in do_get_line_number() local
43 ret = (*jvmti)->GetLineNumberTable(jvmti, m, &nr_lines, &loc_tab); in do_get_line_number()
44 if (ret == JVMTI_ERROR_ABSENT_INFORMATION || ret == JVMTI_ERROR_NATIVE_METHOD) { in do_get_line_number()
46 return ret; in do_get_line_number()
47 } else if (ret != JVMTI_ERROR_NONE) { in do_get_line_number()
48 print_error(jvmti, "GetLineNumberTable", ret); in do_get_line_number()
49 return ret; in do_get_line_number()
[all …]
/tools/testing/selftests/sparc64/drivers/
Dadi-test.c186 int ret, bytes_read = 0; in read_adi() local
191 ret = read(fd, buf + bytes_read, buf_sz - bytes_read); in read_adi()
193 if (ret < 0) in read_adi()
198 bytes_read += ret; in read_adi()
211 int ret, i, bytes_read = 0; in pread_adi() local
218 ret = pread(fd, buf + bytes_read, buf_sz - bytes_read, in pread_adi()
221 if (ret < 0) in pread_adi()
226 bytes_read += ret; in pread_adi()
227 cur_offset += ret; in pread_adi()
242 int ret, bytes_written = 0; in write_adi() local
[all …]
/tools/testing/selftests/resctrl/
Dcache.c68 int ret = 0; in reset_enable_llc_perf() local
70 ret = perf_event_open_llc_miss(pid, cpu_no); in reset_enable_llc_perf()
71 if (ret < 0) in reset_enable_llc_perf()
72 return ret; in reset_enable_llc_perf()
92 int ret; in get_llc_perf() local
98 ret = read(fd_lm, &rf_cqm, sizeof(struct read_format)); in get_llc_perf()
99 if (ret == -1) { in get_llc_perf()
178 int ret; in measure_cache_vals() local
184 ret = get_llc_perf(&llc_perf_miss); in measure_cache_vals()
185 if (ret < 0) in measure_cache_vals()
[all …]
/tools/wmi/
Ddell-smbios-example.c45 int ret; in run_wmi_smbios_cmd() local
48 ret = ioctl(fd, DELL_WMI_SMBIOS_CMD, buffer); in run_wmi_smbios_cmd()
50 return ret; in run_wmi_smbios_cmd()
59 int ret; in find_token() local
61 ret = sprintf(value_sysfs, "%s/%04x_value", token_sysfs, token); in find_token()
62 if (ret < 0) { in find_token()
75 ret = sprintf(location_sysfs, "%s/%04x_location", token_sysfs, token); in find_token()
76 if (ret < 0) { in find_token()
97 int ret; in token_is_active() local
102 ret = run_wmi_smbios_cmd(buffer); in token_is_active()
[all …]
/tools/perf/util/
Dtop.c30 size_t ret = 0; in perf_top__header_snprintf() local
46 ret = SNPRINTF(bf, size, in perf_top__header_snprintf()
56 ret = SNPRINTF(bf, size, in perf_top__header_snprintf()
75 ret += SNPRINTF(bf + ret, size - ret, "%" PRIu64 "%s ", in perf_top__header_snprintf()
80 ret += SNPRINTF(bf + ret, size - ret, "%s", evsel__name(top->sym_evsel)); in perf_top__header_snprintf()
82 ret += SNPRINTF(bf + ret, size - ret, "], "); in perf_top__header_snprintf()
85 ret += SNPRINTF(bf + ret, size - ret, " (target_pid: %s", in perf_top__header_snprintf()
88 ret += SNPRINTF(bf + ret, size - ret, " (target_tid: %s", in perf_top__header_snprintf()
91 ret += SNPRINTF(bf + ret, size - ret, " (uid: %s", in perf_top__header_snprintf()
94 ret += SNPRINTF(bf + ret, size - ret, " (all"); in perf_top__header_snprintf()
[all …]
/tools/testing/selftests/vm/
Dmap_populate.c35 int status, ret; in parent_f() local
37 ret = read(sock, &status, sizeof(int)); in parent_f()
38 BUG_ON(ret <= 0, "read(sock)"); in parent_f()
41 ret = msync(smap, MMAP_SZ, MS_SYNC); in parent_f()
42 BUG_ON(ret, "msync()"); in parent_f()
44 ret = write(sock, &status, sizeof(int)); in parent_f()
45 BUG_ON(ret <= 0, "write(sock)"); in parent_f()
55 int ret, buf = 0; in child_f() local
63 ret = write(sock, &buf, sizeof(int)); in child_f()
64 BUG_ON(ret <= 0, "write(sock)"); in child_f()
[all …]
/tools/perf/
Dbuiltin-probe.c56 int ret; in parse_probe_event() local
75 ret = parse_perf_probe_command(str, pev); in parse_probe_event()
78 return ret; in parse_probe_event()
84 int ret = 0; in params_add_filter() local
90 ret = err ? -EINVAL : -ENOMEM; in params_add_filter()
92 ret = strfilter__or(params.filter, str, &err); in params_add_filter()
94 if (ret == -EINVAL) { in params_add_filter()
100 return ret; in params_add_filter()
134 int i, len, ret, found_target; in parse_probe_event_argv() local
162 ret = parse_probe_event(buf); in parse_probe_event_argv()
[all …]

12345678910>>...29