Ignore:
Timestamp:
Mar 10, 2024, 12:46:53 AM (4 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/common/libmondo-devices.c

    r3881 r3882  
    715715        mr_asprintf(output, "%s", "optical");
    716716        break;
    717     case cdstream:
    718         mr_asprintf(output, "%s", "cdstream");
    719         break;
    720717    case netfs:
    721718        mr_asprintf(output, "%s", "netfs");
     
    20582055        }
    20592056
    2060         bkpinfo->compression_level = (bkpinfo->backup_media_type == cdstream) ? 1 : 5;
     2057        bkpinfo->compression_level = 5;
    20612058        if ((bkpinfo->compression_level = which_compression_level()) == -1) {
    20622059            log_to_screen("User has chosen not to backup the machine");
    20632060            finish(1);
    20642061        }
    2065         bkpinfo->cdrw_speed = (bkpinfo->backup_media_type == cdstream) ? 2 : 4;
    2066         bkpinfo->use_lzo = (bkpinfo->backup_media_type == cdstream) ? TRUE : FALSE;
     2062        bkpinfo->use_lzo = FALSE;
    20672063    }
    20682064    mvaddstr_and_log_it(2, 0, " ");
     
    20962092
    20972093        if (archiving_to_media) {
    2098             if (bkpinfo->backup_media_type == dvd) {
    2099                 strcpy(tmp1, "1");
     2094            if (bkpinfo->backup_media_type == optical) {
    21002095                mr_asprintf(sz_size, "%d", DEFAULT_DVD_DISK_SIZE);  // 4.7 salesman's GB = 4.482 real GB = 4482 MB
    2101                 log_msg(1, "Setting to DVD defaults");
     2096                log_msg(1, "Setting to DVD defaults ~4.4GB");
    21022097            } else {
    2103                 strcpy(tmp1, "4");
    2104                 mr_asprintf(sz_size, "%d", 650);
    2105                 log_msg(1, "Setting to CD defaults");
    2106             }
    2107 
    2108             mr_asprintf(comment, "What speed is your %s writer?", mds);
    2109             if ((bkpinfo->backup_media_type != dvd) && (bkpinfo->backup_media_type != usb)) {
    2110                 if (!popup_and_get_string("Speed", comment, tmp1, 4)) {
    2111                     log_to_screen("User has chosen not to backup the machine");
    2112                     mr_free(comment);
    2113                     finish(1);
    2114                 }
    2115             }
    2116             mr_free(comment);
    2117             bkpinfo->cdrw_speed = atoi(tmp1);   // if DVD then this shouldn't ever be used anyway :)
    2118 
    2119             strcpy(tmp1, sz_size);
     2098                mr_asprintf(sz_size, "%d", 0);  // No value for USB
     2099            }
     2100
    21202101            mr_asprintf(comment, "How much data (in Megabytes) will each %s store?", mds);
    2121             if (!popup_and_get_string("Size", comment, tmp1, 5)) {
     2102            tmp1 = popup_and_get_string("Size", comment, sz_size, 5)) {
     2103            if (!tmp1) {
    21222104                log_to_screen("User has chosen not to backup the machine");
    21232105                finish(1);
    2124             }
    2125             mr_asprintf(sz_size, "%s", tmp1);
    2126             bkpinfo->media_size = atoi(sz_size);
    2127 
     2106            } else {
     2107                bkpinfo->media_size = atoi(tmp1);
     2108            }
     2109            mr_free(tmp1);
    21282110            if (bkpinfo->media_size <= 0) {
    21292111                log_to_screen("User has chosen not to backup the machine");
     
    21312113            }
    21322114        }
    2133         /* No break because we continue even for usb */
    2134     case cdstream:
    21352115
    21362116        // If media_device not found ask
     
    21662146        }
    21672147        mr_free(mds);
    2168 
    2169         if (bkpinfo->backup_media_type == cdstream) {
    2170             bkpinfo->media_size = 650;
    2171         }
    21722148        break;
     2149
    21732150    case udev:
    21742151        if (!ask_me_yes_or_no
Note: See TracChangeset for help on using the changeset viewer.