Fix for HAVE_MULTIDRIVE on application builds.

Change-Id: I089ea4756e0c824993c65062290c40b3e67f9181
This commit is contained in:
Thomas Martitz 2014-02-07 18:18:16 +01:00
parent 5802141bec
commit cbc57af0f3
3 changed files with 4 additions and 3 deletions

View file

@ -162,9 +162,11 @@ static const char* info_getname(int selected_item, void *data,
{
fat_size(IF_MV(0,) &info->size, &info->free);
#ifdef HAVE_MULTIVOLUME
#ifndef APPLICATION
if (fat_ismounted(1))
fat_size(1, &info->size2, &info->free2);
else
#endif
info->size2 = 0;
#endif
info->new_data = false;
@ -432,4 +434,3 @@ MAKE_MENU(main_menu_, ID2P(LANG_SETTINGS), mainmenu_callback,
);
/* MAIN MENU */
/***********************************/

View file

@ -43,8 +43,9 @@ long filesize(int fd)
}
/* do we really need this in the app? */
void fat_size(unsigned long* size, unsigned long* free)
void fat_size(IF_MV(int volume,) unsigned long* size, unsigned long* free)
{
IF_MV((void) volume);
*size = *free = 0;
}

View file

@ -40,7 +40,6 @@ extern int _mkdir(const char* name);
extern int _rmdir(const char* name);
extern int _closedir(DIR* dir);
extern struct dirent *_readdir(DIR* dir);
extern void fat_size(unsigned long *size, unsigned long *free);
#define DIRFUNCTIONS_DEFINED
#define DIRENT_DEFINED