Changeset 2304 in MondoRescue
- Timestamp:
- Jul 27, 2009, 7:45:10 PM (16 years ago)
- Location:
- branches/2.2.9/mondo/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.9/mondo/src/common/libmondo-devices.c
r2290 r2304 1468 1468 { 1469 1469 char *tmp = NULL; 1470 char *tmp1 = NULL; 1470 1471 char *mds = NULL; 1471 1472 char *sz_size; … … 1480 1481 malloc_string(comment); 1481 1482 malloc_string(prompt); 1483 malloc_string(tmp1); 1482 1484 assert(bkpinfo != NULL); 1483 1485 sz_size[0] = '\0'; … … 1537 1539 if (bkpinfo->backup_media_type == dvd) { 1538 1540 find_dvd_device(bkpinfo->media_device, FALSE); 1539 mr_asprintf(&tmp, "1");1541 strcpy(tmp1, "1"); 1540 1542 sprintf(sz_size, "%d", DEFAULT_DVD_DISK_SIZE); // 4.7 salesman's GB = 4.482 real GB = 4482 MB 1541 1543 log_msg(1, "Setting to DVD defaults"); 1542 1544 } else { 1543 1545 strcpy(bkpinfo->media_device, VANILLA_SCSI_CDROM); 1544 mr_asprintf(&tmp, "4");1546 strcpy(tmp1, "4"); 1545 1547 strcpy(sz_size, "650"); 1546 1548 log_msg(1, "Setting to CD defaults"); 1547 1549 } 1548 1550 if ((bkpinfo->backup_media_type != dvd) && (bkpinfo->backup_media_type != usb)) { 1549 if (!popup_and_get_string("Speed", comment, tmp , 4)) {1551 if (!popup_and_get_string("Speed", comment, tmp1, 4)) { 1550 1552 log_to_screen("User has chosen not to backup the PC"); 1551 1553 finish(1); 1552 1554 } 1553 1555 } 1554 bkpinfo->cdrw_speed = atoi(tmp); // if DVD then this shouldn't ever be used anyway :) 1555 mr_free(tmp); 1556 bkpinfo->cdrw_speed = atoi(tmp1); // if DVD then this shouldn't ever be used anyway :) 1556 1557 1557 1558 sprintf(comment, … … 1814 1815 finish(1); 1815 1816 } 1816 mr_asprintf(&tmp, "%s", bkpinfo->nfs_remote_dir);1817 strcpy(tmp1, bkpinfo->nfs_remote_dir); 1817 1818 if (!popup_and_get_string 1818 ("Directory", "Which directory within that mountpoint?", tmp ,1819 ("Directory", "Which directory within that mountpoint?", tmp1, 1819 1820 MAX_STR_LEN)) { 1820 1821 log_to_screen("User has chosen not to backup the PC"); 1821 1822 finish(1); 1822 1823 } 1823 strcpy(bkpinfo->nfs_remote_dir, tmp); 1824 mr_free(tmp); 1824 strcpy(bkpinfo->nfs_remote_dir, tmp1); 1825 1825 1826 1826 // check whether writable - we better remove surrounding spaces for this … … 1966 1966 mr_free(tmp); 1967 1967 // NTFS 1968 mr_asprintf(&tmp, "%s", call_program_and_get_last_line_of_output("parted2fdisk -l | grep -i ntfs | awk '{ print $1};' | tr -s '\\n' ' ' | awk '{ print $0};'"));1969 if (strlen(tmp ) > 2) {1968 strcpy(tmp1, call_program_and_get_last_line_of_output("parted2fdisk -l | grep -i ntfs | awk '{ print $1};' | tr -s '\\n' ' ' | awk '{ print $0};'")); 1969 if (strlen(tmp1) > 2) { 1970 1970 if (!popup_and_get_string 1971 1971 ("NTFS partitions", 1972 1972 "Please enter/confirm the NTFS partitions you wish to backup as well.", 1973 tmp , MAX_STR_LEN / 4)) {1973 tmp1, MAX_STR_LEN / 4)) { 1974 1974 log_to_screen("User has chosen not to backup the PC"); 1975 1975 finish(1); 1976 1976 } 1977 strncpy(bkpinfo->image_devs, tmp, MAX_STR_LEN / 4); 1978 } 1979 mr_free(tmp); 1977 strncpy(bkpinfo->image_devs, tmp1, MAX_STR_LEN / 4); 1978 } 1980 1979 1981 1980 -
branches/2.2.9/mondo/src/common/libmondo-mountlist.c
r2290 r2304 537 537 } else { 538 538 log_msg(8, "Evaluating drive #%d (%s) within mountlist", i, drivelist->el[i].device); 539 if ((tmp = evaluate_drive_within_mountlist(mountlist, drivelist->el[i].device)) == NULL) { 539 tmp = evaluate_drive_within_mountlist(mountlist, drivelist->el[i].device); 540 if (tmp == NULL) { 540 541 res++; 541 542 } 542 543 } 543 544 log_msg(8,"Entry: %d (%s)", i, drivelist->el[i].device); 544 /* BCO: tmp can be NULL as well as flaws_str*/545 /* BCO: tmp can be NULL */ 545 546 if (tmp != NULL) { 546 547 log_msg(8,"Adding: %s to %s", tmp, flaws_str); -
branches/2.2.9/mondo/src/lib/mr_mem.c
r2241 r2304 141 141 mr_free_int((void **)&fmt2,line,file); 142 142 mr_free_int((void **)in,line,file); 143 *in =p;143 in = &p; 144 144 } 145 145 va_end(args);
Note:
See TracChangeset
for help on using the changeset viewer.