summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2010-02-16 13:52:09 -0800
committerH. Peter Anvin <hpa@zytor.com>2010-02-16 13:52:09 -0800
commitf94acac11bb41676ec47d457317eb027e90bb441 (patch)
treee68c0d47f96c2078db117c238ac81e4fb18dd592
parentb4ce3fadde8ffb9b306e8d33bb2710f2f8faadae (diff)
downloadsyslinux-f94acac11bb41676ec47d457317eb027e90bb441.tar.gz
ext2: drop any 64K limit
There is no point in maintaining a 64K limit; this is handled at a lower level in the disk I/O library if appropriate. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--core/Makefile2
-rw-r--r--core/fs/ext2/ext2.c8
2 files changed, 4 insertions, 6 deletions
diff --git a/core/Makefile b/core/Makefile
index 707aad79..b92630bc 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -26,6 +26,8 @@ include $(topdir)/MCONFIG.embedded
OPTFLAGS =
INCLUDES = -I./include -I$(com32)/include
+CFLAGS += -DDEBUG
+
# This is very similar to cp437; technically it's for Norway and Denmark,
# but it's unlikely the characters that are different will be used in
# filenames by other users.
diff --git a/core/fs/ext2/ext2.c b/core/fs/ext2/ext2.c
index fcf5cb95..bc758249 100644
--- a/core/fs/ext2/ext2.c
+++ b/core/fs/ext2/ext2.c
@@ -120,15 +120,11 @@ static uint32_t ext2_getfssec(struct file *file, char *buf,
/* get the consective sectors count */
do {
- con_sec_cnt ++;
- sectors --;
+ con_sec_cnt++;
+ sectors--;
if (sectors <= 0)
break;
- /* if sectors >= the sectors left in the 64K block, break and read */
- if (sectors >= (((~(uint32_t)buf&0xffff)|((uint32_t)buf&0xffff0000)) + 1))
- break;
-
sector_idx++;
next_sector++;
} while (next_sector == linsector(inode, sector_idx));