Changeset 3351


Ignore:
Timestamp:
Feb 27, 2015, 3:18:42 PM (5 years ago)
Author:
Bruno Cornec
Message:
  • Fix #768 by canceling changes done in the loop computing number of slices, back to long instead of a new int.
Location:
branches/3.2/mondo/src/common
Files:
2 edited

Legend:

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

    r3347 r3351  
    402402    assert(bkpinfo != NULL);
    403403    set_g_cdrom_and_g_dvd_to_bkpinfo_value();
     404
    404405    if (bkpinfo->backup_media_type == dvd) {
    405406#ifdef DVDRWFORMAT
     
    437438
    438439    copy_mondo_and_mindi_stuff_to_scratchdir(); // payload, too, if it exists
    439 #if __FreeBSD__ == 5
    440     strcpy(bkpinfo->kernel_path, "/boot/kernel/kernel");
    441 #elif __FreeBSD__ == 4
    442     strcpy(bkpinfo->kernel_path, "/kernel");
    443 #elif linux
    444     if (figure_out_kernel_path_interactively_if_necessary
    445         (bkpinfo->kernel_path)) {
    446         fatal_error
    447             ("Kernel not found. Please specify manually with the '-k' switch.");
    448     }
    449 #else
    450 #error "I don't know about this system!"
    451 #endif
    452440    if ((res = call_mindi_to_supply_boot_disks())) {
    453441        fatal_error("Failed to generate boot+data disks");
     
    19671955    log_to_screen(tmp);
    19681956    noof_biggie_files = count_lines_in_file(biggielist_fname);
     1957    log_msg(1, "noof_biggie_files = %ld", noof_biggie_files);
    19691958    open_progress_form("Backing up big files", tmp, "Please wait. This may take some time.", "", estimated_total_noof_slices);
    19701959    mr_free(tmp);
     
    27802769    long slice_num = 0L;
    27812770    long i = 0L;
    2782     int j = 0;
    27832771    bool should_I_compress_slices = TRUE;
    27842772    char *suffix = NULL;                // for compressed slices
     
    28992887            return (1);
    29002888        }
    2901         if ((i == bkpinfo->optimal_set_size / 256L) && (totalread < 1.1 * totallength)) {
    2902             for (j = 0; j < (int) (bkpinfo->optimal_set_size / 256); j++) {
     2889        if ((i == bkpinfo->optimal_set_size / 256L) && (totalread < (off_t)1.1 * totallength)) {
     2890            for (i = 0L; i < (bkpinfo->optimal_set_size / 256L); i++) {
    29032891                blksize = fread(tempblock, 1, 256 * 1024, fin);
    2904                 if (blksize > 0) {
    2905                     totalread = totalread + blksize;
     2892                if (blksize > (size_t)0) {
     2893                    totalread = totalread + (off_t)blksize;
    29062894                    res = fwrite(tempblock, 1, blksize, fout);
    29072895                } else {
     
    29092897                }
    29102898            }
    2911             mr_free(tempblock);
    29122899        } else {
    29132900            i = 0L;
     
    29562943            g_current_progress++;
    29572944        } else {                /* if i==0 then ... */
    2958 
    29592945            finished = TRUE;
    29602946            mr_asprintf(file_to_archive, "%s", curr_slice_fname_uncompressed);
     
    29812967        }
    29822968    }
     2969    mr_free(tempblock);
    29832970    mr_free(suffix);
    29842971    paranoid_fclose(fin);
  • branches/3.2/mondo/src/common/libmondo-cli.c

    r3342 r3351  
    408408            mr_free(bkpinfo->netfs_remote_dir);
    409409            mr_asprintf(bkpinfo->netfs_remote_dir, "/");
     410            strncpy(bkpinfo->isodir, ".", MAX_STR_LEN / 4);
    410411        }
    411412        /* test for protocol */
     
    461462        mr_free(tmp1);
    462463
     464        log_msg(3, "proto = %s", bkpinfo->netfs_proto);
     465        log_msg(3, "mount = %s", bkpinfo->netfs_mount);
     466        if (bkpinfo->netfs_user) {
     467            log_msg(3, "user = %s", bkpinfo->netfs_user);
     468        }
     469        log_msg(3, "isodir= %s", bkpinfo->isodir);
     470
    463471        if (strlen(bkpinfo->isodir) < 3) {
    464             log_to_screen("Network share is not mounted. Trying to mount it for you.\n");
     472            log_to_screen("Network share %s is not mounted. Trying to mount it for you.\n",bkpinfo->netfs_mount);
    465473            if (bkpinfo->netfs_user) {
    466474                if (strstr(bkpinfo->netfs_proto, "sshfs")) {
     
    505513            }
    506514        }
    507         log_msg(3, "proto = %s", bkpinfo->netfs_proto);
    508         log_msg(3, "mount = %s", bkpinfo->netfs_mount);
    509         if (bkpinfo->netfs_user) {
    510             log_msg(3, "user = %s", bkpinfo->netfs_user);
    511         }
    512         log_msg(3, "isodir= %s", bkpinfo->isodir);
    513515    }
    514516
Note: See TracChangeset for help on using the changeset viewer.