]> wimlib.net Git - wimlib/commitdiff
Rename subdir_offset => d_subdir_offset
authorEric Biggers <ebiggers3@gmail.com>
Sun, 31 May 2015 15:06:11 +0000 (10:06 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Fri, 5 Jun 2015 03:45:35 +0000 (22:45 -0500)
include/wimlib/dentry.h
src/dentry.c
src/metadata_resource.c

index 4adc5fed761d67e96b5832e2ad4fe8351a5bcbaf..e92b374ff2c2f8bc447108a2f0826db3c51e232d 100644 (file)
@@ -86,10 +86,10 @@ struct wim_dentry {
        u8 d_is_orphan : 1;
 
        union {
        u8 d_is_orphan : 1;
 
        union {
-               /* 'subdir_offset' is only used while reading and writing this
+               /* The subdir offset is only used while reading and writing this
                 * dentry.  See the corresponding field in `struct
                 * wim_dentry_on_disk' for explanation.  */
                 * dentry.  See the corresponding field in `struct
                 * wim_dentry_on_disk' for explanation.  */
-               u64 subdir_offset;
+               u64 d_subdir_offset;
 
                /* Temporary list field  */
                struct list_head d_tmp_list;
 
                /* Temporary list field  */
                struct list_head d_tmp_list;
index cb1b4df2f89a27ffb98df89fbc8ac20496d43fb4..a1a312dbc300cd14fede4339e08b6b6c654a4e7e 100644 (file)
@@ -536,7 +536,7 @@ dentry_calculate_subdir_offset(struct wim_dentry *dentry, void *_subdir_offset_p
                struct wim_dentry *child;
 
                /* Set offset of directory's child dentries  */
                struct wim_dentry *child;
 
                /* Set offset of directory's child dentries  */
-               dentry->subdir_offset = *subdir_offset_p;
+               dentry->d_subdir_offset = *subdir_offset_p;
 
                /* Account for child dentries  */
                for_dentry_child(child, dentry)
 
                /* Account for child dentries  */
                for_dentry_child(child, dentry)
@@ -545,8 +545,8 @@ dentry_calculate_subdir_offset(struct wim_dentry *dentry, void *_subdir_offset_p
                /* Account for end-of-directory entry  */
                *subdir_offset_p += 8;
        } else {
                /* Account for end-of-directory entry  */
                *subdir_offset_p += 8;
        } else {
-               /* Not a directory; set subdir_offset to 0  */
-               dentry->subdir_offset = 0;
+               /* Not a directory; set the subdir offset to 0  */
+               dentry->d_subdir_offset = 0;
        }
        return 0;
 }
        }
        return 0;
 }
@@ -1437,7 +1437,7 @@ read_dentry(const u8 * restrict buf, size_t buf_len,
        /* Read more fields: some into the dentry, and some into the inode.  */
        inode->i_attributes = le32_to_cpu(disk_dentry->attributes);
        inode->i_security_id = le32_to_cpu(disk_dentry->security_id);
        /* Read more fields: some into the dentry, and some into the inode.  */
        inode->i_attributes = le32_to_cpu(disk_dentry->attributes);
        inode->i_security_id = le32_to_cpu(disk_dentry->security_id);
-       dentry->subdir_offset = le64_to_cpu(disk_dentry->subdir_offset);
+       dentry->d_subdir_offset = le64_to_cpu(disk_dentry->subdir_offset);
        inode->i_creation_time = le64_to_cpu(disk_dentry->creation_time);
        inode->i_last_access_time = le64_to_cpu(disk_dentry->last_access_time);
        inode->i_last_write_time = le64_to_cpu(disk_dentry->last_write_time);
        inode->i_creation_time = le64_to_cpu(disk_dentry->creation_time);
        inode->i_last_access_time = le64_to_cpu(disk_dentry->last_access_time);
        inode->i_last_write_time = le64_to_cpu(disk_dentry->last_write_time);
@@ -1549,14 +1549,14 @@ static int
 read_dentry_tree_recursive(const u8 * restrict buf, size_t buf_len,
                           struct wim_dentry * restrict dir)
 {
 read_dentry_tree_recursive(const u8 * restrict buf, size_t buf_len,
                           struct wim_dentry * restrict dir)
 {
-       u64 cur_offset = dir->subdir_offset;
+       u64 cur_offset = dir->d_subdir_offset;
 
        /* Check for cyclic directory structure, which would cause infinite
         * recursion if not handled.  */
        for (struct wim_dentry *d = dir->d_parent;
             !dentry_is_root(d); d = d->d_parent)
        {
 
        /* Check for cyclic directory structure, which would cause infinite
         * recursion if not handled.  */
        for (struct wim_dentry *d = dir->d_parent;
             !dentry_is_root(d); d = d->d_parent)
        {
-               if (unlikely(d->subdir_offset == cur_offset)) {
+               if (unlikely(d->d_subdir_offset == cur_offset)) {
                        ERROR("Cyclic directory structure detected: children "
                              "of \"%"TS"\" coincide with children of \"%"TS"\"",
                              dentry_full_path(dir), dentry_full_path(d));
                        ERROR("Cyclic directory structure detected: children "
                              "of \"%"TS"\" coincide with children of \"%"TS"\"",
                              dentry_full_path(dir), dentry_full_path(d));
@@ -1610,7 +1610,7 @@ read_dentry_tree_recursive(const u8 * restrict buf, size_t buf_len,
 
                /* If this child is a directory that itself has children, call
                 * this procedure recursively.  */
 
                /* If this child is a directory that itself has children, call
                 * this procedure recursively.  */
-               if (child->subdir_offset != 0) {
+               if (child->d_subdir_offset != 0) {
                        if (likely(dentry_is_directory(child))) {
                                ret = read_dentry_tree_recursive(buf,
                                                                 buf_len,
                        if (likely(dentry_is_directory(child))) {
                                ret = read_dentry_tree_recursive(buf,
                                                                 buf_len,
@@ -1676,7 +1676,7 @@ read_dentry_tree(const u8 *buf, size_t buf_len,
                        goto err_free_dentry_tree;
                }
 
                        goto err_free_dentry_tree;
                }
 
-               if (likely(root->subdir_offset != 0)) {
+               if (likely(root->d_subdir_offset != 0)) {
                        ret = read_dentry_tree_recursive(buf, buf_len, root);
                        if (ret)
                                goto err_free_dentry_tree;
                        ret = read_dentry_tree_recursive(buf, buf_len, root);
                        if (ret)
                                goto err_free_dentry_tree;
@@ -1748,7 +1748,7 @@ write_dentry(const struct wim_dentry * restrict dentry, u8 * restrict p)
 
        disk_dentry->attributes = cpu_to_le32(inode->i_attributes);
        disk_dentry->security_id = cpu_to_le32(inode->i_security_id);
 
        disk_dentry->attributes = cpu_to_le32(inode->i_attributes);
        disk_dentry->security_id = cpu_to_le32(inode->i_security_id);
-       disk_dentry->subdir_offset = cpu_to_le64(dentry->subdir_offset);
+       disk_dentry->subdir_offset = cpu_to_le64(dentry->d_subdir_offset);
 
        disk_dentry->unused_1 = cpu_to_le64(0);
        disk_dentry->unused_2 = cpu_to_le64(0);
 
        disk_dentry->unused_1 = cpu_to_le64(0);
        disk_dentry->unused_2 = cpu_to_le64(0);
@@ -1869,7 +1869,7 @@ write_dentry(const struct wim_dentry * restrict dentry, u8 * restrict p)
 static int
 write_dir_dentries(struct wim_dentry *dir, void *_pp)
 {
 static int
 write_dir_dentries(struct wim_dentry *dir, void *_pp)
 {
-       if (dir->subdir_offset != 0) {
+       if (dir->d_subdir_offset != 0) {
                u8 **pp = _pp;
                u8 *p = *pp;
                struct wim_dentry *child;
                u8 **pp = _pp;
                u8 *p = *pp;
                struct wim_dentry *child;
index 014d16b999388267ff5eec1e17025d0b43b1c15e..2a3279494ad56c7f4fc68c2d82022d000491dc91 100644 (file)
@@ -102,7 +102,7 @@ read_metadata_resource(struct wim_image_metadata *imd)
         *
         * Notes: The metadata resource consists of the security data, followed
         * by the directory entry for the root directory, followed by all the
         *
         * Notes: The metadata resource consists of the security data, followed
         * by the directory entry for the root directory, followed by all the
-        * other directory entries in the filesystem.  The subdir_offset field
+        * other directory entries in the filesystem.  The subdir offset field
         * of each directory entry gives the start of its child entries from the
         * beginning of the metadata resource.  An end-of-directory is signaled
         * by a directory entry of length '0', really of length 8, because
         * of each directory entry gives the start of its child entries from the
         * beginning of the metadata resource.  An end-of-directory is signaled
         * by a directory entry of length '0', really of length 8, because