shithub: lwext4

Download patch

ref: b4f1a2a663deb75318f1af95a90fed64b53b13b4
parent: 0bad049ee7e205f8ad11b5e03764491457d3cc4e
author: gkostka <kostka.grzegorz@gmail.com>
date: Sun Sep 20 15:41:28 EDT 2015

Code format (spaces to tabs)

--- a/lwext4/ext4_dir_idx.c
+++ b/lwext4/ext4_dir_idx.c
@@ -1193,28 +1193,29 @@
 	return rc2;
 }
 
-int ext4_dir_dx_reset_parent_inode(struct ext4_inode_ref *dir, uint32_t parent_inode)
+int ext4_dir_dx_reset_parent_inode(struct ext4_inode_ref *dir,
+                                   uint32_t parent_inode)
 {
-    /* Load block 0, where will be index root located */
-    uint32_t fblock;
-    int rc = ext4_fs_get_inode_data_block_index(dir, 0, &fblock);
-    if (rc != EOK)
-        return rc;
+	/* Load block 0, where will be index root located */
+	uint32_t fblock;
+	int rc = ext4_fs_get_inode_data_block_index(dir, 0, &fblock);
+	if (rc != EOK)
+		return rc;
 
-    struct ext4_block block;
-    rc = ext4_block_get(dir->fs->bdev, &block, fblock);
-    if (rc != EOK)
-        return rc;
+	struct ext4_block block;
+	rc = ext4_block_get(dir->fs->bdev, &block, fblock);
+	if (rc != EOK)
+		return rc;
 
-    /* Initialize pointers to data structures */
-    struct ext4_directory_dx_root *root = (void *)block.data;
+	/* Initialize pointers to data structures */
+	struct ext4_directory_dx_root *root = (void *)block.data;
 
-    /* Fill the inode field with a new parent ino. */
-    ext4_dx_dot_entry_set_inode(&root->dots[1], parent_inode);
+	/* Fill the inode field with a new parent ino. */
+	ext4_dx_dot_entry_set_inode(&root->dots[1], parent_inode);
 
-    block.dirty = true;
+	block.dirty = true;
 
-    return ext4_block_set(dir->fs->bdev, &block);
+	return ext4_block_set(dir->fs->bdev, &block);
 }
 
 /**