Lines Matching defs:image_hdr

249 static struct image_hdr {
258 le32 offset_to_image_data; /* From start of image_hdr. */
259 } __attribute__((__packed__)) image_hdr;
264 (offsetof(struct image_hdr, offset_to_image_data))
762 s32 csize = le32_to_cpu(image_hdr.cluster_size);
929 int alignsize = le32_to_cpu(image_hdr.offset_to_image_data)
930 - sizeof(image_hdr);
933 || write_all(&fd_out, &image_hdr, sizeof(image_hdr))
963 int alignsize = le32_to_cpu(image_hdr.offset_to_image_data)
964 - sizeof(image_hdr);
967 || write_all(&fd_out, &image_hdr, sizeof(image_hdr))
1022 s32 csize = le32_to_cpu(image_hdr.cluster_size);
1030 (u64)sle64_to_cpu(image_hdr.nr_clusters) + 1 :
1031 le64_to_cpu(image_hdr.inuse) + 1,
1038 while (pos <= sle64_to_cpu(image_hdr.nr_clusters)) {
1040 if (pos == sle64_to_cpu(image_hdr.nr_clusters)) {
1077 > sle64_to_cpu(image_hdr.nr_clusters)))
2134 image_hdr.major_ver, image_hdr.minor_ver);
2136 (unsigned)le32_to_cpu(image_hdr.cluster_size));
2138 sle64_to_cpu(image_hdr.nr_clusters) *
2139 le32_to_cpu(image_hdr.cluster_size));
2141 (long long)le64_to_cpu(image_hdr.device_size));
2142 print_disk_usage(" ", le32_to_cpu(image_hdr.cluster_size),
2143 sle64_to_cpu(image_hdr.nr_clusters),
2144 le64_to_cpu(image_hdr.inuse));
2146 (unsigned)le32_to_cpu(image_hdr.offset_to_image_data),
2147 (unsigned)le32_to_cpu(image_hdr.offset_to_image_data));
2392 if (read_all(&fd_in, &image_hdr, NTFSCLONE_IMG_HEADER_SIZE_OLD) == -1)
2394 if (memcmp(image_hdr.magic, IMAGE_MAGIC, IMAGE_MAGIC_SIZE) != 0)
2396 if (image_hdr.major_ver < NTFSCLONE_IMG_VER_MAJOR_ENDIANNESS_SAFE) {
2397 image_hdr.major_ver = NTFSCLONE_IMG_VER_MAJOR;
2398 image_hdr.minor_ver = NTFSCLONE_IMG_VER_MINOR;
2409 image_hdr.cluster_size = cpu_to_le32(image_hdr.cluster_size);
2410 image_hdr.device_size = cpu_to_sle64(image_hdr.device_size);
2411 image_hdr.nr_clusters = cpu_to_sle64(image_hdr.nr_clusters);
2412 image_hdr.inuse = cpu_to_sle64(image_hdr.inuse);
2414 image_hdr.offset_to_image_data =
2415 const_cpu_to_le32((sizeof(image_hdr)
2423 if (image_hdr.major_ver > NTFSCLONE_IMG_VER_MAJOR)
2427 image_hdr.major_ver,
2428 image_hdr.minor_ver);
2434 image_hdr.offset_to_image_data = offset_to_image_data;
2443 sizeof(image_hdr.offset_to_image_data));
2455 return le64_to_cpu(image_hdr.device_size);
2481 memcpy(image_hdr.magic, IMAGE_MAGIC, IMAGE_MAGIC_SIZE);
2482 image_hdr.major_ver = NTFSCLONE_IMG_VER_MAJOR;
2483 image_hdr.minor_ver = NTFSCLONE_IMG_VER_MINOR;
2484 image_hdr.cluster_size = cpu_to_le32(vol->cluster_size);
2485 image_hdr.device_size = cpu_to_le64(device_size);
2486 image_hdr.nr_clusters = cpu_to_sle64(vol->nr_clusters);
2487 image_hdr.inuse = cpu_to_le64(inuse);
2488 image_hdr.offset_to_image_data = cpu_to_le32((sizeof(image_hdr)
2596 if (offsetof(struct image_hdr, offset_to_image_data)
2612 ntfs_size = sle64_to_cpu(image_hdr.nr_clusters) *
2613 le32_to_cpu(image_hdr.cluster_size);