]> wimlib.net Git - wimlib/commitdiff
Replace WIM_GID_LEN => WIM_GUID_LEN
authorEric Biggers <ebiggers3@gmail.com>
Tue, 13 May 2014 05:44:46 +0000 (00:44 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Tue, 13 May 2014 05:44:46 +0000 (00:44 -0500)
include/wimlib/header.h
include/wimlib/wimboot.h
src/extract.c
src/header.c
src/join.c
src/lookup_table.c
src/wim.c
src/wimboot.c

index 2bbb8388d7e8d928670605198cb8acab20354550..62d916f0656375e6d9b7bc46f1faead8e8ebb433 100644 (file)
@@ -6,7 +6,7 @@
 #include "wimlib/endianness.h"
 
 /* Length of "Globally Unique ID" field in WIM header.  */
 #include "wimlib/endianness.h"
 
 /* Length of "Globally Unique ID" field in WIM header.  */
-#define WIM_GID_LEN    16
+#define WIM_GUID_LEN    16
 
 /* Length of the WIM header on disk.  wimlib currently requires that the header
  * be exactly this size.  */
 
 /* Length of the WIM header on disk.  wimlib currently requires that the header
  * be exactly this size.  */
@@ -73,7 +73,7 @@ struct wim_header_disk {
 
        /* +0x18: Globally unique identifier for the WIM file.  Basically a
         * bunch of random bytes.  */
 
        /* +0x18: Globally unique identifier for the WIM file.  Basically a
         * bunch of random bytes.  */
-       u8 guid[WIM_GID_LEN];
+       u8 guid[WIM_GUID_LEN];
 
        /* +0x28: Number of this WIM part in the split WIM file, indexed from 1,
         * or 1 if the WIM is not split.  */
 
        /* +0x28: Number of this WIM part in the split WIM file, indexed from 1,
         * or 1 if the WIM is not split.  */
@@ -123,7 +123,7 @@ struct wim_header {
        u32 wim_version;
        u32 flags;
        u32 chunk_size;
        u32 wim_version;
        u32 flags;
        u32 chunk_size;
-       u8 guid[WIM_GID_LEN];
+       u8 guid[WIM_GUID_LEN];
        u16 part_number;
        u16 total_parts;
        u32 image_count;
        u16 part_number;
        u16 total_parts;
        u32 image_count;
index fd178c61707c379eb1aaac06fba2324fa8df837c..afb6e65e552fd0a4b68ead8ad47f88a167983fb2 100644 (file)
@@ -9,7 +9,7 @@ struct wim_lookup_table_entry;
 
 extern int
 wimboot_alloc_data_source_id(const wchar_t *wim_path,
 
 extern int
 wimboot_alloc_data_source_id(const wchar_t *wim_path,
-                            const u8 guid[WIM_GID_LEN], int image,
+                            const u8 guid[WIM_GUID_LEN], int image,
                             const wchar_t *target, u64 *data_source_id_ret,
                             bool *wof_running_ret);
 
                             const wchar_t *target, u64 *data_source_id_ret,
                             bool *wof_running_ret);
 
index a4029ec23f39c718497e57d992d6de752917a63f..422cd9ccaf4a6ea8298dca84ccd44a4271f722f7 100644 (file)
@@ -1471,7 +1471,7 @@ extract_streams_from_pipe(struct apply_ctx *ctx)
        pwm_flags = PWM_ALLOW_WIM_HDR;
        if ((ctx->extract_flags & WIMLIB_EXTRACT_FLAG_RESUME))
                pwm_flags |= PWM_SILENT_EOF;
        pwm_flags = PWM_ALLOW_WIM_HDR;
        if ((ctx->extract_flags & WIMLIB_EXTRACT_FLAG_RESUME))
                pwm_flags |= PWM_SILENT_EOF;
-       memcpy(ctx->progress.extract.guid, ctx->wim->hdr.guid, WIM_GID_LEN);
+       memcpy(ctx->progress.extract.guid, ctx->wim->hdr.guid, WIM_GUID_LEN);
        ctx->progress.extract.part_number = ctx->wim->hdr.part_number;
        ctx->progress.extract.total_parts = ctx->wim->hdr.total_parts;
        if (ctx->progress_func)
        ctx->progress.extract.part_number = ctx->wim->hdr.part_number;
        ctx->progress.extract.total_parts = ctx->wim->hdr.total_parts;
        if (ctx->progress_func)
@@ -1561,12 +1561,12 @@ extract_streams_from_pipe(struct apply_ctx *ctx)
                        if (part_number != ctx->progress.extract.part_number ||
                            total_parts != ctx->progress.extract.total_parts ||
                            memcmp(pwm_hdr.guid, ctx->progress.extract.guid,
                        if (part_number != ctx->progress.extract.part_number ||
                            total_parts != ctx->progress.extract.total_parts ||
                            memcmp(pwm_hdr.guid, ctx->progress.extract.guid,
-                                  WIM_GID_LEN))
+                                  WIM_GUID_LEN))
                        {
                                ctx->progress.extract.part_number = part_number;
                                ctx->progress.extract.total_parts = total_parts;
                                memcpy(ctx->progress.extract.guid,
                        {
                                ctx->progress.extract.part_number = part_number;
                                ctx->progress.extract.total_parts = total_parts;
                                memcpy(ctx->progress.extract.guid,
-                                      pwm_hdr.guid, WIM_GID_LEN);
+                                      pwm_hdr.guid, WIM_GUID_LEN);
                                if (ctx->progress_func) {
                                        ctx->progress_func(
                                                WIMLIB_PROGRESS_MSG_EXTRACT_SPWM_PART_BEGIN,
                                if (ctx->progress_func) {
                                        ctx->progress_func(
                                                WIMLIB_PROGRESS_MSG_EXTRACT_SPWM_PART_BEGIN,
index c720a5f2af7b0c4b5d8668e1df4bd5d4b6bcb374..30b2b13204abc8dd6fd0a1bd3df6511711876584 100644 (file)
@@ -124,7 +124,7 @@ read_wim_header(WIMStruct *wim, struct wim_header *hdr)
 
        hdr->flags = le32_to_cpu(disk_hdr.wim_flags);
        hdr->chunk_size = le32_to_cpu(disk_hdr.chunk_size);
 
        hdr->flags = le32_to_cpu(disk_hdr.wim_flags);
        hdr->chunk_size = le32_to_cpu(disk_hdr.chunk_size);
-       memcpy(hdr->guid, disk_hdr.guid, WIM_GID_LEN);
+       memcpy(hdr->guid, disk_hdr.guid, WIM_GUID_LEN);
        hdr->part_number = le16_to_cpu(disk_hdr.part_number);
        hdr->total_parts = le16_to_cpu(disk_hdr.total_parts);
 
        hdr->part_number = le16_to_cpu(disk_hdr.part_number);
        hdr->total_parts = le16_to_cpu(disk_hdr.total_parts);
 
@@ -181,7 +181,7 @@ write_wim_header_at_offset(const struct wim_header *hdr, struct filedes *out_fd,
                disk_hdr.chunk_size = cpu_to_le32(hdr->chunk_size);
        else
                disk_hdr.chunk_size = 0;
                disk_hdr.chunk_size = cpu_to_le32(hdr->chunk_size);
        else
                disk_hdr.chunk_size = 0;
-       memcpy(disk_hdr.guid, hdr->guid, WIM_GID_LEN);
+       memcpy(disk_hdr.guid, hdr->guid, WIM_GUID_LEN);
 
        disk_hdr.part_number = cpu_to_le16(hdr->part_number);
        disk_hdr.total_parts = cpu_to_le16(hdr->total_parts);
 
        disk_hdr.part_number = cpu_to_le16(hdr->part_number);
        disk_hdr.total_parts = cpu_to_le16(hdr->total_parts);
@@ -312,7 +312,7 @@ wimlib_print_header(const WIMStruct *wim)
 
        tprintf(T("Chunk Size                  = %u\n"), hdr->chunk_size);
        tfputs (T("GUID                        = "), stdout);
 
        tprintf(T("Chunk Size                  = %u\n"), hdr->chunk_size);
        tfputs (T("GUID                        = "), stdout);
-       print_byte_field(hdr->guid, WIM_GID_LEN, stdout);
+       print_byte_field(hdr->guid, WIM_GUID_LEN, stdout);
        tputchar(T('\n'));
        tprintf(T("Part Number                 = %hu\n"), hdr->part_number);
        tprintf(T("Total Parts                 = %hu\n"), hdr->total_parts);
        tputchar(T('\n'));
        tprintf(T("Part Number                 = %hu\n"), hdr->part_number);
        tprintf(T("Total Parts                 = %hu\n"), hdr->total_parts);
index 8a0abe5d663e912c0a28d6058c820cd368eebedc..f61eaaf5eebdc6cc92f37e88dd7c8ac34d8b9df5 100644 (file)
@@ -112,7 +112,7 @@ verify_swm_set(WIMStruct *wim, WIMStruct **additional_swms,
                                      "chunk size");
                                return WIMLIB_ERR_SPLIT_INVALID;
                        }
                                      "chunk size");
                                return WIMLIB_ERR_SPLIT_INVALID;
                        }
-                       if (memcmp(guid, swm->hdr.guid, WIM_GID_LEN) != 0) {
+                       if (memcmp(guid, swm->hdr.guid, WIM_GUID_LEN) != 0) {
                                ERROR("The split WIMs do not all have the same "
                                      "GUID");
                                return WIMLIB_ERR_SPLIT_INVALID;
                                ERROR("The split WIMs do not all have the same "
                                      "GUID");
                                return WIMLIB_ERR_SPLIT_INVALID;
index 41642526f4b66d8ee0bf46fcf362f8d13e2b240a..3c7d887fff45bac67b7ba2e55de1c1d3df1f156d 100644 (file)
@@ -429,7 +429,7 @@ cmp_streams_by_sequential_order(const void *p1, const void *p2)
 
                /* Different (possibly split) WIMs?  */
                if (wim1 != wim2) {
 
                /* Different (possibly split) WIMs?  */
                if (wim1 != wim2) {
-                       v = memcmp(wim1->hdr.guid, wim2->hdr.guid, WIM_GID_LEN);
+                       v = memcmp(wim1->hdr.guid, wim2->hdr.guid, WIM_GUID_LEN);
                        if (v)
                                return v;
                }
                        if (v)
                                return v;
                }
index ce55444b233372117118411b8f869593002d1ded..624a5e2af3887beda802dbd9e20f4f84373176f5 100644 (file)
--- a/src/wim.c
+++ b/src/wim.c
@@ -410,7 +410,7 @@ wimlib_set_wim_info(WIMStruct *wim, const struct wimlib_wim_info *info, int whic
                return ret;
 
        if (which & WIMLIB_CHANGE_GUID) {
                return ret;
 
        if (which & WIMLIB_CHANGE_GUID) {
-               memcpy(wim->hdr.guid, info->guid, WIM_GID_LEN);
+               memcpy(wim->hdr.guid, info->guid, WIM_GUID_LEN);
                wim->guid_set_explicitly = 1;
        }
 
                wim->guid_set_explicitly = 1;
        }
 
index 7ee67f96b3c1a4d825dc236d4b2db58b2db46f45..3dd6da1eded2135c0db75660292a75290d13cd61 100644 (file)
@@ -312,7 +312,7 @@ static u8 *
 fill_in_wimoverlay_dat(u8 *buf,
                       const struct WimOverlay_dat_header *old_hdr,
                       const wchar_t *wim_path,
 fill_in_wimoverlay_dat(u8 *buf,
                       const struct WimOverlay_dat_header *old_hdr,
                       const wchar_t *wim_path,
-                      const u8 wim_guid[WIM_GID_LEN],
+                      const u8 wim_guid[WIM_GUID_LEN],
                       int image,
                       u64 new_data_source_id,
                       const PARTITION_INFORMATION_EX *part_info,
                       int image,
                       u64 new_data_source_id,
                       const PARTITION_INFORMATION_EX *part_info,
@@ -360,8 +360,8 @@ fill_in_wimoverlay_dat(u8 *buf,
        new_entry_1->entry_2_length = new_entry_2_size;
        new_entry_1->wim_type = WIM_BOOT_NOT_OS_WIM;
        new_entry_1->wim_index = image;
        new_entry_1->entry_2_length = new_entry_2_size;
        new_entry_1->wim_type = WIM_BOOT_NOT_OS_WIM;
        new_entry_1->wim_index = image;
-       BUILD_BUG_ON(sizeof(new_entry_1->guid) != WIM_GID_LEN);
-       memcpy(new_entry_1->guid, wim_guid, WIM_GID_LEN);
+       BUILD_BUG_ON(sizeof(new_entry_1->guid) != WIM_GUID_LEN);
+       memcpy(new_entry_1->guid, wim_guid, WIM_GUID_LEN);
 
        p += sizeof(struct WimOverlay_dat_entry_1);
 
 
        p += sizeof(struct WimOverlay_dat_entry_1);
 
@@ -457,7 +457,7 @@ fill_in_wimoverlay_dat(u8 *buf,
 static int
 prepare_wimoverlay_dat(const struct WimOverlay_dat_header *old_hdr,
                       const wchar_t *wim_path,
 static int
 prepare_wimoverlay_dat(const struct WimOverlay_dat_header *old_hdr,
                       const wchar_t *wim_path,
-                      const u8 wim_guid[WIM_GID_LEN],
+                      const u8 wim_guid[WIM_GUID_LEN],
                       int image,
                       void **new_contents_ret,
                       u32 *new_contents_size_ret,
                       int image,
                       void **new_contents_ret,
                       u32 *new_contents_size_ret,
@@ -757,7 +757,7 @@ out_free_contents:
  */
 static int
 update_wimoverlay_manually(const wchar_t *drive, const wchar_t *wim_path,
  */
 static int
 update_wimoverlay_manually(const wchar_t *drive, const wchar_t *wim_path,
-                          const u8 wim_guid[WIM_GID_LEN],
+                          const u8 wim_guid[WIM_GUID_LEN],
                           int image, u64 *data_source_id_ret)
 {
        wchar_t path_main[] = L"A:\\System Volume Information\\WimOverlay.dat";
                           int image, u64 *data_source_id_ret)
 {
        wchar_t path_main[] = L"A:\\System Volume Information\\WimOverlay.dat";
@@ -911,7 +911,7 @@ try_to_attach_wof(const wchar_t *drive)
  */
 int
 wimboot_alloc_data_source_id(const wchar_t *wim_path,
  */
 int
 wimboot_alloc_data_source_id(const wchar_t *wim_path,
-                            const u8 wim_guid[WIM_GID_LEN],
+                            const u8 wim_guid[WIM_GUID_LEN],
                             int image, const wchar_t *target,
                             u64 *data_source_id_ret, bool *wof_running_ret)
 {
                             int image, const wchar_t *target,
                             u64 *data_source_id_ret, bool *wof_running_ret)
 {