fix warnings and errors in a41a001258

* volume_partition() wasn't defined for hosted targets
 * wrap the "special" volume stuff in HAVE_MULTIDRIVE

Change-Id: Icbea256ab6438e1f7e45d361ed61724feec7ef0b
This commit is contained in:
Solomon Peachy 2024-11-23 20:58:35 -05:00
parent a41a001258
commit 57cd8cd712
2 changed files with 10 additions and 1 deletions

View file

@ -169,9 +169,9 @@ static int refresh_data(struct info_data *info)
#ifdef HAVE_MULTIVOLUME
#ifdef HAVE_MULTIDRIVE
int max = -1;
int special = 0;
#endif
int drive = 0;
int special = 0;
for (i = 0 ; CHECK_VOL(i) ; i++) {
#endif
volume_size(IF_MV(i,) &info->size[i], &info->free[i]);
@ -196,9 +196,11 @@ static int refresh_data(struct info_data *info)
#endif
#if defined(HAVE_MULTIVOLUME) && (defined(HAVE_HOTSWAP) || defined(HAVE_HOTSWAP) || defined(HAVE_DIRCACHE) || defined(HAVE_BOOTDATA))
if (volume_partition(i) == -1) {
#ifdef HAVE_MULTIDRIVE
if (special)
info->name[i] = LANG_DISK_NAME_MMC;
else
#endif
info->name[i] = 0;
break; /* ie stop when we run out of valid partitions */
}

View file

@ -207,3 +207,10 @@ bool volume_present(int volume)
return hostfs_present(volume);
}
#endif
int volume_partition(int volume)
{
(void)volume;
/* Hosted only implement a single parition per "drive" */
return 0;
}