/third_party/ltp/testcases/kernel/syscalls/fcntl/ |
D | fcntl17.c | 71 int file_fd; variable 131 if ((file_fd = mkstemp(template)) < 0) { in setup() 135 if (write(file_fd, buf, STRINGSIZE) < 0) { in setup() 172 close(file_fd); in cleanup() 190 if (fcntl(file_fd, F_SETLK, &lock1) < 0) { in do_child1() 201 fcntl(file_fd, F_SETLK, &unlock); in do_child1() 222 if (fcntl(file_fd, F_SETLK, &lock2) < 0) { in do_child2() 233 if (fcntl(file_fd, F_SETLKW, &lock4) < 0) { in do_child2() 260 if (fcntl(file_fd, F_SETLK, &lock3) < 0) { in do_child3() 271 if (fcntl(file_fd, F_SETLKW, &lock5) < 0) { in do_child3() [all …]
|
D | fcntl07.c | 69 static int file_fd, pipe_fds[2], fifo_fd; variable 77 {&file_fd, "regular file"}, 170 file_fd = SAFE_OPEN(cleanup, "test_file", O_CREAT | O_RDWR, 0666); in setup() 178 if (file_fd > 0 && close(file_fd)) in cleanup()
|
/third_party/ltp/testcases/kernel/syscalls/open_by_handle_at/ |
D | open_by_handle_at01.c | 24 static int dir_fd, fd_atcwd = AT_FDCWD, file_fd; variable 36 {&file_fd, &f_fhp, O_RDWR}, 37 {&file_fd, &f_fhp, O_RDONLY}, 38 {&file_fd, &f_fhp, O_WRONLY}, 47 SAFE_CLOSE(file_fd); in cleanup() 58 file_fd = SAFE_OPEN("foo_file", O_RDWR | O_CREAT); in setup() 64 TEST(name_to_handle_at(file_fd, "", f_fhp, &mount_id, AT_EMPTY_PATH)); in setup()
|
/third_party/ltp/testcases/kernel/syscalls/statx/ |
D | statx02.c | 37 static int file_fd; variable 43 TEST(statx(file_fd, "", AT_EMPTY_PATH, 0, &buf)); in test_empty_path() 109 file_fd = SAFE_OPEN(TESTFILE, O_RDWR | O_CREAT, MODE); in setup() 110 SAFE_WRITE(0, file_fd, data_buf, sizeof(data_buf)); in setup() 117 if (file_fd > 0) in cleanup() 118 SAFE_CLOSE(file_fd); in cleanup()
|
D | statx01.c | 49 static int file_fd = -1; variable 87 snprintf(line, PATH_MAX, "/proc/%d/fdinfo/%d", pid, file_fd); in test_mnt_id() 200 file_fd = SAFE_OPEN(TESTFILE, O_RDWR|O_CREAT, MODE); in setup() 201 SAFE_WRITE(1, file_fd, data_buff, sizeof(data_buff)); in setup() 208 if (file_fd > -1) in cleanup() 209 SAFE_CLOSE(file_fd); in cleanup()
|
D | statx03.c | 91 int file_fd; in setup() local 93 file_fd = SAFE_OPEN(TESTFILE, O_RDWR | O_CREAT, MODE); in setup() 94 SAFE_CLOSE(file_fd); in setup()
|
/third_party/ltp/testcases/kernel/syscalls/ioctl/ |
D | ioctl_loop02.c | 26 static int file_fd, file_change_fd, file_fd_invalid; variable 52 file_fd = SAFE_OPEN("test.img", tc->mode); in verify_ioctl_loop() 55 SAFE_IOCTL(dev_fd, LOOP_SET_FD, file_fd); in verify_ioctl_loop() 57 loopconfig.fd = file_fd; in verify_ioctl_loop() 99 SAFE_CLOSE(file_fd); in verify_ioctl_loop() 143 if (file_fd > 0) in cleanup() 144 SAFE_CLOSE(file_fd); in cleanup()
|
D | ioctl_loop03.c | 19 static int dev_num, dev_fd, file_fd, attach_flag; variable 23 TEST(ioctl(dev_fd, LOOP_CHANGE_FD, file_fd)); in verify_ioctl_loop() 48 file_fd = SAFE_OPEN("test.img", O_RDWR); in setup() 59 if (file_fd > 0) in cleanup() 60 SAFE_CLOSE(file_fd); in cleanup()
|
D | ioctl_loop04.c | 24 static int dev_num, dev_fd, file_fd, attach_flag; variable 36 file_fd = SAFE_OPEN("test.img", O_RDWR); in verify_ioctl_loop() 58 SAFE_CLOSE(file_fd); in verify_ioctl_loop() 80 if (file_fd > 0) in cleanup() 81 SAFE_CLOSE(file_fd); in cleanup()
|
D | ioctl_loop06.c | 18 static int dev_num, dev_fd, file_fd, attach_flag, loop_configure_sup = 1; variable 111 file_fd = SAFE_OPEN("test.img", O_RDWR); in setup() 119 loopconfig.fd = file_fd; in setup() 126 if (file_fd > 0) in cleanup() 127 SAFE_CLOSE(file_fd); in cleanup()
|
D | ioctl_loop07.c | 25 static int dev_num, dev_fd, file_fd, attach_flag, loop_configure_sup = 1; variable 126 file_fd = SAFE_OPEN("test.img", O_RDWR); in setup() 137 loopconfig.fd = file_fd; in setup() 144 if (file_fd > 0) in cleanup() 145 SAFE_CLOSE(file_fd); in cleanup()
|
/third_party/ltp/testcases/kernel/syscalls/fstatfs/ |
D | fstatfs01.c | 56 static int file_fd; variable 63 {&file_fd, "fstatfs() on a file"}, 107 file_fd = SAFE_OPEN(cleanup, "test_file", O_RDWR | O_CREAT, 0700); in setup() 116 if (file_fd > 0 && close(file_fd)) in cleanup()
|
/third_party/ltp/testcases/kernel/syscalls/readlinkat/ |
D | readlinkat02.c | 44 static int file_fd, dir_fd; variable 54 {&file_fd, SYMLINK_FILE, BUFF_SIZE, ENOTDIR}, 92 file_fd = SAFE_OPEN(cleanup, TEST_FILE, O_RDWR | O_CREAT, 0644); in setup() 119 close(file_fd); in cleanup()
|
/third_party/ltp/testcases/kernel/syscalls/name_to_handle_at/ |
D | name_to_handle_at01.c | 24 static int dir_fd, fd_atcwd = AT_FDCWD, file_fd; variable 46 {&file_fd, "", AT_EMPTY_PATH, O_RDONLY}, 66 SAFE_CLOSE(file_fd); in cleanup() 75 file_fd = SAFE_OPEN("foo_file", O_RDWR | O_CREAT); in setup()
|
/third_party/ltp/testcases/kernel/syscalls/readdir/ |
D | readdir21.c | 28 static unsigned int del_dir_fd, file_fd; variable 41 {&file_fd, &dirp, sizeof(struct old_linux_dirent), ENOTDIR, "not a directory"}, 55 file_fd = SAFE_OPEN(TEST_FILE, O_RDWR | O_CREAT, 0777); in setup()
|
/third_party/ltp/lib/ |
D | tst_device.c | 146 int dev_fd, file_fd; in tst_attach_device() local 155 file_fd = open(file, O_RDWR); in tst_attach_device() 156 if (file_fd < 0) { in tst_attach_device() 162 if (ioctl(dev_fd, LOOP_SET_FD, file_fd) < 0) { in tst_attach_device() 164 close(file_fd); in tst_attach_device() 179 close(file_fd); in tst_attach_device() 186 close(file_fd); in tst_attach_device()
|
/third_party/gstreamer/gstreamer/gst/ |
D | gstregistrybinary.c | 260 int file_fd; in gst_registry_binary_cache_finish() local 262 file_fd = fileno (cache->cache_file); in gst_registry_binary_cache_finish() 271 fsync_ret = fsync (file_fd); in gst_registry_binary_cache_finish()
|