Changeset 3373 in MondoRescue for branches/3.2/mondo/src/common/libmondo-devices.c
- Timestamp:
- Apr 27, 2015, 4:25:28 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mondo/src/common/libmondo-devices.c
r3371 r3373 2595 2595 2596 2596 if (archiving_to_media) { 2597 2597 mr_free(bkpinfo->boot_device); 2598 2598 #ifdef __FreeBSD__ 2599 strcpy(bkpinfo->boot_device, 2600 call_program_and_get_last_line_of_output 2601 ("mount | grep ' / ' | head -1 | cut -d' ' -f1 | sed 's/\\([0-9]\\).*/\\1/'")); 2599 mr_asprintf(bkpinfo->boot_device, "%s", call_program_and_get_last_line_of_output("mount | grep ' / ' | head -1 | cut -d' ' -f1 | sed 's/\\([0-9]\\).*/\\1/'")); 2602 2600 #else 2603 strcpy(bkpinfo->boot_device, 2604 call_program_and_get_last_line_of_output 2605 ("mount | grep ' / ' | head -1 | cut -d' ' -f1 | sed 's/[0-9].*//'")); 2601 mr_asprintf(bkpinfo->boot_device, "%s", call_program_and_get_last_line_of_output("mount | grep ' / ' | head -1 | cut -d' ' -f1 | sed 's/[0-9].*//'")); 2606 2602 #endif 2607 2603 i = which_boot_loader(bkpinfo->boot_device); … … 2616 2612 i = which_boot_loader(bkpinfo->boot_device); 2617 2613 #else 2618 if (!popup_and_get_string("Boot device", "What is your boot device? (e.g. /dev/hda)", bkpinfo->boot_device, MAX_STR_LEN / 4)) { 2614 strcpy(tmp1, bkpinfo->boot_device); 2615 if (!popup_and_get_string("Boot device", "What is your boot device? (e.g. /dev/hda)", tmp1, MAX_STR_LEN / 4)) { 2619 2616 log_to_screen("User has chosen not to backup the PC"); 2620 2617 finish(1); 2621 2618 } 2622 if (does_string_exist_in_boot_block(bkpinfo->boot_device, "LILO")) { 2619 mr_free(bkpinfo->boot_device); 2620 mr_asprintf(bkpinfo->boot_device, "%s", tmp1); 2621 2622 if (does_string_exist_in_boot_block(bkpinfo->boot_device, "ELILO")) { 2623 i = 'E'; 2624 } else 2625 if (does_string_exist_in_boot_block(bkpinfo->boot_device, "LILO")) { 2623 2626 i = 'L'; 2624 } else2625 if (does_string_exist_in_boot_block(bkpinfo->boot_device, "ELILO")) {2626 i = 'E';2627 2627 } else 2628 2628 if (does_string_exist_in_boot_block(bkpinfo->boot_device, "GRUB")) {
Note:
See TracChangeset
for help on using the changeset viewer.