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:
patacongo
2008-08-09 21:48:06 +00:00
parent c6ad3e0d22
commit dd7f63b94a
8 changed files with 561 additions and 74 deletions
+3 -3
View File
@@ -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 */