Changeset 3611 in MondoRescue for branches/3.2/mondo/src/mondorestore
- Timestamp:
- Nov 10, 2016, 9:09:54 PM (9 years ago)
- Location:
- branches/3.2/mondo/src/mondorestore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mondo/src/mondorestore/mondo-prep.c
r3610 r3611 1839 1839 mr_asprintf(partcode, ""); 1840 1840 } else if (strlen(format) >= 1 && strlen(format) <= 2) { 1841 mr_asprintf(partcode, format);1841 mr_asprintf(partcode, "%s", format); 1842 1842 } else { 1843 1843 /* probably an image */ … … 1847 1847 1848 1848 #ifdef __FreeBSD__ 1849 mr_asprintf(partcode, format); // was a51849 mr_asprintf(partcode, "%s", format); // was a5 1850 1850 #else 1851 mr_asprintf(partcode, format); // was 831851 mr_asprintf(partcode, "%s", format); // was 83 1852 1852 #endif 1853 1853 } -
branches/3.2/mondo/src/mondorestore/mondo-rstr-mountlist.c
r3564 r3611 55 55 /*@ buffers ******************************************************** */ 56 56 char tmp = NULL; 57 char tmp1 = NULL; 57 58 char device[MAX_STR_LEN]; 58 59 … … 112 113 } 113 114 if (device_copies > 1) { 114 mr_asprintf(tmp, " %s %s's.", number_to_text(device_copies), device); 115 tmp1 = number_to_text(device_copies); 116 mr_asprintf(tmp, " %s %s's.", tmp1, device); 117 mr_free(tmp1); 115 118 if (!strstr(flaws_str, tmp)) { 116 119 log_it(tmp); … … 209 212 } 210 213 if (device_copies > 1) { 211 mr_asprintf(tmp, " %s %s's.", number_to_text(device_copies), device); 214 tmp1 = number_to_text(device_copies); 215 mr_asprintf(tmp, " %s %s's.", tmp1, device); 216 mr_free(tmp1); 212 217 if (!strstr(flaws_str, "%s", tmp)) { 213 218 log_it(tmp); … … 271 276 } 272 277 if (device_copies > 1) { 273 mr_asprintf(tmp, " %s %s's.", number_to_text(device_copies), device); 278 tmp1 = number_to_text(device_copies); 279 mr_asprintf(tmp, " %s %s's.", tmp1, device); 280 mr_free(tmp1); 274 281 if (!strstr(flaws_str, tmp)) { 275 282 log_it(tmp); … … 374 381 /*@ buffers ******************************************************** */ 375 382 char *tmp = NULL; 383 char *tmp1 = NULL; 376 384 char *device = NULL; 377 385 char *flaws_str = NULL; … … 452 460 } 453 461 if (device_copies > 1) { 454 mr_asprintf(tmp, " %s %s's.", number_to_text(device_copies), device); 462 tmp1 = number_to_text(device_copies); 463 mr_asprintf(tmp, " %s %s's.", tmp1, device); 464 mr_free(tmp1); 455 465 if (!strstr(flaws_str, tmp)) { 456 466 log_it(tmp); … … 536 546 struct list_of_disks *drivelist; 537 547 char *tmp = NULL; 548 char *tmp1 = NULL; 538 549 char *flaws_str = NULL; 539 550 … … 589 600 } 590 601 if (copies > 1 && last_copy == currline && strcmp(curr_mountpoint, "raid")) { 591 mr_asprintf(tmp, " %s %s's.", number_to_text(copies), curr_mountpoint); 602 tmp1 = number_to_text(copies); 603 mr_asprintf(tmp, " %s %s's.", tmp1, curr_mountpoint); 604 mr_free(tmp1); 592 605 log_msg(8,"Adding: %s to flaws_str", tmp); 593 606 if (flaws_str != NULL) { -
branches/3.2/mondo/src/mondorestore/mondo-rstr-newt.c
r3289 r3611 1296 1296 } 1297 1297 mr_free(size_str); 1298 newtListboxSetEntry(listbox, (long) keylist[currline], 1299 mountlist_entry_to_string(mountlist, currline)); 1298 1299 tmp = mountlist_entry_to_string(mountlist, currline); 1300 newtListboxSetEntry(listbox, (long) keylist[currline], tmp); 1301 mr_free(tmp); 1302 1300 1303 /* if new /dev/md RAID device then do funky stuff */ 1301 1304 if (strstr(mountlist->el[currline].device, RAID_DEVICE_STUB) … … 1580 1583 mr_free(title_of_editraidForm_window); 1581 1584 mr_asprintf(title_of_editraidForm_window, "Edit %s", raidrec->raid_device); 1582 mr_asprintf(sz_raid_level, "%s", turn_raid_level_number_to_string(raidrec->raid_level));1585 sz_raid_level = turn_raid_level_number_to_string(raidrec->raid_level); 1583 1586 sz_data_disks = number_of_disks_as_string(raidrec->data_disks.entries, "data"); 1584 1587 sz_spare_disks = number_of_disks_as_string(raidrec->spare_disks.entries, "spare"); … … 2335 2338 /** long **************************************************************/ 2336 2339 long i = 0; 2340 char *tmp = NULL; 2337 2341 2338 2342 assert(disklist != NULL); … … 2346 2350 } 2347 2351 for (i = 0; i < disklist->entries; i++) { 2348 newtListboxAppendEntry(listbox,2349 disklist_entry_to_string(disklist, i),2350 keylist[i]);2352 tmp = disklist_entry_to_string(disklist, i); 2353 newtListboxAppendEntry(listbox, tmp, keylist[i]); 2354 mr_free(tmp); 2351 2355 } 2352 2356 } … … 2367 2371 /** long **************************************************************/ 2368 2372 long i = 0; 2373 char * tmp = NULL; 2369 2374 2370 2375 assert(mountlist != NULL); … … 2378 2383 } 2379 2384 for (i = 0; i < mountlist->entries; i++) { 2380 newtListboxAppendEntry(listbox,2381 mountlist_entry_to_string(mountlist, i),2382 keylist[i]);2385 tmp = mountlist_entry_to_string(mountlist, i); 2386 newtListboxAppendEntry(listbox, tmp, keylist[i]); 2387 mr_free(tmp); 2383 2388 } 2384 2389 }
Note:
See TracChangeset
for help on using the changeset viewer.