Changeset 2319 in MondoRescue for branches/2.2.10/mondo/src/common
- Timestamp:
- Aug 18, 2009, 2:37:25 PM (15 years ago)
- Location:
- branches/2.2.10/mondo/src/common
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mondo/src/common/libmondo-cli.c
r2318 r2319 759 759 if (!strcmp(bkpinfo->include_paths, "/")) { 760 760 log_msg(2, "'/' is pleonastic."); 761 bkpinfo->include_paths[0] = '\0';762 }763 if (bkpinfo->include_paths[0]) {764 strcat(bkpinfo->include_paths, " ");765 761 } 766 762 … … 801 797 log_to_screen("Archiving only the following file systems on %s:\n", token); 802 798 log_to_screen(" %s\n", mounted_on_dsf); 803 strcpy(bkpinfo->include_paths, "/"); 799 mr_asprintf(&p, "/"); 800 bkpinfo->include_paths = p; 804 801 if (strlen(not_mounted_on_dsf)) { 805 802 log_msg (5, "Adding to bkpinfo->exclude_paths due to -I option: %s", not_mounted_on_dsf); … … 811 808 /* A device special file was not passed in. Process it as a path. */ 812 809 case -1: 813 strcat(bkpinfo->include_paths, token); 814 strcat(bkpinfo->include_paths, " "); 810 mr_strcat(bkpinfo->include_paths, " %s ", token); 815 811 break; 816 812 } 817 813 mr_free(token); 818 814 } 819 log_msg(1, "include_paths is now '%s'", bkpinfo->include_paths); 815 if (bkpinfo->include_paths != NULL) { 816 log_msg(1, "include_paths is now '%s'", bkpinfo->include_paths); 817 } 820 818 if (bkpinfo->exclude_paths != NULL) { 821 819 log_msg(1, "exclude_paths is now '%s'", bkpinfo->exclude_paths); … … 838 836 } 839 837 bkpinfo->make_filelist = FALSE; 840 strcpy(bkpinfo->include_paths, flag_val['J']); 838 mr_asprintf(&p, "%s", flag_val['J']); 839 bkpinfo->include_paths = p; 841 840 } 842 841 -
branches/2.2.10/mondo/src/common/libmondo-devices.c
r2318 r2319 1927 1927 } 1928 1928 bkpinfo->boot_loader = i; 1929 strcpy(bkpinfo->include_paths, "/"); 1929 mr_free(bkpinfo->include_paths); 1930 mr_asprintf(&p, "/"); 1931 bkpinfo->include_paths = p; 1932 1930 1933 p = popup_and_get_string("Backup paths", "Please enter paths which you want me to backup. The default is '/' (i.e. everything).", bkpinfo->include_paths); 1931 1934 if (p == NULL) { … … 1933 1936 finish(1); 1934 1937 } 1935 strcpy(bkpinfo->include_paths, p);1936 mr_free(p);1938 mr_free(bkpinfo->include_paths); 1939 bkpinfo->include_paths = p; 1937 1940 1938 1941 mr_asprintf(&tmp, "%s", list_of_NFS_mounts_only()); -
branches/2.2.10/mondo/src/common/libmondo-tools.c
r2318 r2319 417 417 char *cdr_exe; 418 418 char *tmp = NULL; 419 char *p = NULL; 419 420 char call_before_iso_user[MAX_STR_LEN] = "\0"; 420 421 /* … … 683 684 retval++; 684 685 } 685 if (bkpinfo->include_paths [0] == '\0') {686 // fatal_error ("Why no backup path?");687 strcpy(bkpinfo->include_paths, "/");686 if (bkpinfo->include_paths == NULL) { 687 mr_asprintf(&p, "/"); 688 bkpinfo->include_paths = p; 688 689 } 689 690 chmod(bkpinfo->scratchdir, 0700); … … 811 812 812 813 bkpinfo->optimal_set_size = 0; 813 strcpy(bkpinfo->include_paths, "/");814 814 bkpinfo->make_filelist = TRUE; // unless -J supplied to mondoarchive 815 bkpinfo->include_paths[0] = '\0';816 815 bkpinfo->restore_path[0] = '\0'; 817 816 bkpinfo->call_before_iso[0] = '\0'; … … 823 822 bkpinfo->nfs_user = NULL; 824 823 bkpinfo->exclude_paths = NULL; 824 bkpinfo->include_paths = NULL; 825 825 bkpinfo->nfs_remote_dir[0] = '\0'; 826 826 bkpinfo->postnuke_tarball[0] = '\0'; -
branches/2.2.10/mondo/src/common/newt-specific.c
r2318 r2319 442 442 mr_free(bkpinfo->nfs_user); 443 443 mr_free(bkpinfo->exclude_paths); 444 mr_free(bkpinfo->include_paths); 444 445 445 446 /* Then free the structure */
Note:
See TracChangeset
for help on using the changeset viewer.