Ignore:
Timestamp:
Jan 11, 2006, 10:10:31 AM (15 years ago)
Author:
andree
Message:

Replaced partimagehack with ntfsclone from ntfsprogs package. Replaced
all occurrences of strings 'partimagehack' and 'partimage' with 'ntfsprog'.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.06/mondo/mondo/common/libmondo-files.c

    r273 r296  
    865865    char *biggielist;
    866866    char *comment;
     867    char *tmp;
     868    char *command;
    867869
    868870    /*@ long ******************************************************** */
     
    878880    malloc_string(biggielist);
    879881    malloc_string(comment);
     882    malloc_string(tmp);
     883    malloc_string(command);
    880884    log_it("Calculating size of all biggiefiles (in total)");
    881885    sprintf(biggielist, "%s/biggielist.txt", bkpinfo->tmpdir);
     
    892896            }
    893897            if (0 == strncmp(fname, "/dev/", 5)) {
    894                 file_len_K = get_phys_size_of_drive(fname) * 1024L;
     898                if (is_dev_an_NTFS_dev(fname)) {
     899                    if ( !find_home_of_exe("ntfsresize")) {
     900                        fatal_error("ntfsresize not found");
     901                    }
     902                    sprintf(command, "ntfsresize --force --info %s|grep '^You might resize at '|cut -d' ' -f5", fname);
     903                    log_it("command = %s", command);
     904                    strcpy (tmp, call_program_and_get_last_line_of_output(command));
     905                    log_it("res of it = %s", tmp);
     906                    file_len_K = atoll(tmp) / 1024L;
     907                } else {
     908                    file_len_K = get_phys_size_of_drive(fname) * 1024L;
     909                }
    895910            } else {
    896911                file_len_K = (long) (length_of_file(fname) / 1024);
     
    915930    paranoid_free(biggielist);
    916931    paranoid_free(comment);
     932    paranoid_free(tmp);
     933    paranoid_free(command);
    917934    return (scratchL);
    918935}
Note: See TracChangeset for help on using the changeset viewer.