diff options
author | Stefano Babic <sbabic@denx.de> | 2014-07-16 08:51:30 +0200 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2014-07-16 08:51:30 +0200 |
commit | dab5e3469d294a4e1ffed8407d296a78e02cc01f (patch) | |
tree | c6378034591210b3142ca3add806d52c6ea22b3b /fs | |
parent | 14a1613140519a8d0a88e6054c302a8cb3e067a5 (diff) | |
parent | 524123a70761110c5cf3ccc5f52f6d4da071b959 (diff) | |
download | u-boot-imx-dab5e3469d294a4e1ffed8407d296a78e02cc01f.zip u-boot-imx-dab5e3469d294a4e1ffed8407d296a78e02cc01f.tar.gz u-boot-imx-dab5e3469d294a4e1ffed8407d296a78e02cc01f.tar.bz2 |
Merge branch 'master' of git://git.denx.de/u-boot
Signed-off-by: Stefano Babic <sbabic@denx.de>
Conflicts:
boards.cfg
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ext4/ext4_common.c | 4 | ||||
-rw-r--r-- | fs/ext4/ext4_write.c | 2 | ||||
-rw-r--r-- | fs/fat/fat_write.c | 2 | ||||
-rw-r--r-- | fs/jffs2/jffs2_1pass.c | 2 |
4 files changed, 4 insertions, 6 deletions
diff --git a/fs/ext4/ext4_common.c b/fs/ext4/ext4_common.c index 1c11721..33d69c9 100644 --- a/fs/ext4/ext4_common.c +++ b/fs/ext4/ext4_common.c @@ -1380,7 +1380,7 @@ void ext4fs_allocate_blocks(struct ext2_inode *file_inode, unsigned int no_blks_reqd = 0; /* allocation of direct blocks */ - for (i = 0; i < INDIRECT_BLOCKS; i++) { + for (i = 0; total_remaining_blocks && i < INDIRECT_BLOCKS; i++) { direct_blockno = ext4fs_get_new_blk_no(); if (direct_blockno == -1) { printf("no block left to assign\n"); @@ -1390,8 +1390,6 @@ void ext4fs_allocate_blocks(struct ext2_inode *file_inode, debug("DB %ld: %u\n", direct_blockno, total_remaining_blocks); total_remaining_blocks--; - if (total_remaining_blocks == 0) - break; } alloc_single_indirect_block(file_inode, &total_remaining_blocks, diff --git a/fs/ext4/ext4_write.c b/fs/ext4/ext4_write.c index c42add9..648a596 100644 --- a/fs/ext4/ext4_write.c +++ b/fs/ext4/ext4_write.c @@ -840,7 +840,7 @@ int ext4fs_write(const char *fname, unsigned char *buffer, unsigned int ibmap_idx; struct ext_filesystem *fs = get_fs(); ALLOC_CACHE_ALIGN_BUFFER(char, filename, 256); - memset(filename, 0x00, sizeof(filename)); + memset(filename, 0x00, 256); g_parent_inode = zalloc(sizeof(struct ext2_inode)); if (!g_parent_inode) diff --git a/fs/fat/fat_write.c b/fs/fat/fat_write.c index ba7e3ae..24ed5d3 100644 --- a/fs/fat/fat_write.c +++ b/fs/fat/fat_write.c @@ -947,7 +947,7 @@ static int do_fat_write(const char *filename, void *buffer, total_sector = bs.total_sect; if (total_sector == 0) - total_sector = cur_part_info.size; + total_sector = (int)cur_part_info.size; /* cast of lbaint_t */ if (mydata->fatsize == 32) mydata->fatlength = bs.fat32_length; diff --git a/fs/jffs2/jffs2_1pass.c b/fs/jffs2/jffs2_1pass.c index 3fb5db3..b1d6470 100644 --- a/fs/jffs2/jffs2_1pass.c +++ b/fs/jffs2/jffs2_1pass.c @@ -724,7 +724,7 @@ jffs2_1pass_read_inode(struct b_lists *pL, u32 inode, char *dest) for (b = pL->frag.listHead; b != NULL; b = b->next) { jNode = (struct jffs2_raw_inode *) get_node_mem(b->offset, pL->readbuf); - if ((inode == jNode->ino)) { + if (inode == jNode->ino) { #if 0 putLabeledWord("\r\n\r\nread_inode: totlen = ", jNode->totlen); putLabeledWord("read_inode: inode = ", jNode->ino); |