Changeset 3138 in MondoRescue for branches/3.0/mondo


Ignore:
Timestamp:
Jun 13, 2013, 6:37:24 AM (11 years ago)
Author:
Bruno Cornec
Message:

r5337@localhost: bruno | 2013-06-13 01:56:06 +0200

  • Attempt to realize #700 by adding a CLI parameter to modify the biggie file size limit. By default 64 MB.
  • Also with previous commit, fixes #700 by using blocks, and adapting autoconf to use it as well.
Location:
branches/3.0/mondo
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0/mondo/configure.in

    r3058 r3138  
    122122AC_TYPE_SIZE_T
    123123AC_TYPE_SSIZE_T
     124AC_STRUCT_ST_BLOCKS
    124125
    125126# Checks for library functions.
  • branches/3.0/mondo/src/common/libmondo-cli.c

    r3111 r3138  
    5353
    5454extern void free_MR_global_filenames(void);
     55
     56long g_max_biggie_size = BIGGIEMAXSIZE;
    5557
    5658/**
     
    670672    if (flag_set['e']) {
    671673        bkpinfo->please_dont_eject = TRUE;
     674    }
     675
     676    if (flag_set['M']) {
     677        g_max_biggie_size = atol(flag_val['M']);
     678        log_msg(1, "Max size for biggie file is now %ld KB", g_max_biggie_size);
    672679    }
    673680
  • branches/3.0/mondo/src/common/libmondo-filelist.c

    r3137 r3138  
    3232extern char *MONDO_LOGFILE;
    3333
     34extern long g_max_biggie_size;
     35
    3436/* Reference to global bkpinfo */
    3537extern struct s_bkpinfo *bkpinfo;
     
    199201    long lino = 0;
    200202    // A big file has more than 64 MB of real content
    201     long max_sane_size_for_a_file = 64L * 1024L;
    202203    long curr_set_size;
    203204    long noof_lines;
     
    274275            siz = (long) ((buf.st_blocks*512) >> 10);
    275276        }
    276         if (siz > max_sane_size_for_a_file) {
     277        if (siz > g_max_biggie_size) {
    277278            log_msg(10, "Adding %s to big files\n", incoming);
    278279            fprintf(fbig, "%s\n", incoming);
  • branches/3.0/mondo/src/include/my-stuff.h

    r2943 r3138  
    329329#define ACL_BIGGLST_FNAME_RAW_SZ     "%s/acl_list.big.gz"
    330330
     331#define BIGGIEMAXSIZE           64L*1024L
    331332/**
    332333 * The template for an afioball filename.
  • branches/3.0/mondo/src/mondoarchive/mondoarchive.h

    r1967 r3138  
    99 */
    1010char *MONDO_LOGFILE = "/var/log/mondoarchive.log";
    11 char *MONDO_OPTIONS = "0123456789A:B:C:DE:GHI:J:K:LNOP:QRS:T:UVWb:c:d:ef:gik:l:mn:op:rs:tuw:x:z";
     11char *MONDO_OPTIONS = "0123456789A:B:C:DE:GHI:J:K:LMNOP:QRS:T:UVWb:c:d:ef:gik:l:mn:op:rs:tuw:x:z";
    1212
    1313/* No restriction on ps options */
Note: See TracChangeset for help on using the changeset viewer.