diff options
author | robi <robi> | 2011-10-19 00:02:48 +0000 |
---|---|---|
committer | robi <robi> | 2011-10-19 00:02:48 +0000 |
commit | aacfa4d0120b4d979f62a37a10b9d3cf2755e8dc (patch) | |
tree | f6b47457209d82498ee4f599f5c869fbd3268a62 /src/util.c | |
parent | 76cdc3cf7ccdd9fa0d796c829924c7d00fab22dd (diff) |
ext4 magic function part 1
Diffstat (limited to 'src/util.c')
-rw-r--r-- | src/util.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -651,3 +651,12 @@ int get_tind_block_len(char *buf, blk_t *blk, blk_t *last, blk_t *next, __u64 *p return ret; } + +int zero_space(unsigned char *buf, __u32 offset){ + __u32 i=offset;// +1; + __u32 end = (i)?((i + (current_fs->blocksize-1)) & ~(current_fs->blocksize-1)) : (i+current_fs->blocksize) ; + + while ((i<end) && (!buf[i])) + i++; + return (i == end ) ? 1 : 0 ; +} |