Changeset 2306 in MondoRescue
- Timestamp:
- Jul 27, 2009, 7:50:18 PM (15 years ago)
- Location:
- branches/2.2.10/mondo/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mondo/src/common/libmondo-devices.c
r2303 r2306 1445 1445 { 1446 1446 char *tmp = NULL; 1447 char *tmp1 = NULL; 1447 1448 char *mds = NULL; 1448 1449 char *sz_size = NULL; … … 1455 1456 malloc_string(prompt); 1456 1457 malloc_string(sz_size); 1458 malloc_string(tmp1); 1457 1459 assert(bkpinfo != NULL); 1458 1460 bkpinfo->nonbootable_backup = FALSE; … … 1511 1513 if (bkpinfo->backup_media_type == dvd) { 1512 1514 find_dvd_device(bkpinfo->media_device, FALSE); 1513 mr_asprintf(&tmp, "1");1515 strcpy(tmp1, "1"); 1514 1516 sprintf(sz_size, "%d", DEFAULT_DVD_DISK_SIZE); // 4.7 salesman's GB = 4.482 real GB = 4482 MB 1515 1517 log_msg(1, "Setting to DVD defaults"); 1516 1518 } else { 1517 1519 strcpy(bkpinfo->media_device, VANILLA_SCSI_CDROM); 1518 mr_asprintf(&tmp, "4");1520 strcpy(tmp1, "4"); 1519 1521 sprintf(sz_size, "%d", 650); 1520 1522 log_msg(1, "Setting to CD defaults"); 1521 1523 } 1522 1524 if ((bkpinfo->backup_media_type != dvd) && (bkpinfo->backup_media_type != usb)) { 1523 if (!popup_and_get_string("Speed", comment, tmp , 4)) {1525 if (!popup_and_get_string("Speed", comment, tmp1, 4)) { 1524 1526 log_to_screen("User has chosen not to backup the PC"); 1525 1527 mr_free(comment); … … 1529 1531 mr_free(comment); 1530 1532 1531 bkpinfo->cdrw_speed = atoi(tmp); // if DVD then this shouldn't ever be used anyway :) 1532 mr_free(tmp); 1533 bkpinfo->cdrw_speed = atoi(tmp1); // if DVD then this shouldn't ever be used anyway :) 1533 1534 1534 1535 mr_asprintf(&comment, "How much data (in Megabytes) will each %s store?", mds); … … 1794 1795 finish(1); 1795 1796 } 1796 mr_asprintf(&tmp, "%s", bkpinfo->nfs_remote_dir);1797 strcpy(tmp1, bkpinfo->nfs_remote_dir); 1797 1798 if (!popup_and_get_string 1798 ("Directory", "Which directory within that mountpoint?", tmp ,1799 ("Directory", "Which directory within that mountpoint?", tmp1, 1799 1800 MAX_STR_LEN)) { 1800 1801 log_to_screen("User has chosen not to backup the PC"); 1801 1802 finish(1); 1802 1803 } 1803 strcpy(bkpinfo->nfs_remote_dir, tmp); 1804 mr_free(tmp); 1804 strcpy(bkpinfo->nfs_remote_dir, tmp1); 1805 1805 1806 1806 // check whether writable - we better remove surrounding spaces for this … … 1946 1946 mr_free(tmp); 1947 1947 // NTFS 1948 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};'"));1949 if (strlen(tmp ) > 2) {1948 strcpy(tmp1, call_program_and_get_last_line_of_output("parted2fdisk -l | grep -i ntfs | awk '{ print $1};' | tr -s '\\n' ' ' | awk '{ print $0};'")); 1949 if (strlen(tmp1) > 2) { 1950 1950 if (!popup_and_get_string 1951 1951 ("NTFS partitions", 1952 1952 "Please enter/confirm the NTFS partitions you wish to backup as well.", 1953 tmp , MAX_STR_LEN / 4)) {1953 tmp1, MAX_STR_LEN / 4)) { 1954 1954 log_to_screen("User has chosen not to backup the PC"); 1955 1955 finish(1); 1956 1956 } 1957 strncpy(bkpinfo->image_devs, tmp, MAX_STR_LEN / 4); 1958 } 1959 mr_free(tmp); 1957 strncpy(bkpinfo->image_devs, tmp1, MAX_STR_LEN / 4); 1958 } 1960 1959 1961 1960 … … 2049 2048 } 2050 2049 paranoid_free(sz_size); 2050 paranoid_free(tmp1); 2051 2051 paranoid_free(prompt); 2052 2052 return (0); -
branches/2.2.10/mondo/src/common/libmondo-mountlist.c
r2291 r2306 559 559 } else { 560 560 log_msg(8, "Evaluating drive #%d (%s) within mountlist", i, drivelist->el[i].device); 561 if ((tmp = evaluate_drive_within_mountlist(mountlist, drivelist->el[i].device)) == NULL) { 561 tmp = evaluate_drive_within_mountlist(mountlist, drivelist->el[i].device); 562 if (tmp == NULL) { 562 563 res++; 563 564 } 564 565 } 565 566 log_msg(8,"Entry: %d (%s)", i, drivelist->el[i].device); 566 /* BCO: tmp can be NULL as well as flaws_str*/567 /* BCO: tmp can be NULL */ 567 568 if (tmp != NULL) { 568 569 log_msg(8,"Adding: %s to %s", tmp, flaws_str); -
branches/2.2.10/mondo/src/lib/mr_mem.c
r2241 r2306 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.