Ignore:
Timestamp:
Mar 10, 2024, 12:46:53 AM (3 months ago)
Author:
Bruno Cornec
Message:

More cleanup

  • Remove support for cd stream never really tested/useful/... (-C option removed for mondoarchive)
  • Remove dvdrecord specificities as obsolete
  • Remove types cdr and dvd to keep a single optical
  • Remove cdrw_speed param as obsolete now it's automatically detected
  • mondoarchive -c has no parameter anymore
  • Remove some useless global variables
  • Replaces some remaining /mnt/cdrom values by the define MNT_CDROM
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.3/mondo/src/mondorestore/mondo-rstr-compare.c

    r3879 r3882  
    555555
    556556/**
    557  * Compare all data on a cdstream-based backup.
    558  * @param bkpinfo The backup information structure. Fields used:
    559  * - @c bkpinfo->disaster_recovery
    560  * - @c bkpinfo->media_device
    561  * - @c bkpinfo->restore_path
    562  * @return 0 for success, nonzero for failure.
    563  */
    564 int compare_to_cdstream()
    565 {
    566     int res;
    567 
    568   /** needs malloc **/
    569     char *dir;
    570     char *command = NULL;
    571 
    572     assert(bkpinfo != NULL);
    573     malloc_string(dir);
    574     if (getcwd(dir, MAX_STR_LEN)) {
    575         // FIXME
    576     }
    577     if (chdir(bkpinfo->restore_path)) {
    578         // FIXME
    579     }
    580 
    581     mr_asprintf(command, "cp -f /tmp/LAST-FILELIST-NUMBER %s/tmp", bkpinfo->restore_path);
    582     run_program_and_log_output(command, FALSE);
    583     mr_free(command);
    584     mvaddstr_and_log_it(g_currentY, 0, "Verifying archives against filesystem");
    585 
    586     if (bkpinfo->disaster_recovery
    587         && does_file_exist("/tmp/CDROM-LIVES-HERE")) {
    588         mr_asprintf(bkpinfo->media_device, "%s", last_line_of_file("/tmp/CDROM-LIVES-HERE"));
    589     } else {
    590         bkpinfo->media_device = find_optical_device();
    591     }
    592     res = verify_tape_backups();
    593     if (chdir(dir)) {
    594         // FIXME
    595     }
    596     if (length_of_file(MONDO_CACHE"/changed.txt") > 2
    597         && length_of_file(MONDO_CACHE"/changed.files") > 2) {
    598         log_msg(0,
    599                 "Type 'less "MONDO_CACHE"/changed.files' to see which files don't match the archives");
    600         log_msg(2, "Calling popup_changelist_from_file()");
    601         popup_changelist_from_file(MONDO_CACHE"/changed.files");
    602         log_msg(2, "Returned from popup_changelist_from_file()");
    603     }
    604 
    605     mvaddstr_and_log_it(g_currentY++, 74, "Done.");
    606     paranoid_free(dir);
    607     return (res);
    608 }
    609 
    610 /**************************************************************************
    611  *END_COMPARE_CD_STREAM                                                   *
    612  **************************************************************************/
    613 
    614 
    615 
    616 /**
    617557 * Compare all data in the user's backup.
    618558 * This function will mount filesystems, compare afioballs and biggiefiles,
     
    682622        || bkpinfo->backup_media_type == udev) {
    683623        retval += compare_to_tape();
    684     } else if (bkpinfo->backup_media_type == cdstream) {
    685         retval += compare_to_cdstream();
    686624    } else {
    687625        retval += compare_to_CD();
Note: See TracChangeset for help on using the changeset viewer.