Changeset 2205 in MondoRescue
- Timestamp:
- May 14, 2009, 3:10:51 AM (16 years ago)
- Location:
- branches/2.2.9/mondo/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.9/mondo/src/common/libmondo-devices.c
r2202 r2205 992 992 #if linux 993 993 fileid = open(drive, O_RDONLY); 994 if (fileid ) {994 if (fileid != -1) { 995 995 if (ioctl(fileid, HDIO_GETGEO, &hdgeo) != -1) { 996 996 if (hdgeo.cylinders && hdgeo.heads && hdgeo.sectors) { -
branches/2.2.9/mondo/src/common/libmondo-mountlist.c
r2204 r2205 658 658 asprintf(&drive, "%s", mountlist->el[lino].device); 659 659 if (!strncmp(drive, RAID_DEVICE_STUB, strlen(RAID_DEVICE_STUB))) { 660 log_msg(8, "Not putting %s in list of drives: it's a virtual drive", 661 660 log_msg(8, "Not putting %s in list of drives: it's a virtual drive", drive); 661 paranoid_free(drive); 662 662 continue; 663 663 } … … 665 665 size = mountlist->el[lino].size; 666 666 if (size == 0) { 667 log_msg(8, 668 "Not putting %s in list of drives: it has zero size (maybe an LVM volume)", 669 drive); 667 log_msg(8, "Not putting %s in list of drives: it has zero size (maybe an LVM volume)", drive); 668 paranoid_free(drive); 670 669 continue; 671 670 } 672 671 673 log_msg(8, "Putting %s with size %lli in list of drives", 674 drive, size); 672 log_msg(8, "Putting %s with size %lli in list of drives", drive, size); 675 673 676 674 (void) truncate_to_drive_name(drive); 677 675 for (j = 0; 678 676 j < noof_drives 679 && strcmp(drivelist->el[j].device, drive) != 0; j++) 677 && strcmp(drivelist->el[j].device, drive) != 0; j++) { 678 paranoid_free(drive); 680 679 continue; 680 } 681 681 if (j == noof_drives) { 682 682 strcpy(drivelist->el[noof_drives++].device, drive); 683 683 } 684 paranoid_free(drive); 684 685 } 685 686 drivelist->entries = noof_drives; … … 816 817 if (res < 5) { 817 818 /* no label found */ 818 asprintf(&(mountlist->el[items].label), "%s", ""); 819 asprintf(&tmp, "%s", ""); 820 mountlist->el[items].label = tmp; 819 821 } 820 822 #elif __FreeBSD__ … … 824 826 mountlist->el[items].mountpoint, 825 827 mountlist->el[items].format, siz); 826 asprintf(&(mountlist->el[items].label), "%s", ""); 828 asprintf(&tmp, "%s", ""); 829 mountlist->el[items].label = tmp; 827 830 #endif 828 831 -
branches/2.2.9/mondo/src/common/libmondo-tools.c
r2195 r2205 1337 1337 int i; 1338 1338 static int depth = 0; 1339 char *tmp;1340 1339 FILE *fout; 1341 1340 … … 1345 1344 } 1346 1345 depth++; 1347 1348 malloc_string(tmp);1349 1346 1350 1347 if (debug_level <= g_loglevel) { … … 1359 1356 fprintf(fout, "\t"); 1360 1357 if (getpid() == g_main_pid) 1361 fprintf(fout, "[Main] %s->%s#%d: ", szFile, szFunction, 1362 nLine); 1358 fprintf(fout, "[Main] %s->%s#%d: ", szFile, szFunction, nLine); 1363 1359 else if (getpid() == g_buffer_pid && g_buffer_pid > 0) 1364 fprintf(fout, "[Buff] %s->%s#%d: ", szFile, szFunction, 1365 nLine); 1360 fprintf(fout, "[Buff] %s->%s#%d: ", szFile, szFunction, nLine); 1366 1361 else 1367 fprintf(fout, "[TH=%d] %s->%s#%d: ", getpid(), szFile, 1368 szFunction, nLine); 1362 fprintf(fout, "[TH=%d] %s->%s#%d: ", getpid(), szFile, szFunction, nLine); 1369 1363 } 1370 1364 vfprintf(fout, fmt, args); … … 1380 1374 } 1381 1375 depth--; 1382 paranoid_free(tmp);1383 1376 } 1384 1377 -
branches/2.2.9/mondo/src/mondorestore/mondo-prep.c
r2192 r2205 1596 1596 // if (run_program_and_log_output(tmp, TRUE)) { 1597 1597 file = open(drivename, O_WRONLY); 1598 if ( !file) {1598 if (file != -1) { 1599 1599 sprintf(tmp, 1600 1600 "Warning - unable to open %s for wiping it's partition table",
Note:
See TracChangeset
for help on using the changeset viewer.