diff options
| author | Stefano Babic <[email protected]> | 2017-05-09 18:03:44 +0200 |
|---|---|---|
| committer | Stefano Babic <[email protected]> | 2017-05-09 18:03:44 +0200 |
| commit | 4f66e09bb9fbc47b73f67c3cc08ee2663e8fcdb1 (patch) | |
| tree | 89bc85aa5a8ca9b60027cdd2f1a40fc83f6278c4 /fs/ext4 | |
| parent | 809b133722eee0e7bdfa6595daabc0bb2f5aa698 (diff) | |
| parent | 85ea850976daea57c8045f3569566fad5ce9fe0f (diff) | |
Merge branch 'master' of git://git.denx.de/u-boot
Signed-off-by: Stefano Babic <[email protected]>
Diffstat (limited to 'fs/ext4')
| -rw-r--r-- | fs/ext4/dev.c | 5 | ||||
| -rw-r--r-- | fs/ext4/ext4fs.c | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/fs/ext4/dev.c b/fs/ext4/dev.c index ee84d3fbe18..ae2ba6a9015 100644 --- a/fs/ext4/dev.c +++ b/fs/ext4/dev.c @@ -60,9 +60,8 @@ int ext4fs_devread(lbaint_t sector, int byte_offset, int byte_len, char *buf) } /* Check partition boundaries */ - if ((sector < 0) || - ((sector + ((byte_offset + byte_len - 1) >> log2blksz)) - >= part_info->size)) { + if ((sector + ((byte_offset + byte_len - 1) >> log2blksz)) + >= part_info->size) { printf("%s read outside partition " LBAFU "\n", __func__, sector); return 0; diff --git a/fs/ext4/ext4fs.c b/fs/ext4/ext4fs.c index 7187dcfb056..081509dbb4d 100644 --- a/fs/ext4/ext4fs.c +++ b/fs/ext4/ext4fs.c @@ -71,7 +71,7 @@ int ext4fs_read_file(struct ext2fs_node *node, loff_t pos, blockcnt = lldiv(((len + pos) + blocksize - 1), blocksize); for (i = lldiv(pos, blocksize); i < blockcnt; i++) { - lbaint_t blknr; + long int blknr; int blockoff = pos - (blocksize * i); int blockend = blocksize; int skipfirst = 0; |
