Home
last modified time | relevance | path

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

12

/tools/binman/
A Dcbfs_util.py493 fd.write(tools.get_bytes(pad_byte, offset - fd.tell()))
503 upto = fd.tell()
588 fd.write(hdr)
591 fd.write(hdr)
601 fd = io.BytesIO()
700 fd.seek(size - 4)
703 fd.seek(pos)
712 fd.seek(orig_pos)
735 pos = fd.tell()
772 fd.read(size)
[all …]
A Dcbfs_util_test.py259 with io.BytesIO(data) as fd:
261 pos = fd.tell()
349 with io.BytesIO(data) as fd:
351 pos = fd.tell()
357 fd.seek(pos)
370 with io.BytesIO(data) as fd:
372 pos = fd.tell()
379 fd.seek(pos)
413 pos = fd.tell()
438 pos = fd.tell()
[all …]
A Delf.py119 with open(fname, 'rb') as fd:
120 elf = ELFFile(fd)
135 with open(fname, 'rb') as fd:
136 elf = ELFFile(fd)
158 with open(fname, 'rb') as fd:
159 elf = ELFFile(fd)
269 elf = ELFFile(fd)
391 file=fd)
431 ''', file=fd)
457 with io.BytesIO(data) as fd:
[all …]
/tools/
A Dtermios_linux.h42 return ioctl(fd, TCGETS2, t); in tcgetattr()
44 return ioctl(fd, TCGETS, t); in tcgetattr()
79 return ioctl(fd, cmd, t); in tcsetattr()
82 static inline int tcdrain(int fd) in tcdrain() argument
84 return ioctl(fd, TCSBRK, 1); in tcdrain()
89 return ioctl(fd, TCFLSH, q); in tcflush()
95 return ioctl(fd, TCSBRKP, d); in tcsendbreak()
97 return ioctl(fd, TCSBRK, 0); in tcsendbreak()
103 return ioctl(fd, TCXONC, a); in tcflow()
106 static inline pid_t tcgetsid(int fd) in tcgetsid() argument
[all …]
A Dfit_common.c64 int fd; in mmap_fdt() local
67 fd = open(fname, (read_only ? O_RDONLY : O_RDWR) | O_BINARY); in mmap_fdt()
69 if (fd < 0) { in mmap_fdt()
75 if (fstat(fd, sbuf) < 0) { in mmap_fdt()
83 if (ftruncate(fd, sbuf->st_size)) { in mmap_fdt()
93 fd, 0); in mmap_fdt()
119 return fd; in mmap_fdt()
122 if (fd >= 0) in mmap_fdt()
123 close(fd); in mmap_fdt()
A Dprelink-riscv.c83 int fd = open(argv[1], O_RDWR, 0); in main() local
85 if (fd < 0) in main()
90 if (fstat(fd, &st) < 0) in main()
94 mmap(0, st.st_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); in main()
99 close(fd); in main()
A Dfit_image.c32 int fd; in fit_estimate_hash_sig_size() local
38 if (fd < 0) in fit_estimate_hash_sig_size()
81 close(fd); in fit_estimate_hash_sig_size()
197 int fd; in fdt_property_file() local
221 close(fd); in fdt_property_file()
225 close(fd); in fdt_property_file()
503 int fd; in fit_build() local
533 close(fd); in fit_build()
538 close(fd); in fit_build()
560 int fd; in fit_extract_data() local
[all …]
A Dkwboot.c525 FD_SET(fd, &rfds); in kwboot_tty_recv()
572 return tcdrain(fd); in kwboot_tty_send()
802 int rc, fd, flags; in kwboot_open_tty() local
808 if (fd < 0) in kwboot_open_tty()
837 rc = fd; in kwboot_open_tty()
840 if (fd >= 0) in kwboot_open_tty()
841 close(fd); in kwboot_open_tty()
1689 int rc, fd; in kwboot_read_image() local
1698 if (fd < 0) in kwboot_read_image()
1734 if (fd >= 0) in kwboot_read_image()
[all …]
A Drkmux.py114 def process_file(name, fd): argument
137 for line in fd:
181 def process_csv(name, fd): argument
182 reader = csv.reader(fd)
209 with open(fname, 'r') as fd:
210 process_file(name, fd)
217 with open(fname, 'r') as fd:
218 process_csv(name, fd)
A Dimagetool.c156 int fd; in imagetool_get_filesize() local
158 fd = open(fname, O_RDONLY | O_BINARY); in imagetool_get_filesize()
159 if (fd < 0) { in imagetool_get_filesize()
165 if (fstat(fd, &sbuf) < 0) { in imagetool_get_filesize()
168 close(fd); in imagetool_get_filesize()
171 close(fd); in imagetool_get_filesize()
A Dsfspl.c105 int fd, ret = EXIT_SUCCESS; in sfspl_image_extract_subimage() local
114 fd = open(params->outfile, O_WRONLY | O_CREAT | O_TRUNC, 0644); in sfspl_image_extract_subimage()
115 if (fd == -1) { in sfspl_image_extract_subimage()
119 if (write(fd, &buf[hdr_size], file_size) != file_size) { in sfspl_image_extract_subimage()
123 close(fd); in sfspl_image_extract_subimage()
A Dpblimage.c109 FILE *fd = NULL; in pbl_parser() local
115 fd = fopen(name, "r"); in pbl_parser()
116 if (fd == NULL) { in pbl_parser()
121 while ((getline(&line, &len, fd)) > 0) { in pbl_parser()
139 fclose(fd); in pbl_parser()
276 int fd; in pblimage_check_params() local
288 fd = fileno(fp_uboot); in pblimage_check_params()
290 if (fstat(fd, &st) == -1) { in pblimage_check_params()
A Dupdate_octeon_header.c149 int fd; in main() local
275 fd = open(filename, O_RDWR); in main()
276 if (fd < 0) { in main()
343 len = read(fd, buf, BUF_SIZE); in main()
370 lseek(fd, hdr_size, SEEK_SET); in main()
372 while ((len = read(fd, buf, BUF_SIZE)) > 0) { in main()
445 lseek(fd, 0, SEEK_SET); in main()
448 ret = write(fd, &header, hdr_size); in main()
452 close(fd); in main()
A Dimagetool.h259 void pbl_load_uboot(int fd, struct image_tool_params *mparams);
260 int zynqmpbif_copy_image(int fd, struct image_tool_params *mparams);
261 int imx8image_copy_image(int fd, struct image_tool_params *mparams);
262 int imx8mimage_copy_image(int fd, struct image_tool_params *mparams);
263 int rockchip_copy_image(int fd, struct image_tool_params *mparams);
A Dublimage.c131 FILE *fd = NULL; in parse_cfg_file() local
143 fd = fopen(name, "r"); in parse_cfg_file()
144 if (fd == 0) { in parse_cfg_file()
159 while ((getline(&line, &len, fd)) > 0) { in parse_cfg_file()
182 fclose(fd); in parse_cfg_file()
A Dmicrocode-tool57 with open(fname) as fd:
58 for line in fd:
96 with open(fname) as fd:
99 for line in fd:
241 with open(outfile, 'w') as fd:
242 print(out % tuple(args), file=fd)
A Dmicrocode-tool.py57 with open(fname) as fd:
58 for line in fd:
96 with open(fname) as fd:
99 for line in fd:
241 with open(outfile, 'w') as fd:
242 print(out % tuple(args), file=fd)
A Dimx8mimage.c169 FILE *fd = NULL; in parse_cfg_file() local
177 fd = fopen(name, "r"); in parse_cfg_file()
178 if (fd == 0) { in parse_cfg_file()
187 while ((getline(&line, &len, fd)) > 0) { in parse_cfg_file()
210 fclose(fd); in parse_cfg_file()
319 static int generate_ivt_for_fit(int fd, int fit_offset, uint32_t ep, in generate_ivt_for_fit() argument
328 ret = lseek(fd, fit_offset, SEEK_SET); in generate_ivt_for_fit()
334 if (read(fd, (char *)&image_header, sizeof(struct legacy_img_hdr)) != in generate_ivt_for_fit()
350 ret = lseek(fd, fit_offset + fit_size, SEEK_SET); in generate_ivt_for_fit()
369 if (write(fd, &ivt_header, sizeof(flash_header_v2_t)) != in generate_ivt_for_fit()
A Dmips-relocs.c209 int err, fd; in main() local
213 fd = open(argv[1], O_RDWR); in main()
214 if (fd == -1) { in main()
220 err = fstat(fd, &st); in main()
226 elf = mmap(NULL, st.st_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); in main()
417 close(fd); in main()
/tools/gdb/
A Dserial.c66 int fd; in serialopen() local
71 if ((fd = open(device, O_RDWR)) < 0) in serialopen()
75 (void)close(fd); in serialopen()
79 return fd; in serialopen()
83 serialreadchar(int fd, int timeout) in serialreadchar() argument
94 FD_SET(fd, &fds); in serialreadchar()
104 if ((n = read(fd, &ch, 1)) < 0) in serialreadchar()
114 serialwrite(int fd, char *buf, int len) in serialwrite() argument
119 n = write(fd, buf, len); in serialwrite()
129 serialclose(int fd) in serialclose() argument
[all …]
/tools/env/
A Dfw_env.c293 ret = read(fd, buf, count); in ubi_read()
336 ret = write(fd, buf, count); in ubi_write()
1110 ioctl(fd, MEMUNLOCK, &erase); in flash_write_buf()
1140 ioctl(fd, MEMLOCK, &erase); in flash_write_buf()
1167 rc = lseek(fd, offset, SEEK_SET); in flash_flag_obsolete()
1178 ioctl(fd, MEMUNLOCK, &erase); in flash_flag_obsolete()
1181 ioctl(fd, MEMLOCK, &erase); in flash_flag_obsolete()
1613 int fd, rc = 0; in check_device_config() local
1619 if (fd < 0) { in check_device_config()
1625 rc = fstat(fd, &st); in check_device_config()
[all …]
/tools/patman/
A Dsettings.py172 fd = open(fname, 'r', encoding='utf-8')
178 for line in fd.readlines():
195 fd.close()
333 with open(fname, encoding='utf-8') as fd:
335 for line in fd:
358 with open(fname) as fd:
359 for line in fd:
/tools/buildman/
A Dbsettings.py71 with open(config_fname, 'w') as fd:
72 settings.write(fd)
/tools/u_boot_pylib/
A Dtools.py483 with open(filename(fname), binary and 'rb' or 'r') as fd:
484 data = fd.read()
498 with open(filename(fname), binary and 'wb' or 'w') as fd:
499 fd.write(data)
584 fd = open(fname, 'wb')
599 fd.write(buffer)
607 fd.close()
A Dcros_subprocess.py385 for fd in (1, 2):
386 both_cmds += cmd % (fd, fd, fd, fd, fd)

Completed in 39 milliseconds

12