Changeset 2324 in MondoRescue for branches/2.2.10/mondo/src/common/libmondo-tools.c
- Timestamp:
- Aug 18, 2009, 3:13:54 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mondo/src/common/libmondo-tools.c
r2323 r2324 828 828 bkpinfo->disaster_recovery = (am_I_in_disaster_recovery_mode()? TRUE : FALSE); 829 829 if (bkpinfo->disaster_recovery) { 830 mr_asprintf( p, "%s", "/");830 mr_asprintf(bkpinfo->isodir, "%s", "/"); 831 831 } else { 832 mr_asprintf(p, "%s", MONDO_CACHE); 833 } 834 bkpinfo->isodir = p; 835 mr_asprintf(p, "%s", STD_PREFIX); 836 bkpinfo->prefix = p; 837 bkpinfo->scratchdir = NULL; 838 bkpinfo->tmpdir = NULL; 832 mr_asprintf(bkpinfo->isodir, "%s", MONDO_CACHE); 833 } 834 mr_asprintf(bkpinfo->prefix, "%s", STD_PREFIX); 835 bkpinfo->scratchdir = NULL; // Really setup after 836 bkpinfo->tmpdir = NULL; // Really setup after 839 837 bkpinfo->optimal_set_size = 0; 840 838 bkpinfo->backup_media_type = none; … … 889 887 mr_free(command); 890 888 891 mr_asprintf(command, "df -m -P %s | tail -n1 | tr -s ' ' '\t' | cut -f4", 892 partition); 889 mr_asprintf(command, "df -m -P %s | tail -n1 | tr -s ' ' '\t' | cut -f4", partition); 893 890 mr_asprintf(out_sz, "%s", call_program_and_get_last_line_of_output(command)); 894 891 mr_free(command); … … 941 938 } 942 939 if (atol(tmp) < 66000) { 943 log_to_screen 944 ("WARNING! You have very little RAM. Please upgrade to 64MB or more."); 940 log_to_screen("WARNING! You have very little RAM. Please upgrade to 64MB or more."); 945 941 } 946 942 mr_free(tmp); … … 1080 1076 /*@ buffer ****************************************************** */ 1081 1077 char *command = NULL; 1082 char *tmp = NULL;1083 1078 1084 1079 /*@ end vars *************************************************** */ … … 1087 1082 assert_string_is_neither_NULL_nor_zerolength(label); 1088 1083 if (!does_file_exist(config_file)) { 1089 mr_asprintf(tmp, "(read_cfg_var) Cannot find %s config file", config_file); 1090 log_to_screen(tmp); 1091 mr_free(tmp); 1092 1084 log_to_screen("(read_cfg_var) Cannot find %s config file", config_file); 1093 1085 value[0] = '\0'; 1094 1086 return (1); … … 1252 1244 strcpy(g_boot_mountpt, tmp); 1253 1245 mr_free(tmp); 1254 mr_asprintf(tmp, "%s (your /boot partition) is not mounted. I'll mount it before backing up", g_boot_mountpt); 1255 log_it(tmp); 1256 mr_free(tmp); 1246 log_it("%s (your /boot partition) is not mounted. I'll mount it before backing up", g_boot_mountpt); 1257 1247 1258 1248 mr_asprintf(tmp, "mount %s", g_boot_mountpt); … … 1311 1301 char *command = NULL; 1312 1302 char *tempfile = NULL; 1313 char *tmp = NULL;1314 1303 1315 1304 … … 1319 1308 assert(value != NULL); 1320 1309 if (!does_file_exist(config_file)) { 1321 mr_asprintf(tmp, "(write_cfg_file) Cannot find %s config file", config_file); 1322 log_to_screen(tmp); 1323 mr_free(tmp); 1310 log_to_screen("(write_cfg_file) Cannot find %s config file", config_file); 1324 1311 return (1); 1325 1312 }
Note:
See TracChangeset
for help on using the changeset viewer.