Changeset 146 in MondoRescue for trunk/mondo/mondo/common/libmondo-stream.c
- Timestamp:
- Dec 1, 2005, 10:00:14 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mondo/mondo/common/libmondo-stream.c
r127 r146 209 209 * this platform, then the IDE tape, then "/dev/st0", then "/dev/osst0". 210 210 * @param dev Where to put the found tape device. 211 * @param siz Where to put the tape size (a string like "4GB") 211 * @param siz Where to put the tape size (a string like "4GB"). Should be freed by caller 212 212 * @return 0 if success, nonzero if failure (in which @p dev and @p siz are undefined). 213 213 */ … … 220 220 221 221 log_to_screen("I am looking for your tape streamer. Please wait."); 222 dev[0] = siz[0] = '\0'; 222 dev[0] = '\0'; 223 siz = NULL; 223 224 if (find_home_of_exe("cdrecord")) { 224 225 asprintf(&cdr_exe, "cdrecord"); … … 235 236 ("Either too few or too many tape streamers for me to detect..."); 236 237 strcpy(dev, VANILLA_SCSI_TAPE); 238 paranoid_free(tmp); 239 paranoid_free(cdr_exe); 237 240 return 1; 238 241 } … … 246 249 if (strlen(tmp) < 2) { 247 250 log_it("Could not find tape device"); 251 paranoid_free(tmp); 252 paranoid_free(cdr_exe); 248 253 return 1; 249 254 } … … 303 308 } 304 309 305 siz[0] = '\0';306 310 log_it("res=%d; dev=%s", res, dev); 307 311 308 312 if (res) { 313 paranoid_free(tmp); 309 314 return (res); 310 315 } 311 316 312 317 if (strlen(tmp) < 2) { 313 siz[0] = '\0';314 318 log_it("Warning - size of tape unknown"); 319 paranoid_free(tmp); 315 320 return (0); 316 321 } else { 317 s trcpy(siz, tmp);322 siz = tmp; 318 323 return (0); 319 324 } 320 paranoid_free(tmp);321 325 } 322 326
Note:
See TracChangeset
for help on using the changeset viewer.