Ignore:
Timestamp:
Jun 26, 2006, 1:12:48 PM (18 years ago)
Author:
bcornec
Message:

Attempt to fix Bug #7820 Does not backup a file greater than 2 GB
Report from taps23@…
Changed legnth_of_file to off_t for ftello support and all relative changes made as well in various functions to be consistent

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mondo/mondo/common/libmondo-archive.c

    r681 r684  
    13641364    mvaddstr_and_log_it(g_currentY++, 74, "Done.");
    13651365    if (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) {
    1366         write_header_block_to_stream(0, "start-of-tape",
     1366        write_header_block_to_stream((off_t)0, "start-of-tape",
    13671367                                     BLK_START_OF_TAPE);
    1368         write_header_block_to_stream(0, "start-of-backup",
     1368        write_header_block_to_stream((off_t)0, "start-of-backup",
    13691369                                     BLK_START_OF_BACKUP);
    13701370    }
     
    21752175    bool delete_when_done;
    21762176    bool use_ntfsprog;
    2177     /*@ long long ****************************************** */
    2178     long long biggie_fsize;
     2177    off_t biggie_fsize;
    21792178
    21802179    assert(bkpinfo != NULL);
     
    22742273                                  noof_biggie_files, use_ntfsprog);
    22752274            if (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) {
    2276                 write_header_block_to_stream(0,
     2275                write_header_block_to_stream((off_t)0,
    22772276                                             calc_checksum_of_file
    22782277                                             (bigfile_fname),
     
    24612460
    24622461    if (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) {
    2463         write_header_block_to_stream(0, "start-of-afioballs",
     2462        write_header_block_to_stream((off_t)0, "start-of-afioballs",
    24642463                                     BLK_START_AFIOBALLS);
    24652464#if __FreeBSD__ == 5
     
    24702469        res = make_afioballs_and_images_OLD(bkpinfo);
    24712470#endif
    2472         write_header_block_to_stream(0, "stop-afioballs",
     2471        write_header_block_to_stream((off_t)0, "stop-afioballs",
    24732472                                     BLK_STOP_AFIOBALLS);
    24742473    } else {
     
    25432542        res += write_EXAT_files_to_tape(bkpinfo, xattr_fname, acl_fname);
    25442543        sprintf(blah, "%ld", count_lines_in_file(biggielist));
    2545         write_header_block_to_stream(0, blah, BLK_START_BIGGIEFILES);
     2544        write_header_block_to_stream((off_t)0, blah, BLK_START_BIGGIEFILES);
    25462545    }
    25472546    res = make_slices_and_images(bkpinfo, biggielist);
    25482547    if (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) {
    2549         write_header_block_to_stream(0, "end-of-biggiefiles",
     2548        write_header_block_to_stream((off_t)0, "end-of-biggiefiles",
    25502549                                     BLK_STOP_BIGGIEFILES);
    25512550    }
     
    29312930    char *curr_file, *cf;
    29322931    /*@ long long ****************************************************** */
    2933     long long length_of_incoming_file = 0;
     2932    off_t length_of_incoming_file = (off_t)0;
    29342933    t_archtype type;
    29352934    va_list ap;
     
    29662965        unlink(curr_file);
    29672966/* write closing header */
    2968         write_header_block_to_stream(0, "finished-writing-file", stop_chr);
     2967        write_header_block_to_stream((off_t)0, "finished-writing-file", stop_chr);
    29692968    }
    29702969    va_end(ap);
     
    33063305
    33073306    /*@ long long ************************************************** */
    3308     long long totalread = 0;
    3309     long long totallength = 0;
    3310     long long length;
     3307    off_t totalread = (off_t)0;
     3308    off_t totallength = (off_t)0;
     3309    off_t length;
    33113310
    33123311    /*@ int ******************************************************** */
     
    33603359        strcpy (tmp, call_program_and_get_last_line_of_output(command));
    33613360        log_it("res of it = %s", tmp);
    3362         totallength = atoll(tmp);
     3361        totallength = (off_t)atoll(tmp);
    33633362    } else {
    33643363        file_to_openin = biggie_filename;
Note: See TracChangeset for help on using the changeset viewer.