Home
last modified time | relevance | path

Searched refs:fd2 (Results 1 – 12 of 12) sorted by relevance

/systemd-251/src/test/
Dtest-bpf-devices.c40 _cleanup_close_ int fd, fd2; in test_policy_closed() local
47 fd2 = open(s, O_CLOEXEC|O_WRONLY|O_NOCTTY); in test_policy_closed()
48 log_debug("open(%s, \"w\") = %d/%s", s, fd2, fd2 < 0 ? errno_to_name(errno) : "-"); in test_policy_closed()
49 wrong += fd2 < 0 && errno == EPERM; in test_policy_closed()
77 _cleanup_close_ int fd, fd2; in test_policy_strict() local
84 fd2 = open(s, O_CLOEXEC|O_WRONLY|O_NOCTTY); in test_policy_strict()
85 log_debug("open(%s, \"w\") = %d/%s", s, fd2, fd2 < 0 ? errno_to_name(errno) : "-"); in test_policy_strict()
86 wrong += fd2 < 0; in test_policy_strict()
90 _cleanup_close_ int fd, fd2; in test_policy_strict() local
97 fd2 = open(s, O_CLOEXEC|O_WRONLY|O_NOCTTY); in test_policy_strict()
[all …]
Dtest-data-fd-util.c62 static void assert_equal_fd(int fd1, int fd2) { in assert_equal_fd() argument
70 y = read(fd2, b, sizeof(b)); in assert_equal_fd()
83 _cleanup_close_ int fd1 = -1, fd2 = -1; in TEST() local
91 fd2 = copy_data_fd(fd1); in TEST()
92 assert_se(fd2 >= 0); in TEST()
95 assert_equal_fd(fd1, fd2); in TEST()
99 fd2 = safe_close(fd2); in TEST()
104 fd2 = copy_data_fd(fd1); in TEST()
105 assert_se(fd2 >= 0); in TEST()
111 assert_equal_fd(fd1, fd2); in TEST()
[all …]
Dtest-fd-util.c396 _cleanup_close_ int fd1 = -1, fd2 = -1; in TEST() local
412 fd2 = fd_reopen(fd1, O_RDONLY|O_DIRECTORY|O_CLOEXEC); /* drop the O_PATH */ in TEST()
413 assert_se(fd2 >= 0); in TEST()
415 assert_se(fstat(fd2, &st2) >= 0); in TEST()
420 fl = fcntl(fd2, F_GETFL); in TEST()
427 fd1 = fd_reopen(fd2, O_DIRECTORY|O_PATH|O_CLOEXEC); /* reacquire the O_PATH */ in TEST()
455 fd2 = fd_reopen(fd1, O_RDONLY|O_CLOEXEC); /* drop the O_PATH */ in TEST()
456 assert_se(fd2 >= 0); in TEST()
458 assert_se(fstat(fd2, &st2) >= 0); in TEST()
463 fl = fcntl(fd2, F_GETFL); in TEST()
[all …]
Dtest-tmpfiles.c22 _cleanup_close_ int fd = -1, fd2 = -1; in TEST() local
37 fd2 = mkostemp_safe(pattern); in TEST()
38 assert_se(fd2 >= 0); in TEST()
41 assert_se(asprintf(&cmd2, "ls -l /proc/"PID_FMT"/fd/%d", getpid_cached(), fd2) > 0); in TEST()
Dtest-copy.c229 _cleanup_close_ int fd = -1, fd2 = -1, fd3 = -1; in test_copy_bytes_regular_file_one() local
238 fd2 = mkostemp_safe(fn2); in test_copy_bytes_regular_file_one()
239 assert_se(fd2 >= 0); in test_copy_bytes_regular_file_one()
244 r = copy_bytes(fd, fd2, max_bytes, try_reflink ? COPY_REFLINK : 0); in test_copy_bytes_regular_file_one()
251 assert_se(fstat(fd2, &buf2) == 0); in test_copy_bytes_regular_file_one()
256 assert_se(ftruncate(fd2, max_bytes + 1) == 0); in test_copy_bytes_regular_file_one()
258 assert_se(lseek(fd2, 0, SEEK_SET) == 0); in test_copy_bytes_regular_file_one()
260 r = copy_bytes(fd2, fd3, max_bytes, try_reflink ? COPY_REFLINK : 0); in test_copy_bytes_regular_file_one()
Dtest-socket-util.c491 _cleanup_close_ int fd1 = -1, fd2 = -1, fd3 = -1; in TEST() local
513 fd2 = socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0); in TEST()
514 assert_se(fd2 >= 0); in TEST()
515 assert_se(connect(fd2, &sa.sa, SOCKADDR_LEN(sa)) < 0); in TEST()
525 assert_se(connect(fd2, &sa.sa, SOCKADDR_LEN(sa)) >= 0); in TEST()
/systemd-251/src/journal-remote/
Djournal-remote.c486 _cleanup_close_ int fd2 = -1; in accept_connection() local
490 fd2 = accept4(fd, &addr->sockaddr.sa, &addr->size, SOCK_NONBLOCK|SOCK_CLOEXEC); in accept_connection()
491 if (fd2 < 0) { in accept_connection()
518 return TAKE_FD(fd2); in accept_connection()
535 int fd2; in dispatch_raw_connection_event() local
542 fd2 = accept_connection("raw", fd, &addr, &hostname); in dispatch_raw_connection_event()
543 if (fd2 == -EAGAIN) in dispatch_raw_connection_event()
545 if (fd2 < 0) in dispatch_raw_connection_event()
546 return fd2; in dispatch_raw_connection_event()
548 return journal_remote_add_source(s, fd2, hostname, true); in dispatch_raw_connection_event()
/systemd-251/src/login/
Dtest-inhibit.c71 int fd1, fd2; in main() local
83 fd2 = inhibit(bus, "idle:shutdown"); in main()
84 assert_se(fd2 >= 0); in main()
91 safe_close(fd2); in main()
/systemd-251/src/basic/
Dterminal-util.c564 _cleanup_close_ int fd2 = open_terminal(name, O_RDWR|O_NOCTTY|O_CLOEXEC); in vt_disallocate() local
565 if (fd2 < 0) in vt_disallocate()
566 return fd2; in vt_disallocate()
568 (void) loop_write(fd2, in vt_disallocate()
/systemd-251/src/libsystemd/sd-device/
Dsd-device.c2310 _cleanup_close_ int fd = -1, fd2 = -1; in sd_device_open() local
2362 fd2 = open(FORMAT_PROC_FD_PATH(fd), flags); in sd_device_open()
2363 if (fd2 < 0) in sd_device_open()
2367 return TAKE_FD(fd2); in sd_device_open()
2369 r = fd_get_diskseq(fd2, &q); in sd_device_open()
2376 return TAKE_FD(fd2); in sd_device_open()
/systemd-251/hwdb.d/
Dpci.ids710 1028 1fd2 HBA330 MX
7775 2fd2 PCI-7350
11389 0fd2 GK107M [GeForce GT 640M]
31511 2fd2 Xeon E7 v3/Xeon E5 v3/Core i7 Integrated Memory Controller 1 Channel 0 ERROR Registers
32851 6fd2 Xeon E7 v4/Xeon E5 v4/Xeon E3 v4/Xeon D Memory Controller 1 - Channel 0 Error
Dusb.ids15557 0fd2 Seac Banche