[syslinux:fsc] FAT: handle the cluster number being 1
syslinux-bot for H. Peter Anvin
hpa at zytor.com
Mon Jan 25 09:30:10 PST 2010
Commit-ID: 5964900d2335a6d84a63e89fb0e7e302aeae4da3
Gitweb: http://syslinux.zytor.com/commit/5964900d2335a6d84a63e89fb0e7e302aeae4da3
Author: H. Peter Anvin <hpa at zytor.com>
AuthorDate: Mon, 25 Jan 2010 09:28:26 -0800
Committer: H. Peter Anvin <hpa at zytor.com>
CommitDate: Mon, 25 Jan 2010 09:28:26 -0800
FAT: handle the cluster number being 1
Any reference to cluster 1 is an error, so treat it the same as
cluster 0 or one of the EOF cluster numbers.
Signed-off-by: H. Peter Anvin <hpa at zytor.com>
---
core/fs/fat/fat.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/core/fs/fat/fat.c b/core/fs/fat/fat.c
index ce3cae6..21dda90 100644
--- a/core/fs/fat/fat.c
+++ b/core/fs/fat/fat.c
@@ -128,7 +128,7 @@ static sector_t get_next_sector(struct fs_info* fs, uint32_t sector)
/* get a new cluster */
cluster = get_next_cluster(fs, (data_sector >> FAT_SB(fs)->clust_shift) + 2);
- if (!cluster )
+ if (cluster < 2)
return 0;
/* return the start of the new cluster */
More information about the Syslinux-commits
mailing list