Changeset 1164 in MondoRescue
- Timestamp:
- Feb 14, 2007, 9:35:00 PM (18 years ago)
- Location:
- branches/stable/mondo/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mondo/src/common/libmondo-archive.c
r1160 r1164 1234 1234 1235 1235 /*@ buffers *********************************** */ 1236 char *command, *tmp file, *data_disks_file;1236 char *command, *tmp_file, *data_disks_file; 1237 1237 1238 1238 assert(bkpinfo != NULL); … … 1250 1250 assert(strlen(g_serial_string) < MAX_STR_LEN); 1251 1251 1252 mr_asprintf(&tmp file, "%s/archives/SERIAL-STRING", bkpinfo->scratchdir);1253 if (write_one_liner_data_file(tmp file, g_serial_string)) {1252 mr_asprintf(&tmp_file, "%s/archives/SERIAL-STRING", bkpinfo->scratchdir); 1253 if (write_one_liner_data_file(tmp_file, g_serial_string)) { 1254 1254 mr_msg(1, "%ld: Failed to write serial string", __LINE__); 1255 1255 } 1256 mr_free(tmp file);1256 mr_free(tmp_file); 1257 1257 1258 1258 mvaddstr_and_log_it(g_currentY, 0, "Preparing to archive your data"); … … 3203 3203 biggiestruct.use_ntfsprog = use_ntfsprog; 3204 3204 optimal_set_size = bkpinfo->optimal_set_size; 3205 if (is_this_file_compressed(biggie_filename)3206 || bkpinfo->compression_level == 0) {3207 mr_asprintf(&suffix, "");3208 // log_it("%s is indeed compressed :-)", filename);3209 should_I_compress_slices = FALSE;3210 } else {3211 mr_asprintf(&suffix, bkpinfo->zip_suffix);3212 should_I_compress_slices = TRUE;3213 }3214 3205 3215 3206 if (optimal_set_size < 999) { … … 3243 3234 log_OS_error("Unable to popen-in command"); 3244 3235 mr_free(command); 3245 mr_free(suffix);3246 3236 return (1); 3247 3237 } … … 3272 3262 3273 3263 mr_asprintf(&tmp, slice_fname(biggie_file_number, 0, bkpinfo->tmpdir, "")); 3274 fout = fopen(tmp, "w"); 3275 if (fout == NULL) { 3276 mr_msg(1, "Unable to open and write to %s\n", tmp); 3277 mr_free(tmp); 3278 mr_free(suffix); 3279 return (1); 3280 } 3264 fout = mr_fopen(tmp, "w"); 3281 3265 mr_free(tmp); 3282 3266 3283 3267 (void) fwrite((void *) &biggiestruct, 1, sizeof(biggiestruct), fout); 3284 paranoid_fclose(fout);3268 mr_fclose(fout); 3285 3269 length = totallength / optimal_set_size / 1024; 3286 3270 mr_msg(1, "Opening in %s; slicing it and writing to CD/tape", … … 3292 3276 log_to_screen(tmp); 3293 3277 mr_free(tmp); 3294 mr_free(suffix);3295 3278 return (1); 3296 3279 } … … 3305 3288 slice_fname(biggie_file_number, 0, 3306 3289 bkpinfo->tmpdir, ""), NULL); 3290 } 3291 if (is_this_file_compressed(biggie_filename) 3292 || bkpinfo->compression_level == 0) { 3293 mr_asprintf(&suffix, ""); 3294 should_I_compress_slices = FALSE; 3295 } else { 3296 mr_asprintf(&suffix, bkpinfo->zip_suffix); 3297 should_I_compress_slices = TRUE; 3307 3298 } 3308 3299 i = bkpinfo->optimal_set_size / 256; -
branches/stable/mondo/src/common/libmondo-filelist.c
r1162 r1164 686 686 { 687 687 /*@ buffers ***************************************************** */ 688 char *val_sz ;688 char *val_sz = NULL; 689 689 char *cfg_fname = NULL; 690 690 -
branches/stable/mondo/src/common/libmondo-raid-EXT.h
r558 r1164 50 50 #else 51 51 extern void add_disk_to_raid_device(struct list_of_disks *disklist, 52 char *device_to_add, int i ndex);52 char *device_to_add, int idx); 53 53 #endif 54 54 -
branches/stable/mondo/src/include/mr_file.h
r1137 r1164 24 24 extern FILE *mr_fopen_int(const char *path, const char *mode,int line, char *file); 25 25 extern FILE *mr_fprintf_int(FILE *stream,int line, char *file, const char *fmt, ...); 26 extern void mr_fclose_int(FILE * fd, int line, char *file);26 extern void mr_fclose_int(FILE **fd, int line, char *file); 27 27 extern void mr_mkdir_int(const char *pathname, mode_t mode, int line, char *file); 28 28 -
branches/stable/mondo/src/mondoarchive/mondo-cli-EXT.h
r128 r1164 11 11 flag_val[128][MAX_STR_LEN], 12 12 bool flag_set[128]); 13 extern void help_screen( );13 extern void help_screen(void); 14 14 extern void terminate_daemon(int sig); 15 15 extern void set_signals(int on); -
branches/stable/mondo/src/mondoarchive/mondo-cli.c
r1156 r1164 943 943 * Print a not-so-helpful help message and exit. 944 944 */ 945 void help_screen( )945 void help_screen(void) 946 946 { 947 947 mr_msg(1, "Type 'man mondo-archive' for more information\n");
Note:
See TracChangeset
for help on using the changeset viewer.