Exemplo n.º 1
0
long long info_get_used_space(void)
{
  unsigned int block_count;

  block_count = wbfs_count_usedblocks(app_state.wbfs);
  return (long long) app_state.wbfs->wbfs_sec_sz * (app_state.wbfs->n_wbfs_sec - block_count);
}
Exemplo n.º 2
0
s32 WBFS_DiskSpace(f32 *used, f32 *free)
{
	f32 ssize;
	u32 cnt;

	/* No device open */
	if (!hdd)
		return -1;

	/* Count used blocks */
	cnt = wbfs_count_usedblocks(hdd);

	/* Sector size in GB */
	ssize = hdd->wbfs_sec_sz / GB_SIZE;

	/* Copy values */
	*free = ssize * cnt;
	*used = ssize * (hdd->n_wbfs_sec - cnt);

	return 0;
}