Changeset 3882 in MondoRescue for branches/3.3/mondo/src/common/libmondo-devices.c
- Timestamp:
- Mar 10, 2024, 12:46:53 AM (4 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3/mondo/src/common/libmondo-devices.c
r3881 r3882 715 715 mr_asprintf(output, "%s", "optical"); 716 716 break; 717 case cdstream:718 mr_asprintf(output, "%s", "cdstream");719 break;720 717 case netfs: 721 718 mr_asprintf(output, "%s", "netfs"); … … 2058 2055 } 2059 2056 2060 bkpinfo->compression_level = (bkpinfo->backup_media_type == cdstream) ? 1 :5;2057 bkpinfo->compression_level = 5; 2061 2058 if ((bkpinfo->compression_level = which_compression_level()) == -1) { 2062 2059 log_to_screen("User has chosen not to backup the machine"); 2063 2060 finish(1); 2064 2061 } 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; 2067 2063 } 2068 2064 mvaddstr_and_log_it(2, 0, " "); … … 2096 2092 2097 2093 if (archiving_to_media) { 2098 if (bkpinfo->backup_media_type == dvd) { 2099 strcpy(tmp1, "1"); 2094 if (bkpinfo->backup_media_type == optical) { 2100 2095 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"); 2102 2097 } 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 2120 2101 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) { 2122 2104 log_to_screen("User has chosen not to backup the machine"); 2123 2105 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); 2128 2110 if (bkpinfo->media_size <= 0) { 2129 2111 log_to_screen("User has chosen not to backup the machine"); … … 2131 2113 } 2132 2114 } 2133 /* No break because we continue even for usb */2134 case cdstream:2135 2115 2136 2116 // If media_device not found ask … … 2166 2146 } 2167 2147 mr_free(mds); 2168 2169 if (bkpinfo->backup_media_type == cdstream) {2170 bkpinfo->media_size = 650;2171 }2172 2148 break; 2149 2173 2150 case udev: 2174 2151 if (!ask_me_yes_or_no
Note:
See TracChangeset
for help on using the changeset viewer.