Changeset 1043 in MondoRescue for trunk/mondo/src/common
- Timestamp:
- Jan 8, 2007, 11:31:22 PM (17 years ago)
- Location:
- trunk/mondo/src/common
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mondo/src/common/libmondo-archive.c
r962 r1043 546 546 char *command = NULL; 547 547 char *use_lzo_sz = NULL; 548 char *use_gzip_sz = NULL; 548 549 char *use_comp_sz = NULL; 549 550 char *use_star_sz = NULL; … … 607 608 } else { 608 609 mr_asprintf(&use_lzo_sz, "no"); 610 } 611 if (bkpinfo->use_gzip) { 612 mr_asprintf(&use_gzip_sz, "yes"); 613 } else { 614 mr_asprintf(&use_gzip_sz, "no"); 609 615 } 610 616 if (bkpinfo->use_star) { … … 861 867 "mindi --custom %s %s/images '%s' '%s' \ 862 868 '%s' %ld '%s' '%s' '%s' \ 863 '%s' %s %ld '%s' '%s' '%s' '%s' %ld %d %s", bkpinfo->tmpdir, // parameter #2869 '%s' %s %ld '%s' '%s' '%s' '%s' %ld %d '%s'", bkpinfo->tmpdir, // parameter #2 864 870 bkpinfo->scratchdir, // parameter #3 865 871 bkpinfo->kernel_path, // parameter #4 … … 879 885 bkpinfo->internal_tape_block_size, // parameter #18 (LONG) 880 886 bkpinfo->differential, // parameter #19 (INT) 887 use_gzip_sz, // parameter #20 (STRING) 881 888 tmp); 882 889 mr_free(tmp); … … 891 898 mr_free(devs_to_exclude); 892 899 mr_free(use_lilo_sz); 900 mr_free(use_gzip_sz); 893 901 894 902 log_msg(2, command); -
trunk/mondo/src/common/libmondo-filelist.c
r991 r1043 428 428 char *syscall; 429 429 char *file_to_analyze = NULL; 430 char *strtmp = NULL; 430 431 int i; 431 432 size_t n = 0; … … 452 453 log_msg(8, "Analyzing %s", file_to_analyze); 453 454 /* BERLIOS : to be checked */ 454 mr_asprintf(&syscall, "%s %s 2>> /dev/null", syscall_sprintf,mr_stresc(file_to_analyze, "`$\\\"", '\\')); 455 mr_asprintf(&strtmp, syscall_sprintf, mr_stresc(file_to_analyze, "`$\\\"", '\\')); 456 mr_asprintf(&syscall, "%s 2>> /dev/null", strtmp); 457 paranoid_free(strtmp); 455 458 call_exe_and_pipe_output_to_fd(syscall, pout); 456 459 mr_free(syscall); -
trunk/mondo/src/common/libmondo-files.c
r903 r1043 1205 1205 if (bkpinfo->use_lzo) { 1206 1206 scratchLL = (scratchLL * 2) / 3; 1207 } else if (bkpinfo->use_gzip) { 1208 scratchLL = (scratchLL * 2) / 3; 1207 1209 } else { 1208 1210 scratchLL = scratchLL / 2; -
trunk/mondo/src/common/libmondo-tools.c
r1000 r1043 431 431 mr_allocstr(bkpinfo->zip_exe, "lzop"); 432 432 mr_allocstr(bkpinfo->zip_suffix, "lzo"); 433 } else if (bkpinfo->use_gzip) { 434 strcpy(bkpinfo->zip_exe, "gzip"); 435 strcpy(bkpinfo->zip_suffix, "gz"); 436 } else if (bkpinfo->use_gzip) { 437 strcpy(bkpinfo->zip_exe, "gzip"); 438 strcpy(bkpinfo->zip_suffix, "gz"); 433 439 } else if (bkpinfo->compression_level != 0) { 434 440 mr_allocstr(bkpinfo->zip_exe, "bzip2"); … … 753 759 mr_free(bkpinfo->restore_path); 754 760 bkpinfo->use_lzo = FALSE; 761 bkpinfo->use_gzip = FALSE; 762 bkpinfo->do_not_compress_these[0] = '\0'; 755 763 bkpinfo->verify_data = FALSE; 756 764 bkpinfo->backup_data = FALSE; … … 909 917 } 910 918 retval += whine_if_not_found("bzip2"); 919 retval += whine_if_not_found("gzip"); 911 920 retval += whine_if_not_found("awk"); 912 921 retval += whine_if_not_found("md5sum"); -
trunk/mondo/src/common/libmondo-verify.c
r956 r1043 238 238 if (bkpinfo->use_lzo) { 239 239 mr_asprintf(&sz_exe, "lzop"); 240 else if (bkpinfo->use_gzip) { 241 strcpy(sz_exe, "gzip"); 242 } else if (bkpinfo->use_gzip) { 243 strcpy(sz_exe, "gzip"); 240 244 } else { 241 245 mr_asprintf(&sz_exe, "bzip2"); … … 409 413 mr_allocstr(bkpinfo->zip_suffix, "lzo"); 410 414 bkpinfo->use_lzo = TRUE; 415 bkpinfo->use_gzip = FALSE; 416 } 417 if (strstr(tarball_fname, ".gz") 418 && strcmp(bkpinfo->zip_suffix, "gz")) { 419 log_msg(2, "OK, I'm going to start using gzip."); 420 strcpy(bkpinfo->zip_exe, "gzip"); 421 strcpy(bkpinfo->zip_suffix, "gz"); 422 bkpinfo->use_lzo = FALSE; 423 bkpinfo->use_gzip = TRUE; 411 424 } 412 425 if (strstr(tarball_fname, ".bz2") … … 416 429 mr_allocstr(bkpinfo->zip_suffix, "bz2"); 417 430 bkpinfo->use_lzo = FALSE; 431 bkpinfo->use_gzip = FALSE; 418 432 } 419 433 unlink(outlog); -
trunk/mondo/src/common/mondostructures.h
r900 r1043 387 387 */ 388 388 bool use_lzo; 389 390 /** 391 * If TRUE, then use @c gzip to compress data. 392 * This is used mainly in estimates. The backup/restore may or may 393 * not work if you do not set this. You should also set @p zip_exe 394 * and @p zip_suffix. 395 */ 396 bool use_gzip; 397 398 /** 399 * A filename containing a list of extensions, one per line, to not 400 * compress. If this is set to "", afio will still exclude a set of well-known 401 * compressed files from compression, but biggiefiles that are compressed 402 * will be recompressed again. 403 */ 404 char do_not_compress_these[MAX_STR_LEN / 2]; 389 405 390 406 /**
Note:
See TracChangeset
for help on using the changeset viewer.