Home
last modified time | relevance | path

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

/external/ltp/testcases/kernel/syscalls/fcntl/
Dfcntl17.c71 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 …]
Dfcntl07.c69 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()
/external/ltp/testcases/kernel/syscalls/statx/
Dstatx02.c37 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()
Dstatx01.c149 int file_fd; in setup() local
153 file_fd = SAFE_OPEN(TESTFILE, O_RDWR|O_CREAT, MODE); in setup()
154 SAFE_WRITE(1, file_fd, data_buff, sizeof(data_buff)); in setup()
155 SAFE_CLOSE(file_fd); in setup()
Dstatx03.c101 int file_fd; in setup() local
103 file_fd = SAFE_OPEN(TESTFILE, O_RDWR | O_CREAT, MODE); in setup()
104 SAFE_CLOSE(file_fd); in setup()
/external/ltp/testcases/kernel/syscalls/fstatfs/
Dfstatfs01.c56 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()
/external/ltp/testcases/kernel/syscalls/readdir/
Dreaddir21.c54 static unsigned int del_dir_fd, file_fd; variable
68 {&file_fd, &dirp, sizeof(struct old_linux_dirent), ENOTDIR},
109 file_fd = SAFE_OPEN(cleanup, TEST_FILE, O_RDWR | O_CREAT, 0777); in setup()
146 if (file_fd > 0) in cleanup()
147 close(file_fd); in cleanup()
/external/ltp/testcases/kernel/syscalls/readlinkat/
Dreadlinkat02.c44 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()
/external/ltp/lib/
Dtst_device.c145 int dev_fd, file_fd; in tst_attach_device() local
161 file_fd = open(file, O_RDWR); in tst_attach_device()
162 if (file_fd < 0) { in tst_attach_device()
168 if (ioctl(dev_fd, LOOP_SET_FD, file_fd) < 0) { in tst_attach_device()
170 close(file_fd); in tst_attach_device()
185 close(file_fd); in tst_attach_device()
192 close(file_fd); in tst_attach_device()
/external/elfutils/src/
Delfclassify.c49 static int file_fd = -1; variable
86 file_fd = open (current_path, O_RDONLY | (flag_only_regular_files in open_file()
88 if (file_fd < 0) in open_file()
96 if (fstat (file_fd, &st) != 0) in open_file()
113 if (file_fd >= 0) in close_file()
115 close (file_fd); in close_file()
116 file_fd = -1; in close_file()
137 elf = dwelf_elf_begin (file_fd); in open_elf()
139 elf = elf_begin (file_fd, ELF_C_READ, NULL); in open_elf()
810 else if (file_fd == -1) in process_current_path()
/external/squashfs-tools/squashfs-tools/
Dunsquashfs.c880 int write_block(int file_fd, char *buffer, int size, long long hole, int sparse) in write_block() argument
886 int error = lseek(file_fd, off, SEEK_CUR); in write_block()
905 if(write_bytes(file_fd, zero_data, avail_bytes) in write_block()
912 if(write_bytes(file_fd, buffer, size) == -1) in write_block()
962 void queue_file(char *pathname, int file_fd, struct inode *inode) in queue_file() argument
968 file->fd = file_fd; in queue_file()
1001 unsigned int file_fd, i; in write_file() local
1008 file_fd = open_wait(pathname, O_CREAT | O_WRONLY | in write_file()
1010 if(file_fd == -1) { in write_file()
1027 queue_file(pathname, file_fd, inode); in write_file()
[all …]
/external/toolchain-utils/cros_utils/
Dlogger.py123 def LogMsg(self, file_fd, term_fd, msg, flush=True): argument
124 if file_fd:
125 self._WriteTo(file_fd, msg, flush)