dosfsck corrupts root directory when fs->nfats is 1.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
This commit is contained in:
parent
043f8a8fb1
commit
95005294d8
@ -174,8 +174,10 @@ void set_fat(DOS_FS *fs,unsigned long cluster,unsigned long new)
|
|||||||
}
|
}
|
||||||
fs->fat[cluster].value = new;
|
fs->fat[cluster].value = new;
|
||||||
fs_write(offs,size,&data);
|
fs_write(offs,size,&data);
|
||||||
|
if (fs->nfats > 1) {
|
||||||
fs_write(offs+fs->fat_size,size,&data);
|
fs_write(offs+fs->fat_size,size,&data);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int bad_cluster(DOS_FS *fs,unsigned long cluster)
|
int bad_cluster(DOS_FS *fs,unsigned long cluster)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user