Home
last modified time | relevance | path

Searched refs:fd (Results 1 – 8 of 8) sorted by relevance

/scripts/basic/
Dfixdep.c272 int fd; in do_config_file() local
275 fd = open(filename, O_RDONLY); in do_config_file()
276 if (fd < 0) { in do_config_file()
281 if (fstat(fd, &st) < 0) { in do_config_file()
287 close(fd); in do_config_file()
293 close(fd); in do_config_file()
296 if (read(fd, map, st.st_size) != st.st_size) { in do_config_file()
298 close(fd); in do_config_file()
302 close(fd); in do_config_file()
400 int fd; in print_deps() local
[all …]
/scripts/
Dinsert-sys-cert.c205 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 …]
Drecordmcount.c109 ulseek(int const fd, off_t const offset, int const whence) in ulseek() argument
130 uread(int const fd, void *const buf, size_t const count) in uread() argument
132 size_t const n = read(fd, buf, count); in uread()
141 uwrite(int const fd, void const *const buf, size_t const count) in uwrite() argument
Dasn1_compiler.c571 int fd; in main() local
598 fd = open(filename, O_RDONLY); in main()
599 if (fd < 0) { in main()
604 if (fstat(fd, &st) < 0) { in main()
614 if ((readlen = read(fd, buffer, st.st_size)) < 0) { in main()
619 if (close(fd) < 0) { in main()
/scripts/dtc/
Dutil.c202 int fd = 0; /* assume stdin */ in utilfdt_read_err_len() local
209 fd = open(filename, O_RDONLY); in utilfdt_read_err_len()
210 if (fd < 0) in utilfdt_read_err_len()
223 ret = read(fd, &buf[offset], bufsize - offset); in utilfdt_read_err_len()
232 close(fd); in utilfdt_read_err_len()
269 int fd = 1; /* assume stdout */ in utilfdt_write_err() local
276 fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0666); in utilfdt_write_err()
277 if (fd < 0) in utilfdt_write_err()
285 ret = write(fd, ptr + offset, totalsize - offset); in utilfdt_write_err()
293 if (fd != 1) in utilfdt_write_err()
[all …]
/scripts/mod/
Dsumversion.c458 int fd; in write_version() local
460 fd = open(filename, O_RDWR); in write_version()
461 if (fd < 0) { in write_version()
467 if (lseek(fd, offset, SEEK_SET) == (off_t)-1) { in write_version()
473 if (write(fd, sum, strlen(sum)+1) != strlen(sum)+1) { in write_version()
479 close(fd); in write_version()
Dmodpost.c349 int fd; in grab_file() local
351 fd = open(filename, O_RDONLY); in grab_file()
352 if (fd < 0) in grab_file()
354 if (fstat(fd, &st)) in grab_file()
358 map = mmap(NULL, *size, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0); in grab_file()
361 close(fd); in grab_file()
/scripts/kconfig/
Dconfdata.c848 int res, i, fd; in conf_split_config() local
919 fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, 0644); in conf_split_config()
920 if (fd == -1) { in conf_split_config()
939 fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, 0644); in conf_split_config()
940 if (fd == -1) { in conf_split_config()
945 close(fd); in conf_split_config()