- Timestamp:
- Mar 5, 2024, 2:06:28 AM (4 months ago)
- Location:
- branches/3.3/mondo/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3/mondo/src/common/libmondo-cli.c
r3832 r3835 682 682 683 683 if (flag_set['p']) { 684 strncpy(bkpinfo->prefix, flag_val['p'],(MAX_STR_LEN / 4)-1);684 mr_asprintf(bkpinfo->prefix, "%s", flag_val['p']); 685 685 log_msg(1,"Prefix forced to %s",bkpinfo->prefix); 686 686 } -
branches/3.3/mondo/src/common/libmondo-devices.c
r3834 r3835 2625 2625 bkpinfo->netfs_remote_dir = mr_strip_spaces(tmp1); 2626 2626 2627 if (!popup_and_get_string("Prefix.", "Please enter the prefix that will be prepended to your ISO filename. Example: machine1 to obtain machine1-[1-9]*.iso files", bkpinfo->prefix,(MAX_STR_LEN / 4)-1)) { 2627 tmp = popup_and_get_string("Prefix.", "Please enter the prefix that will be prepended to your ISO filename. Example: machine1 to obtain machine1-[1-9]*.iso files", bkpinfo->prefix); 2628 if (tmp == NULL) { 2628 2629 log_to_screen("User has chosen not to backup the machine"); 2629 2630 finish(1); 2630 2631 } 2632 mr_free(bkpinfo->prefix); 2633 bkpinfo->prefix = tmp; 2631 2634 log_msg(3, "prefix set to %s", bkpinfo->prefix); 2632 2635 log_msg(3, "Just set netfs_remote_dir to %s", bkpinfo->netfs_remote_dir); … … 2659 2662 } 2660 2663 } 2661 if (!popup_and_get_string("Prefix.", "Please enter the prefix that will be prepended to your ISO filename. Example: machine1 to obtain machine1-[1-9]*.iso files", bkpinfo->prefix,(MAX_STR_LEN / 4)-1)) { 2664 tmp = popup_and_get_string("Prefix.", "Please enter the prefix that will be prepended to your ISO filename. Example: machine1 to obtain machine1-[1-9]*.iso files", bkpinfo->prefix); 2665 if (tmp == NULL) { 2662 2666 log_to_screen("User has chosen not to backup the machine"); 2663 2667 finish(1); 2664 2668 } 2669 mr_free(bkpinfo->prefix); 2670 bkpinfo->prefix = tmp; 2665 2671 log_msg(3, "prefix set to %s", bkpinfo->prefix); 2666 2672 break; … … 2888 2894 log_it("media size = %ld", bkpinfo->media_size); 2889 2895 log_it("media type = %s", bkptype_to_string(bkpinfo->backup_media_type)); 2890 if (bkpinfo->prefix ) {2896 if (bkpinfo->prefix != NULL) { 2891 2897 log_it("prefix = %s", bkpinfo->prefix); 2892 2898 } -
branches/3.3/mondo/src/common/newt-specific.c
r3834 r3835 441 441 mr_free(bkpinfo->tmpdir); 442 442 mr_free(bkpinfo->scratchdir); 443 mr_free(bkpinfo->prefix); 443 444 /* Then free the structure */ 444 445 paranoid_free(bkpinfo); -
branches/3.3/mondo/src/mondorestore/mondo-rstr-tools.c
r3833 r3835 687 687 } 688 688 if (read_cfg_var(cfg_file, "iso-prefix", value) == 0) { 689 strcpy(bkpinfo->prefix,value);689 mr_asprintf(bkpinfo->prefix, "%s", value); 690 690 } else { 691 strcpy(bkpinfo->prefix,STD_PREFIX);691 mr_asprintf(bkpinfo->prefix, "%s", STD_PREFIX); 692 692 } 693 693 log_it("Setting Prefix to %s", bkpinfo->prefix); … … 706 706 } 707 707 if (read_cfg_var(cfg_file, "iso-prefix", value) == 0) { 708 strcpy(bkpinfo->prefix,value);708 mr_asprintf(bkpinfo->prefix, "%s", value); 709 709 } else { 710 strcpy(bkpinfo->prefix,STD_PREFIX);710 mr_asprintf(bkpinfo->prefix, "%s", STD_PREFIX); 711 711 } 712 712 tmp1 = call_program_and_get_last_line_of_output("cat "CMDLINE); … … 718 718 fatal_error("no imgname variable in environment"); 719 719 } 720 strcpy(bkpinfo->prefix,envtmp1);720 mr_asprintf(bkpinfo->prefix, "%s", envtmp1); 721 721 } 722 722 mr_free(tmp1);
Note:
See TracChangeset
for help on using the changeset viewer.