Home | History | Annotate | Download | only in misc

Lines Matching refs:hdr

205 static void write_header(int fd, void *hdr, int hdr_size, int wrt_size)
225 if (hdr)
226 memcpy(header_buf, hdr, hdr_size);
235 struct ext2_image_hdr hdr;
240 memset(&hdr, 0, sizeof(struct ext2_image_hdr));
242 hdr.offset_super = seek_relative(fd, 0);
250 hdr.offset_inode = seek_relative(fd, 0);
259 hdr.offset_blockmap = seek_relative(fd, 0);
267 hdr.offset_inodemap = seek_relative(fd, 0);
275 hdr.magic_number = EXT2_ET_MAGIC_E2IMAGE;
276 strcpy(hdr.magic_descriptor, "Ext2 Image 1.0");
277 gethostname(hdr.fs_hostname, sizeof(hdr.fs_hostname));
278 strncpy(hdr.fs_device_name, device_name, sizeof(hdr.fs_device_name)-1);
279 hdr.fs_device_name[sizeof(hdr.fs_device_name) - 1] = 0;
280 hdr.fs_blocksize = fs->blocksize;
283 hdr.fs_device = st.st_rdev;
286 hdr.image_device = st.st_dev;
287 hdr.image_inode = st.st_ino;
289 memcpy(hdr.fs_uuid, fs->super->s_uuid, sizeof(hdr.fs_uuid));
291 hdr.image_time = time(0);
292 write_header(fd, &hdr, sizeof(struct ext2_image_hdr), fs->blocksize);
936 image->hdr = header;
949 if (img->hdr)
950 ext2fs_free_mem(&img->hdr);
1160 write_header(fd, img->hdr, sizeof(struct ext2_qcow2_hdr), header_size);