Searched refs:fd (Results 1 – 8 of 8) sorted by relevance
/scripts/ |
D | insert-sys-cert.c | 205 int fd; in map_file() local 207 fd = open(file_name, O_RDWR); in map_file() 208 if (fd < 0) { in map_file() 212 if (fstat(fd, &st)) { in map_file() 214 close(fd); in map_file() 218 map = mmap(NULL, *size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); in map_file() 221 close(fd); in map_file() 224 close(fd); in map_file() 232 int fd; in read_file() local 234 fd = open(file_name, O_RDONLY); in read_file() [all …]
|
D | sorttable.c | 73 int fd; in mmap_file() local 77 fd = open(fname, O_RDWR); in mmap_file() 78 if (fd < 0) { in mmap_file() 82 if (fstat(fd, &sb) < 0) { in mmap_file() 91 addr = mmap(0, sb.st_size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); in mmap_file() 100 close(fd); in mmap_file()
|
D | spdxcheck.py | 167 def parse_lines(self, fd, maxlines, fname): argument 171 for line in fd: 216 with open(el.path, 'rb') as fd: 217 parser.parse_lines(fd, args.maxlines, el.path)
|
D | asn1_compiler.c | 567 int fd; in main() local 594 fd = open(filename, O_RDONLY); in main() 595 if (fd < 0) { in main() 600 if (fstat(fd, &st) < 0) { in main() 610 if ((readlen = read(fd, buffer, st.st_size)) < 0) { in main() 615 if (close(fd) < 0) { in main()
|
/scripts/dtc/ |
D | util.c | 237 int fd = 0; /* assume stdin */ in utilfdt_read_err() local 244 fd = open(filename, O_RDONLY); in utilfdt_read_err() 245 if (fd < 0) in utilfdt_read_err() 258 ret = read(fd, &buf[offset], bufsize - offset); in utilfdt_read_err() 267 close(fd); in utilfdt_read_err() 293 int fd = 1; /* assume stdout */ in utilfdt_write_err() local 300 fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0666); in utilfdt_write_err() 301 if (fd < 0) in utilfdt_write_err() 309 ret = write(fd, ptr + offset, totalsize - offset); in utilfdt_write_err() 317 if (fd != 1) in utilfdt_write_err() [all …]
|
/scripts/basic/ |
D | fixdep.c | 264 int fd; in read_file() local 267 fd = open(filename, O_RDONLY); in read_file() 268 if (fd < 0) { in read_file() 273 if (fstat(fd, &st) < 0) { in read_file() 283 if (read(fd, buf, st.st_size) != st.st_size) { in read_file() 288 close(fd); in read_file()
|
/scripts/kconfig/ |
D | confdata.c | 131 int fd, ret; in conf_touch_dep() local 147 fd = open(depfile_path, O_WRONLY | O_CREAT | O_TRUNC, 0644); in conf_touch_dep() 148 if (fd == -1) { in conf_touch_dep() 157 fd = open(depfile_path, O_WRONLY | O_CREAT | O_TRUNC, 0644); in conf_touch_dep() 158 if (fd == -1) in conf_touch_dep() 161 close(fd); in conf_touch_dep()
|
/scripts/mod/ |
D | modpost.c | 100 int fd; in read_text_file() local 103 fd = open(filename, O_RDONLY); in read_text_file() 104 if (fd < 0) { in read_text_file() 109 if (fstat(fd, &st) < 0) { in read_text_file() 121 bytes_read = read(fd, buf, nbytes); in read_text_file() 131 close(fd); in read_text_file() 455 int fd; in grab_file() local 457 fd = open(filename, O_RDONLY); in grab_file() 458 if (fd < 0) in grab_file() 460 if (fstat(fd, &st)) in grab_file() [all …]
|