Bug #111

HBB wrong free space calculated on SD

Added by pman1902 320 days ago. Updated 62 days ago.

Status:Closed Start:10/25/2009
Priority:Normal Due date:
Assigned to:teknecal % Done:

100%

Category:Functionality Spent time: 1.00 hour
Target version:v0.3.9

Description

Hi there!

first things first. GREAT APP!
I use it for a long time and i see allot of progress is made.
However lately i encounter a weird problem.
i use a:
sandisk ultra 15mb/s sdhc 8gb sandisk

when i come close to the having 4 gb of data on it, HBB shows i only got a few mb left.
so i cannot install anything using the HBB.
I tried to reformat and scandisk the SD card but still the same.

I coppied an extra bogus 300MB file on the sd card. now HBB shows and works correct again.
when i remove this file the problem is there again.

greetingz,
Pman1902

History

Updated by teknecal 319 days ago

Hi,

For a quick fix, can you change the "Check free space" setting to Off and see if that helps?

Updated by teknecal 310 days ago

  • Target version changed from v0.3.6 to v0.3.7

Updated by teknecal 265 days ago

  • Status changed from New to Feedback
  • Target version deleted (v0.3.7)

Looking for simple source that supports >4GB when doing statvs.

Updated by jonqpublek 253 days ago

Hi,

I've got the same issue with a Kingston 8GB SDHC card. Have enough space for now, but I'll try using the option you suggested.

In the meanwhile, I found this link, which may (or may not) help you:

https://rocket.ryerson.ca/https/bugzilla.mozilla.org/show_bug.cgi?id=389087

Hope this helps,

Jon

Updated by teknecal 89 days ago

  • Status changed from Feedback to Resolved
  • Target version set to v0.3.9
  • % Done changed from 0 to 100

Finally got around to look at how the free space is calculated, made some changes, believe this should now be fixed.

The below works with my 8GB USB.

if (statvfs("usb:/", &info) == -1)
perror("statvfs() error");
else {
printf("statvfs() returned the following information");
printf("about the Root ('/') file system:");
printf(" f_bsize : %li\n", info.f_bsize);
printf(" f_bsize : %u\n", info.f_bfree);
printf(" f_files : %u\n", info.f_files);
printf(" f_ffree : %u\n", info.f_ffree);
printf(" f_fsid : %li\n", info.f_fsid);
printf(" f_flag : %li\n", info.f_flag);
printf(" f_namemax : %li\n", info.f_namemax);

long test1 = info.f_bfree;
test1 = test1 / 1000;
test1 = round(test1 * info.f_bsize);
test1 = test1 / 1000;

printf("Size = %li\n", test1);
}

Updated by teknecal 62 days ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF