static int
get_cluster(fsdata *mydata, __u32 clustnum, __u8 *buffer, unsigned long size)
{
- __u32 idx = 0;
__u32 startsect;
int ret;
size -= mydata->sect_size;
}
} else {
+ __u32 idx;
+
idx = size / mydata->sect_size;
if (idx == 0)
ret = 0;
static int
set_sectors(fsdata *mydata, u32 startsect, u8 *buffer, u32 size)
{
- u32 nsects = 0;
int ret;
debug("startsect: %d\n", startsect);
size -= mydata->sect_size;
}
} else if (size >= mydata->sect_size) {
+ u32 nsects;
+
nsects = size / mydata->sect_size;
ret = disk_write(startsect, nsects, buffer);
if (ret != nsects) {
}
size -= wsize;
- buffer += wsize;
*gotsize += wsize;
}
*/
static int delete_long_name(fat_itr *itr)
{
- struct dir_entry *dent = itr->dent;
int seqn = itr->dent->nameext.name[0] & ~LAST_LONG_ENTRY_MASK;
while (seqn--) {
+ struct dir_entry *dent;
int ret;
ret = delete_single_dentry(itr);