diff options
Diffstat (limited to 'apps/menus/main_menu.c')
-rw-r--r-- | apps/menus/main_menu.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/apps/menus/main_menu.c b/apps/menus/main_menu.c index a483a72eb0..bcaeee9089 100644 --- a/apps/menus/main_menu.c +++ b/apps/menus/main_menu.c | |||
@@ -134,8 +134,8 @@ static int show_legal(void) | |||
134 | struct info_data | 134 | struct info_data |
135 | 135 | ||
136 | { | 136 | { |
137 | unsigned long size[NUM_VOLUMES]; | 137 | sector_t size[NUM_VOLUMES]; |
138 | unsigned long free[NUM_VOLUMES]; | 138 | sector_t free[NUM_VOLUMES]; |
139 | unsigned long name[NUM_VOLUMES]; | 139 | unsigned long name[NUM_VOLUMES]; |
140 | bool new_data; | 140 | bool new_data; |
141 | }; | 141 | }; |
@@ -162,16 +162,19 @@ enum infoscreenorder | |||
162 | */ | 162 | */ |
163 | static int refresh_data(struct info_data *info) | 163 | static int refresh_data(struct info_data *info) |
164 | { | 164 | { |
165 | int i = 0; | 165 | #ifdef HAVE_MULTIVOLUME |
166 | #ifdef HAVE_MULTIDRIVE | 166 | #ifdef HAVE_MULTIDRIVE |
167 | int drive; | ||
168 | int max = -1; | 167 | int max = -1; |
169 | 168 | #endif | |
169 | int drive = 0; | ||
170 | int i = 0; | ||
170 | for (i = 0 ; CHECK_VOL(i) ; i++) { | 171 | for (i = 0 ; CHECK_VOL(i) ; i++) { |
171 | #endif | 172 | #endif |
172 | volume_size(IF_MV(i,) &info->size[i], &info->free[i]); | 173 | volume_size(IF_MV(i,) &info->size[i], &info->free[i]); |
174 | #ifdef HAVE_MULTIVOLUME | ||
173 | #ifdef HAVE_MULTIDRIVE | 175 | #ifdef HAVE_MULTIDRIVE |
174 | drive = volume_drive(i); | 176 | drive = volume_drive(i); |
177 | #endif | ||
175 | if (drive > 0 || info->size[i] == 0) | 178 | if (drive > 0 || info->size[i] == 0) |
176 | info->name[i] = LANG_DISK_NAME_MMC; | 179 | info->name[i] = LANG_DISK_NAME_MMC; |
177 | else | 180 | else |
@@ -182,9 +185,12 @@ static int refresh_data(struct info_data *info) | |||
182 | max = drive; | 185 | max = drive; |
183 | else if (drive < max) | 186 | else if (drive < max) |
184 | break; | 187 | break; |
188 | #elif defined(HAVE_MULTIVOLUME) | ||
189 | if (volume_partition(i) == -1) | ||
190 | break; | ||
191 | #endif | ||
192 | #ifdef HAVE_MULTIVOLUME | ||
185 | } | 193 | } |
186 | #else | ||
187 | i++; | ||
188 | #endif | 194 | #endif |
189 | 195 | ||
190 | info->new_data = false; | 196 | info->new_data = false; |