Ignore:
Timestamp:
Apr 30, 2007, 1:50:20 AM (13 years ago)
Author:
Bruno Cornec
Message:

MAX_NOOF_MEDIA is gone and media_size in bkpinfo struct is now a single long field and not an array anymore

File:
1 edited

Legend:

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

    r1326 r1365  
    600600
    601601    if (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) {
    602         mr_asprintf(&tape_size_sz, "%ld", bkpinfo->media_size[1]);
     602        mr_asprintf(&tape_size_sz, "%ld", bkpinfo->media_size);
    603603        mr_asprintf(&tape_device, bkpinfo->media_device);
    604604    } else {
     
    843843        mr_fprintf(fd, "mindi_tape_device=%s\n", bkpinfo->media_device);
    844844        mr_fprintf(fd1, "media-dev=%s\n", bkpinfo->media_device);
    845         mr_fprintf(fd1, "media-size=%ld\n", bkpinfo->media_size[1]);
     845        mr_fprintf(fd1, "media-size=%ld\n", bkpinfo->media_size);
    846846    }
    847847    if (bkpinfo->compression_level > 0) {
     
    25402540    va_end(ap);
    25412541
    2542     if (bkpinfo->media_size[g_current_media_number] <= 0) {
     2542    if (bkpinfo->media_size <= 0L) {
    25432543        fatal_error("move_files_to_cd() - unknown media size");
    25442544    }
    2545     if (would_occupy / 1024 > bkpinfo->media_size[g_current_media_number]) {
     2545    if (would_occupy / 1024 > bkpinfo->media_size) {
    25462546        /* FALSE because this is not the last CD we'll write */
    25472547        res = write_iso_and_go_on(bkpinfo, FALSE);
     
    35703570    assert(bkpinfo != NULL);
    35713571    orig_vfy_flag_val = bkpinfo->verify_data;
    3572     if (bkpinfo->media_size[g_current_media_number] <= 0) {
     3572    if (bkpinfo->media_size <= 0L) {
    35733573        fatal_error("write_iso_and_go_on() - unknown media size");
    35743574    }
     
    36143614    mr_free(lastcd_fname);
    36153615
    3616     if (space_occupied_by_cd(bkpinfo->scratchdir) / 1024 >
    3617         bkpinfo->media_size[g_current_media_number]) {
     3616    if (space_occupied_by_cd(bkpinfo->scratchdir) / 1024 > bkpinfo->media_size) {
    36183617        mr_asprintf(&tmp,
    36193618                "Warning! %s is too big. It occupies %ld KB, which is more than the %ld KB allowed.",
    36203619                media_descriptor_string(bkpinfo->backup_media_type),
    36213620                (long) space_occupied_by_cd(bkpinfo->scratchdir),
    3622                 (long) bkpinfo->media_size[g_current_media_number]);
     3621                bkpinfo->media_size);
    36233622        log_to_screen(tmp);
    36243623        mr_free(tmp);
     
    36793678
    36803679    g_current_media_number++;
    3681     if (g_current_media_number > MAX_NOOF_MEDIA) {
    3682         fatal_error("Too many CD-R(W)'s. Use tape or net.");
    3683     }
    36843680    wipe_archives(bkpinfo->scratchdir);
    36853681    mr_asprintf(&tmp, "rm -Rf %s/images/*gz %s/images/*data*img",
Note: See TracChangeset for help on using the changeset viewer.