Home
last modified time | relevance | path

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

/scripts/basic/
Dfixdep.c268 int fd; in do_config_file() local
271 fd = open(filename, O_RDONLY); in do_config_file()
272 if (fd < 0) { in do_config_file()
277 fstat(fd, &st); in do_config_file()
279 close(fd); in do_config_file()
282 map = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0); in do_config_file()
285 close(fd); in do_config_file()
293 close(fd); in do_config_file()
384 int fd; in print_deps() local
387 fd = open(depfile, O_RDONLY); in print_deps()
[all …]
/scripts/dtc/
Dutil.c232 int fd = 0; /* assume stdin */ in utilfdt_read_err_len() local
239 fd = open(filename, O_RDONLY); in utilfdt_read_err_len()
240 if (fd < 0) in utilfdt_read_err_len()
253 ret = read(fd, &buf[offset], bufsize - offset); in utilfdt_read_err_len()
262 close(fd); in utilfdt_read_err_len()
299 int fd = 1; /* assume stdout */ in utilfdt_write_err() local
306 fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0666); in utilfdt_write_err()
307 if (fd < 0) in utilfdt_write_err()
315 ret = write(fd, ptr + offset, totalsize - offset); in utilfdt_write_err()
323 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/
Drecordmcount.c113 ulseek(int const fd, off_t const offset, int const whence) in ulseek() argument
134 uread(int const fd, void *const buf, size_t const count) in uread() argument
136 size_t const n = read(fd, buf, count); in uread()
145 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/kconfig/
Dconfdata.c846 int res, i, fd; in conf_split_config() local
917 fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, 0644); in conf_split_config()
918 if (fd == -1) { in conf_split_config()
937 fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, 0644); in conf_split_config()
938 if (fd == -1) { in conf_split_config()
943 close(fd); in conf_split_config()