Lines Matching refs:fd
220 int fd = open(v->key_loc, O_WRONLY | O_CREAT, 0644);
221 if (fd < 0) {
225 wipe_block_device(fd, get_file_size(fd));
226 close(fd);
276 int fd = open(v->blk_device, O_RDWR);
277 uint64_t size = get_file_size(fd);
280 close(fd);
285 lseek(fd, size - 1, SEEK_SET);
286 read(fd, &oem_unlock_enabled, 1);
289 if (wipe_block_device(fd, size)) {
291 close(fd);
295 lseek(fd, size - 1, SEEK_SET);
296 write(fd, &oem_unlock_enabled, 1);
299 close(fd);