mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:58:59 +08:00
Implemented mkfatfs()
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@805 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -105,13 +105,13 @@ static inline void mkfatfs_initmbr(FAR struct fat_format_s *fmt,
|
||||
/* 2@19: FAT12/16: Must be 0, see BS_TOTSEC32.
|
||||
* Handled with 4@32: Total count of sectors on the volume */
|
||||
|
||||
if (var->fv_nsectors >= 65536)
|
||||
if (fmt->ff_nsectors >= 65536)
|
||||
{
|
||||
MBR_PUTTOTSEC32(var->fv_sect, var->fv_nsectors);
|
||||
MBR_PUTTOTSEC32(var->fv_sect, fmt->ff_nsectors);
|
||||
}
|
||||
else
|
||||
{
|
||||
MBR_PUTTOTSEC16(var->fv_sect, (uint16)var->fv_nsectors);
|
||||
MBR_PUTTOTSEC16(var->fv_sect, (uint16)fmt->ff_nsectors);
|
||||
}
|
||||
|
||||
/* 1@21: Media code: f0, f8, f9-fa, fc-ff */
|
||||
|
||||
Reference in New Issue
Block a user