Home
last modified time | relevance | path

Searched refs:res (Results 1 – 25 of 192) sorted by relevance

12345678

/Zephyr-Core-2.7.6/tests/subsys/fs/fat_fs_dual_drive/src/
Dtest_fat_file.c18 int res; in test_file_open() local
29 res = fs_open(&filep, path, FS_O_CREATE | FS_O_RDWR); in test_file_open()
30 if (res) { in test_file_open()
31 TC_PRINT("Failed opening file [%d]\n", res); in test_file_open()
32 return res; in test_file_open()
37 return res; in test_file_open()
43 int res; in test_file_write() local
48 res = fs_seek(&filep, 0, FS_SEEK_SET); in test_file_write()
49 if (res) { in test_file_write()
50 TC_PRINT("fs_seek failed [%d]\n", res); in test_file_write()
[all …]
Dtest_fat_dir.c22 int res; in test_mkdir() local
37 res = fs_mkdir(dir); in test_mkdir()
38 if (res) { in test_mkdir()
39 TC_PRINT("Error creating dir[%d]\n", res); in test_mkdir()
40 return res; in test_mkdir()
43 res = fs_open(&filep, file, FS_O_CREATE | FS_O_RDWR); in test_mkdir()
44 if (res) { in test_mkdir()
45 TC_PRINT("Failed opening file [%d]\n", res); in test_mkdir()
46 return res; in test_mkdir()
49 res = test_file_write(); in test_mkdir()
[all …]
/Zephyr-Core-2.7.6/tests/subsys/fs/multi-fs/src/
Dtest_common_dir.c22 int res; in test_mkdir() local
27 res = sprintf(file_path, "%s/%s", dir_path, file); in test_mkdir()
28 __ASSERT_NO_MSG(res < sizeof(file_path)); in test_mkdir()
41 res = fs_mkdir(dir_path); in test_mkdir()
42 if (res) { in test_mkdir()
43 TC_PRINT("Error creating dir[%d]\n", res); in test_mkdir()
44 return res; in test_mkdir()
47 res = fs_open(&filep, file_path, FS_O_CREATE | FS_O_RDWR); in test_mkdir()
48 if (res) { in test_mkdir()
49 TC_PRINT("Failed opening file [%d]\n", res); in test_mkdir()
[all …]
Dtest_common_file.c14 int res; in test_file_open() local
25 res = fs_open(filep, file_path, FS_O_CREATE | FS_O_RDWR); in test_file_open()
26 if (res) { in test_file_open()
27 TC_PRINT("Failed opening file [%d]\n", res); in test_file_open()
28 return res; in test_file_open()
33 return res; in test_file_open()
39 int res; in test_file_write() local
44 res = fs_seek(filep, 0, FS_SEEK_SET); in test_file_write()
45 if (res) { in test_file_write()
46 TC_PRINT("fs_seek failed [%d]\n", res); in test_file_write()
[all …]
/Zephyr-Core-2.7.6/tests/subsys/fs/fat_fs_api/src/
Dtest_fat_rename.c13 int res = 0; in delete_it() local
15 res = fs_unlink(path); in delete_it()
16 if (res && !quiet) { in delete_it()
17 TC_PRINT("Couldn't delete %s [%d]\n", path, res); in delete_it()
21 return res; in delete_it()
27 int res = 0; in create_file() local
31 res = fs_open(&fp, path, FS_O_CREATE | FS_O_RDWR); in create_file()
32 if (!res) { in create_file()
33 res = fs_close(&fp); in create_file()
35 TC_PRINT("Couldn't open %s [%d]\n", path, res); in create_file()
[all …]
Dtest_fat_dir.c17 int res; in test_mkdir() local
32 res = fs_mkdir(TEST_DIR); in test_mkdir()
33 if (res) { in test_mkdir()
34 TC_PRINT("Error creating dir[%d]\n", res); in test_mkdir()
35 return res; in test_mkdir()
38 res = fs_open(&filep, TEST_DIR_FILE, FS_O_CREATE | FS_O_RDWR); in test_mkdir()
39 if (res) { in test_mkdir()
40 TC_PRINT("Failed opening file [%d]\n", res); in test_mkdir()
41 return res; in test_mkdir()
44 res = test_file_write(); in test_mkdir()
[all …]
Dtest_fat_file.c13 int res; in test_file_open() local
24 res = fs_open(&filep, TEST_FILE, FS_O_CREATE | FS_O_RDWR); in test_file_open()
25 if (res) { in test_file_open()
26 TC_PRINT("Failed opening file [%d]\n", res); in test_file_open()
27 return res; in test_file_open()
36 return res; in test_file_open()
42 int res; in test_file_write() local
47 res = fs_seek(&filep, 0, FS_SEEK_SET); in test_file_write()
48 if (res) { in test_file_write()
49 TC_PRINT("fs_seek failed [%d]\n", res); in test_file_write()
[all …]
/Zephyr-Core-2.7.6/tests/net/socket/socketpair/src/
Dtest_socketpair_poll.c44 int res; in test_socketpair_poll_timeout_common() local
51 res = poll(fds, 1, 1); in test_socketpair_poll_timeout_common()
52 zassert_equal(res, 0, "poll: expected: 0 actual: %d", res); in test_socketpair_poll_timeout_common()
55 res = write(sv[0], "x", 1); in test_socketpair_poll_timeout_common()
56 zassert_equal(res, 1, "write failed: %d", res); in test_socketpair_poll_timeout_common()
62 res = poll(fds, 1, 1); in test_socketpair_poll_timeout_common()
63 zassert_equal(res, 0, "poll: expected: 0 actual: %d", res); in test_socketpair_poll_timeout_common()
72 int res = socketpair(AF_UNIX, SOCK_STREAM, 0, sv); in test_socketpair_poll_timeout() local
74 zassert_not_equal(res, -1, "socketpair failed: %d", errno); in test_socketpair_poll_timeout()
83 int res = socketpair(AF_UNIX, SOCK_STREAM, 0, sv); in test_socketpair_poll_timeout_nonblocking() local
[all …]
Dtest_socketpair_closed_ends.c26 int res; in test_socketpair_close_one_end_and_write_to_the_other() local
30 res = socketpair(AF_UNIX, SOCK_STREAM, 0, sv); in test_socketpair_close_one_end_and_write_to_the_other()
31 zassert_equal(res, 0, "socketpair(2) failed: %d", errno); in test_socketpair_close_one_end_and_write_to_the_other()
33 res = close(sv[i]); in test_socketpair_close_one_end_and_write_to_the_other()
34 zassert_equal(res, 0, "close(sv[%u]) failed: %d", i, errno); in test_socketpair_close_one_end_and_write_to_the_other()
36 res = write(sv[(!i) & 1], "x", 1); in test_socketpair_close_one_end_and_write_to_the_other()
37 zassert_equal(res, -1, "expected write(2) to fail"); in test_socketpair_close_one_end_and_write_to_the_other()
38 zassert_equal(res, -1, "errno: expected: EPIPE actual: %d", in test_socketpair_close_one_end_and_write_to_the_other()
41 res = close(sv[(!i) & 1]); in test_socketpair_close_one_end_and_write_to_the_other()
42 zassert_equal(res, 0, "close(sv[%u]) failed: %d", i, errno); in test_socketpair_close_one_end_and_write_to_the_other()
[all …]
Dtest_socketpair_happy_path.c31 int res; in happy_path() local
42 res = socketpair(family, type, proto, sv); in happy_path()
43 zassert_true(res == -1 || res == 0, in happy_path()
45 zassert_equal(res, 0, "socketpair failed"); in happy_path()
59 res = write(sv[i], expected_msg, expected_msg_len); in happy_path()
61 zassert_not_equal(res, -1, "write(2) failed: %d", errno); in happy_path()
62 actual_msg_len = res; in happy_path()
70 res = read(sv[(!i) & 1], actual_msg, sizeof(actual_msg)); in happy_path()
72 zassert_not_equal(res, -1, "read(2) failed: %d", errno); in happy_path()
73 actual_msg_len = res; in happy_path()
[all …]
Dtest_socketpair_nonblock.c28 int res; in test_socketpair_write_nonblock() local
31 res = socketpair(AF_UNIX, SOCK_STREAM, 0, sv); in test_socketpair_write_nonblock()
32 zassert_equal(res, 0, "socketpair(2) failed: %d", errno); in test_socketpair_write_nonblock()
38 res = write(sv[i], "x", 1); in test_socketpair_write_nonblock()
39 zassert_equal(res, 1, "write(2) failed: %d", errno); in test_socketpair_write_nonblock()
43 res = fcntl(sv[i], F_GETFL, 0); in test_socketpair_write_nonblock()
44 zassert_not_equal(res, -1, "fcntl() failed: %d", i, errno); in test_socketpair_write_nonblock()
46 res = fcntl(sv[i], F_SETFL, res | O_NONBLOCK); in test_socketpair_write_nonblock()
47 zassert_not_equal(res, -1, "fcntl() failed: %d", i, errno); in test_socketpair_write_nonblock()
50 res = write(sv[i], "x", 1); in test_socketpair_write_nonblock()
[all …]
Dtest_socketpair_unsupported_calls.c28 int res; in test_socketpair_unsupported_calls() local
35 res = socketpair(AF_UNIX, SOCK_STREAM, 0, sv); in test_socketpair_unsupported_calls()
36 zassert_equal(res, 0, in test_socketpair_unsupported_calls()
42 res = bind(sv[i], (struct sockaddr *)&addr, len); in test_socketpair_unsupported_calls()
43 zassert_equal(res, -1, in test_socketpair_unsupported_calls()
48 res = connect(sv[i], (struct sockaddr *)&addr, len); in test_socketpair_unsupported_calls()
49 zassert_equal(res, -1, in test_socketpair_unsupported_calls()
54 res = listen(sv[i], 1); in test_socketpair_unsupported_calls()
55 zassert_equal(res, -1, in test_socketpair_unsupported_calls()
60 res = accept(sv[i], (struct sockaddr *)&addr, &len); in test_socketpair_unsupported_calls()
[all …]
Dtest_socketpair_block.c40 int res; in work_handler() local
64 res = read(ctx.fd, &c, 1); in work_handler()
66 res = write(ctx.fd, "x", 1); in work_handler()
68 if (-1 == res || 1 != res) { in work_handler()
78 int res; in test_socketpair_write_block() local
82 res = socketpair(AF_UNIX, SOCK_STREAM, 0, sv); in test_socketpair_write_block()
83 zassert_equal(res, 0, "socketpair(2) failed: %d", errno); in test_socketpair_write_block()
102 res = write(sv[i], "x", 1); in test_socketpair_write_block()
103 zassert_not_equal(res, -1, "write(2) failed: %d", in test_socketpair_write_block()
105 zassert_equal(res, 1, "wrote %d bytes instead of 1", in test_socketpair_write_block()
[all …]
Dtest_socketpair_expected_failures.c28 int res; in test_socketpair_expected_failures() local
33 res = socketpair(AF_INET, SOCK_STREAM, 0, sv); in test_socketpair_expected_failures()
34 if (res != -1) { in test_socketpair_expected_failures()
38 zassert_equal(res, -1, "socketpair with fail with bad address family"); in test_socketpair_expected_failures()
42 res = socketpair(AF_UNIX, 42, 0, sv); in test_socketpair_expected_failures()
43 if (res != -1) { in test_socketpair_expected_failures()
47 zassert_equal(res, -1, in test_socketpair_expected_failures()
52 res = socketpair(AF_UNIX, SOCK_STREAM, IPPROTO_TLS_1_0, sv); in test_socketpair_expected_failures()
53 if (res != -1) { in test_socketpair_expected_failures()
57 zassert_equal(res, -1, in test_socketpair_expected_failures()
[all …]
Dtest_socketpair_fcntl.c28 int res; in test_socketpair_fcntl() local
32 res = socketpair(AF_UNIX, SOCK_STREAM, 0, sv); in test_socketpair_fcntl()
33 zassert_equal(res, 0, in test_socketpair_fcntl()
36 res = fcntl(sv[0], F_GETFL, 0); in test_socketpair_fcntl()
37 zassert_not_equal(res, -1, in test_socketpair_fcntl()
40 flags = res; in test_socketpair_fcntl()
41 zassert_equal(res & O_NONBLOCK, 0, in test_socketpair_fcntl()
44 res = fcntl(sv[0], F_SETFL, flags | O_NONBLOCK); in test_socketpair_fcntl()
45 zassert_not_equal(res, -1, in test_socketpair_fcntl()
49 res = fcntl(sv[0], F_GETFL, 0); in test_socketpair_fcntl()
[all …]
/Zephyr-Core-2.7.6/subsys/fs/
Dfat_fs.c87 FRESULT res; in fatfs_open() local
100 res = f_open(zfp->filep, &file_name[1], fs_mode); in fatfs_open()
102 if (res != FR_OK) { in fatfs_open()
107 return translate_error(res); in fatfs_open()
112 FRESULT res; in fatfs_close() local
114 res = f_close(zfp->filep); in fatfs_close()
120 return translate_error(res); in fatfs_close()
125 int res = -ENOTSUP; in fatfs_unlink() local
128 res = f_unlink(&path[1]); in fatfs_unlink()
130 res = translate_error(res); in fatfs_unlink()
[all …]
/Zephyr-Core-2.7.6/include/linker/
Ddevicetree_reserved.h15 #define _DT_LABEL_TOKEN(res) DT_STRING_TOKEN(res, label) argument
18 #define _DT_RESERVED_PREFIX(res) UTIL_CAT(__, _DT_LABEL_TOKEN(res)) argument
19 #define _DT_RESERVED_START(res) UTIL_CAT(_DT_RESERVED_PREFIX(res), _start) argument
20 #define _DT_RESERVED_END(res) UTIL_CAT(_DT_RESERVED_PREFIX(res), _end) argument
23 #define _RESERVED_REGION_DECLARE(res) DT_STRING_TOKEN(res, label) (rw) : \ argument
24 ORIGIN = DT_REG_ADDR(res), \
25 LENGTH = DT_REG_SIZE(res)
28 #define _RESERVED_SECTION_DECLARE(res) SECTION_DATA_PROLOGUE(_DT_LABEL_TOKEN(res), ,) \ argument
30 _DT_RESERVED_START(res) = .; \
31 KEEP(*(._DT_LABEL_TOKEN(res))) \
[all …]
/Zephyr-Core-2.7.6/subsys/net/lib/sockets/
Dsocketpair.c163 int res; in spair_delete() local
176 res = k_sem_take(&remote->sem, K_FOREVER); in spair_delete()
177 if (res == 0) { in spair_delete()
180 res = k_poll_signal_raise(&remote->readable, in spair_delete()
182 __ASSERT(res == 0, in spair_delete()
184 res); in spair_delete()
191 res = k_poll_signal_raise(&spair->writeable, SPAIR_SIG_CANCEL); in spair_delete()
192 __ASSERT(res == 0, "k_poll_signal_raise() failed: %d", res); in spair_delete()
219 int res; in spair_new() local
249 res = k_poll_signal_raise(&spair->writeable, SPAIR_SIG_DATA); in spair_new()
[all …]
/Zephyr-Core-2.7.6/tests/posix/fs/src/
Dtest_fs_file.c17 int res; in test_file_open() local
19 res = open(TEST_FILE, O_CREAT | O_RDWR); in test_file_open()
21 zassert_true(res >= 0, "Failed opening file: %d, errno=%d\n", res, errno); in test_file_open()
23 file = res; in test_file_open()
31 off_t res; in test_file_write() local
33 res = lseek(file, 0, SEEK_SET); in test_file_write()
34 if (res != 0) { in test_file_write()
35 TC_PRINT("lseek failed [%d]\n", (int)res); in test_file_write()
54 return res; in test_file_write()
60 off_t res; in test_file_read() local
[all …]
Dtest_fs_dir.c19 int res; in test_mkdir() local
24 res = mkdir(TEST_DIR, S_IRWXG); in test_mkdir()
25 if (res) { in test_mkdir()
26 TC_PRINT("Error creating dir[%d]\n", res); in test_mkdir()
27 return res; in test_mkdir()
30 res = open(TEST_DIR_FILE, O_CREAT | O_RDWR); in test_mkdir()
32 if (res < 0) { in test_mkdir()
33 TC_PRINT("Failed opening file [%d]\n", res); in test_mkdir()
34 return res; in test_mkdir()
36 file = res; in test_mkdir()
[all …]
/Zephyr-Core-2.7.6/tests/net/socket/poll/src/
Dmain.c32 int res; in test_poll() local
54 res = bind(s_sock, (struct sockaddr *)&s_addr, sizeof(s_addr)); in test_poll()
55 zassert_equal(res, 0, "bind failed"); in test_poll()
57 res = connect(c_sock, (struct sockaddr *)&s_addr, sizeof(s_addr)); in test_poll()
58 zassert_equal(res, 0, "connect failed"); in test_poll()
68 res = poll(pollfds, ARRAY_SIZE(pollfds), 0); in test_poll()
70 zassert_equal(res, 0, ""); in test_poll()
82 res = poll(pollfds, ARRAY_SIZE(pollfds), 30); in test_poll()
86 zassert_equal(res, 0, ""); in test_poll()
94 res = poll(pollfds, ARRAY_SIZE(pollfds), 30); in test_poll()
[all …]
/Zephyr-Core-2.7.6/tests/net/socket/getaddrinfo/src/
Dmain.c219 struct addrinfo *res = NULL; in test_getaddrinfo_ok() local
229 (void)getaddrinfo(QUERY_HOST, NULL, NULL, &res); in test_getaddrinfo_ok()
241 freeaddrinfo(res); in test_getaddrinfo_ok()
246 struct addrinfo *res = NULL; in test_getaddrinfo_cancelled() local
249 ret = getaddrinfo(QUERY_HOST, NULL, NULL, &res); in test_getaddrinfo_cancelled()
261 freeaddrinfo(res); in test_getaddrinfo_cancelled()
266 struct addrinfo *res = NULL; in test_getaddrinfo_no_host() local
269 ret = getaddrinfo(NULL, NULL, NULL, &res); in test_getaddrinfo_no_host()
273 zassert_is_null(res, "ai_addr is not NULL"); in test_getaddrinfo_no_host()
275 freeaddrinfo(res); in test_getaddrinfo_no_host()
[all …]
/Zephyr-Core-2.7.6/drivers/flash/
Djesd216.c14 struct jesd216_instr *res) in extract_instr() argument
16 bool rv = (res != NULL); in extract_instr()
19 res->instr = packed >> 8; in extract_instr()
20 res->mode_clocks = (packed >> 5) & 0x07; in extract_instr()
21 res->wait_states = packed & 0x1F; in extract_instr()
29 struct jesd216_instr *res) in jesd216_bfp_read_support() argument
53 rv = extract_instr(dw4 >> 0, res); in jesd216_bfp_read_support()
60 rv = extract_instr(dw3 >> 16, res); in jesd216_bfp_read_support()
68 rv = extract_instr(dw17 >> 16, res); in jesd216_bfp_read_support()
76 rv = extract_instr(dw4 >> 16, res); in jesd216_bfp_read_support()
[all …]
/Zephyr-Core-2.7.6/subsys/console/
Dtty.c73 int res; in tty_putchar() local
75 res = k_sem_take(&tty->tx_sem, in tty_putchar()
78 if (res < 0) { in tty_putchar()
79 return res; in tty_putchar()
104 int res = 0; in tty_write() local
118 res = tty_putchar(tty, *p++); in tty_write()
119 if (res < 0) { in tty_write()
122 errno = -res; in tty_write()
123 return res; in tty_write()
145 int res; in tty_getchar() local
[all …]
/Zephyr-Core-2.7.6/samples/net/sockets/http_get/src/
Dhttp_get.c61 struct addrinfo *res; in main() local
74 st = getaddrinfo(HTTP_HOST, HTTP_PORT, &hints, &res); in main()
83 for (; res; res = res->ai_next) { in main()
84 dump_addrinfo(res); in main()
88 dump_addrinfo(res); in main()
91 sock = socket(res->ai_family, res->ai_socktype, IPPROTO_TLS_1_2); in main()
93 sock = socket(res->ai_family, res->ai_socktype, res->ai_protocol); in main()
109 CHECK(connect(sock, res->ai_addr, res->ai_addrlen)); in main()

12345678