diff options
author | Colin Cross <ccross@android.com> | 2010-08-04 15:11:53 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2010-08-04 15:11:53 -0700 |
commit | cf5c39c1851f8826264822414dbab31c1aeaeec6 (patch) | |
tree | a296cf6ed40cb66dba2ff298ceb4062bd5baa375 /ext4_utils | |
parent | de61f980c7b034eefac6e0ace718b3c1eb3f6252 (diff) | |
download | extras-cf5c39c1851f8826264822414dbab31c1aeaeec6.tar.gz |
Fix zero length files
Zero length files should just skip the block allocation so the
inode extent fields are empty.
Change-Id: I40a6ba32b0a7f842e5d752e8cd70dfda878b8998
Diffstat (limited to 'ext4_utils')
-rw-r--r-- | ext4_utils/contents.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext4_utils/contents.c b/ext4_utils/contents.c index 8bed822d..9fcd3b30 100644 --- a/ext4_utils/contents.c +++ b/ext4_utils/contents.c @@ -173,7 +173,8 @@ u32 make_file(const char *filename, u64 len) return EXT4_ALLOCATE_FAILED; } - inode_allocate_file_extents(inode, len, filename); + if (len > 0) + inode_allocate_file_extents(inode, len, filename); inode->i_mode = S_IFREG; inode->i_links_count = 1; |