* the only supported value). */
u32 chunk_size;
- /* Globally unique identifier for the WIM file. Basically bunch of
+ /* Globally unique identifier for the WIM file. Basically a bunch of
* random bytes. */
u8 guid[WIM_GID_LEN];
u32 boot_idx;
/* Location and size of the WIM's integrity table, or all zeroes if the
- * WIM has no integrity table. */
-
- /* Note the integrity_table_res_entry here is 4-byte aligned even though
+ * WIM has no integrity table.
+ *
+ * Note the integrity_table_res_entry here is 4-byte aligned even though
* it would ordinarily be 8-byte aligned--- hence, the _packed_attribute
* on the `struct wim_header_disk' is essential. */
struct resource_entry_disk integrity_table_res_entry;
struct resource_entry_disk resource_entry;
/* Which part of the split WIM this stream is in; indexed from 1. */
- u16 part_number;
+ le16 part_number;
/* Reference count of this stream over all WIM images. */
- u32 refcnt;
+ le32 refcnt;
/* SHA1 message digest of the uncompressed data of this stream, or
* optionally all zeroes if this stream is of zero length. */
if (rpdata->rptag == WIM_IO_REPARSE_TAG_SYMLINK) {
if (rpbuflen < 20)
goto out_invalid;
- rpdata->rpflags = le16_to_cpu(rpbuf_disk->symlink.rpflags);
+ rpdata->rpflags = le32_to_cpu(rpbuf_disk->symlink.rpflags);
data = rpbuf_disk->symlink.data;
} else {
data = rpbuf_disk->junction.data;
inode->i_attributes = FILE_ATTRIBUTE_REPARSE_POINT;
inode->i_reparse_tag = WIM_IO_REPARSE_TAG_SYMLINK;
- /* The idea here is to call readlink() to get the UNIX target of
- * the symbolic link, then turn the target into a reparse point
- * data buffer that contains a relative or absolute symbolic
- * link (NOT a junction point or *full* path symbolic link with
- * drive letter).
- */
+ /* The idea here is to call readlink() to get the UNIX target of the
+ * symbolic link, then turn the target into a reparse point data buffer
+ * that contains a relative or absolute symbolic link. */
deref_name_len = readlink(path, deref_name_buf,
sizeof(deref_name_buf) - 1);
if (deref_name_len >= 0) {
wimlib_calloc(size_t nmemb, size_t size)
{
size_t total_size = nmemb * size;
- void *p = (*wimlib_malloc_func)(total_size);
+ void *p = MALLOC(total_size);
if (p)
p = memset(p, 0, total_size);
return p;
char *p;
size = strlen(str);
- p = (*wimlib_malloc_func)(size + 1);
+ p = MALLOC(size + 1);
if (p)
- memcpy(p, str, size + 1);
+ p = memcpy(p, str, size + 1);
return p;
}
wchar_t *p;
size = wcslen(str);
- p = (*wimlib_malloc_func)((size + 1) * sizeof(wchar_t));
+ p = MALLOC((size + 1) * sizeof(wchar_t));
if (p)
p = wmemcpy(p, str, size + 1);
return p;