Home
last modified time | relevance | path

Searched refs:dst_fd (Results 1 – 2 of 2) sorted by relevance

/system/core/libdiskconfig/
Ddiskutils.c36 int dst_fd = -1; in write_raw_image() local
51 if ((dst_fd = open(dst, O_RDWR)) < 0) { in write_raw_image()
56 if (lseek64(dst_fd, offset, SEEK_SET) != offset) { in write_raw_image()
84 if ((tmp = write(dst_fd, buffer, nr_bytes)) < 0) { in write_raw_image()
102 if (dst_fd >= 0) in write_raw_image()
103 fsync(dst_fd); in write_raw_image()
108 if (dst_fd >= 0) in write_raw_image()
109 close(dst_fd); in write_raw_image()
113 if (dst_fd >= 0) in write_raw_image()
114 close(dst_fd); in write_raw_image()
/system/extras/boot_control_copy/
Dboot_control_copy.c97 static bool copy_data(int src_fd, int dst_fd, size_t num_bytes) in copy_data() argument
119 num_written = write(dst_fd, copy_buf + offset, num_to_write); in copy_data()
137 int src_fd, dst_fd; in module_setActiveBootSlot() local
173 dst_fd = boot_info_open_partition("boot", &dst_size, O_RDWR); in module_setActiveBootSlot()
174 if (dst_fd == -1) { in module_setActiveBootSlot()
186 close(dst_fd); in module_setActiveBootSlot()
190 if (!copy_data(src_fd, dst_fd, src_size)) { in module_setActiveBootSlot()
192 close(dst_fd); in module_setActiveBootSlot()
196 if (fsync(dst_fd) != 0) { in module_setActiveBootSlot()
203 close(dst_fd); in module_setActiveBootSlot()