- Timestamp:
- Apr 27, 2015, 4:25:28 PM (10 years ago)
- Location:
- branches/3.2/mondo/src/common
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mondo/src/common/libmondo-archive.c
r3353 r3373 596 596 597 597 update_evalcall_form(2); 598 if (!bkpinfo->nonbootable_backup && (bkpinfo->boot_loader == '\0' || bkpinfo->boot_device [0] == '\0')) {598 if (!bkpinfo->nonbootable_backup && (bkpinfo->boot_loader == '\0' || bkpinfo->boot_device == NULL)) { 599 599 600 600 #ifdef __FreeBSD__ … … 638 638 bkpinfo->boot_loader = ch; 639 639 } 640 if (bkpinfo->boot_device [0] != '\0') {640 if (bkpinfo->boot_device != NULL) { 641 641 log_msg(2, "User specified boot device. It is '%s'.", bkpinfo->boot_device); 642 642 } else { 643 strcpy(bkpinfo->boot_device, bootdev);643 mr_asprintf(bkpinfo->boot_device, "%s", bootdev); 644 644 } 645 645 } -
branches/3.2/mondo/src/common/libmondo-cli.c
r3351 r3373 811 811 812 812 if (flag_set['f']) { 813 strncpy(bkpinfo->boot_device, resolve_softlinks_to_get_to_actual_device_file(flag_val['f']),MAX_STR_LEN / 4); 813 mr_free(bkpinfo->boot_device); 814 mr_asprintf(bkpinfo->boot_device, "%s", resolve_softlinks_to_get_to_actual_device_file(flag_val['f'])); 814 815 } 815 816 -
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")) { -
branches/3.2/mondo/src/common/libmondo-tools.c
r3371 r3373 776 776 bkpinfo->media_size = -1; 777 777 bkpinfo->boot_loader = '\0'; 778 bkpinfo->boot_device [0] = '\0';778 bkpinfo->boot_device = NULL; 779 779 bkpinfo->zip_exe[0] = '\0'; 780 780 bkpinfo->zip_suffix[0] = '\0'; -
branches/3.2/mondo/src/common/mondostructures.h
r3278 r3373 361 361 * to take truncate_to_drive_name() of where_is_root_mounted(). 362 362 */ 363 char boot_device[MAX_STR_LEN / 4];363 char *boot_device; 364 364 365 365 /**
Note:
See TracChangeset
for help on using the changeset viewer.