diff options
Diffstat (limited to 'firmware/rolo.c')
-rw-r--r-- | firmware/rolo.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/firmware/rolo.c b/firmware/rolo.c index 1b37b6f771..f9b0cc9e61 100644 --- a/firmware/rolo.c +++ b/firmware/rolo.c | |||
@@ -253,7 +253,26 @@ int rolo_load(const char* filename) | |||
253 | /* write the bootdata as if rolo were the bootloader | 253 | /* write the bootdata as if rolo were the bootloader |
254 | * FIXME: this won't work for root redirect... */ | 254 | * FIXME: this won't work for root redirect... */ |
255 | if (!strcmp(filename, BOOTDIR "/" BOOTFILE) && boot_data_valid) | 255 | if (!strcmp(filename, BOOTDIR "/" BOOTFILE) && boot_data_valid) |
256 | write_bootdata(filebuf, filebuf_size, boot_data.boot_volume); /* rb-loader.c */ | 256 | { |
257 | int volume = 0; | ||
258 | |||
259 | if (boot_data.version == 0) | ||
260 | volume = boot_data._boot_volume; | ||
261 | else if (boot_data.version == 1) | ||
262 | { | ||
263 | for (int i = 0; i < NUM_VOLUMES; ++i) | ||
264 | { | ||
265 | if (volume_drive(i) == boot_data.boot_drive && | ||
266 | volume_partition(i) == boot_data.boot_partition) | ||
267 | { | ||
268 | volume = i; | ||
269 | break; | ||
270 | } | ||
271 | } | ||
272 | } | ||
273 | |||
274 | write_bootdata(filebuf, filebuf_size, volume); | ||
275 | } | ||
257 | #endif | 276 | #endif |
258 | 277 | ||
259 | if (err <= 0) | 278 | if (err <= 0) |