Use avail to get available space, and cast all elements to get unsigned long long result

SVN revision: 45042
This commit is contained in:
Sebastian Dransfeld 2010-01-11 10:23:02 +00:00
parent ffed609651
commit ad5280e60f
5 changed files with 8 additions and 8 deletions

View File

@ -27,7 +27,7 @@ static int _basic_apply(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
/* External Functions */
EAPI E_Config_Dialog *
e_int_config_places_module(E_Container *con)
e_int_config_places_module(E_Container *con, const char *params)
{
E_Config_Dialog *cfd = NULL;
E_Config_Dialog_View *v = NULL;

View File

@ -474,5 +474,5 @@ _places_cb_menu_configure(void *data, E_Menu *mn, E_Menu_Item *mi)
{
if (!places_conf) return;
if (places_conf->cfd) return;
e_int_config_places_module(mn->zone->container);
e_int_config_places_module(mn->zone->container, NULL);
}

View File

@ -73,7 +73,7 @@ EAPI void *e_modapi_init(E_Module *m);
EAPI int e_modapi_shutdown(E_Module *m);
EAPI int e_modapi_save(E_Module *m);
EAPI E_Config_Dialog *e_int_config_places_module(E_Container *con);
EAPI E_Config_Dialog *e_int_config_places_module(E_Container *con, const char *params);
extern Config *places_conf;
extern Eina_List *instances;

View File

@ -18,7 +18,7 @@
#include <e.h>
#include <E_DBus.h>
#include <E_Hal.h>
#include <sys/vfs.h>
#include <sys/statvfs.h>
#include <errno.h>
#include "config.h"
#include "e_mod_main.h"
@ -621,13 +621,13 @@ _places_human_size_get(unsigned long long size)
static unsigned long long
_places_free_space_get(const char *mount)
{
struct statfs s;
struct statvfs s;
//printf("GET SPACE of %s\n", mount);
if (!mount) return 0;
if (statfs(mount, &s) != 0)
if (statvfs(mount, &s) != 0)
return 0;
//printf(" SPACE %d\n", (s.f_bfree * s.f_bsize));
return (unsigned long long)(s.f_bfree * s.f_bsize);
return (unsigned long long)s.f_bavail * (unsigned long long)s.f_bsize;
}
static void

View File

@ -26,7 +26,7 @@ typedef struct _Volume
unsigned char mounted;
const char *mount_point;
const char *fstype;
long long size;
unsigned long long size;
const char *bus;
const char *drive_type;