- Timestamp:
- Aug 28, 2009, 2:41:30 AM (16 years ago)
- Location:
- branches/2.2.10
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mindi/analyze-my-lvm
r2244 r2351 86 86 current_VG=$1 87 87 VG_info_file=$MINDI_TMP/$$.vg-info.txt 88 $LVMCMD vgdisplay $current_VG > $VG_info_file 88 # We use cat here as a way to avoid SElinux to prevent us from writing in $VG_info_file 89 $LVMCMD vgdisplay $current_VG | cat > $VG_info_file 89 90 max_logical_volumes=`GetValueFromField "$VG_info_file" "MAX LV"` 90 91 [ $max_logical_volumes -ge 256 ] && max_logical_volumes=255 -
branches/2.2.10/mondo/src/common/libmondo-archive.c
r2341 r2351 1927 1927 1928 1928 /*@ pointers ******************************************* */ 1929 FILE *fin; 1930 char *p; 1929 FILE *fin = NULL; 1931 1930 1932 1931 /*@ buffers ******************************************** */ 1933 1932 char *tmp = NULL; 1934 char *bigfile_fname ;1933 char *bigfile_fname = NULL; 1935 1934 char *sz_devfile = NULL; 1936 1935 char *ntfsprog_fifo = NULL; … … 1976 1975 } 1977 1976 1978 malloc_string(bigfile_fname); 1979 for (fgets(bigfile_fname, MAX_STR_LEN, fin); !feof(fin); 1980 fgets(bigfile_fname, MAX_STR_LEN, fin), biggie_file_number++) { 1977 for (mr_getline(bigfile_fname, fin); !feof(fin); mr_getline(bigfile_fname, fin), biggie_file_number++) { 1981 1978 use_ntfsprog = FALSE; 1982 1979 if (bigfile_fname[strlen(bigfile_fname) - 1] < 32) { … … 1991 1988 log_msg(3, "Unable to write to %s", bigfile_fname); 1992 1989 // So skip it as it doesn't exist 1990 mr_free(bigfile_fname); 1993 1991 continue; 1994 1992 } else { … … 2001 1999 log_msg(2, "bigfile_fname = %s", bigfile_fname); 2002 2000 use_ntfsprog = FALSE; 2003 if (!strncmp(bigfile_fname, "/dev/", 5) 2004 && is_dev_an_NTFS_dev(bigfile_fname)) { 2001 if (!strncmp(bigfile_fname, "/dev/", 5) && is_dev_an_NTFS_dev(bigfile_fname)) { 2005 2002 use_ntfsprog = TRUE; 2006 2003 log_msg(2, "Calling ntfsclone in background because %s is an NTFS partition", bigfile_fname); … … 2010 2007 switch (pid = fork()) { 2011 2008 case -1: 2009 mr_free(bigfile_fname); 2012 2010 mr_free(sz_devfile); 2013 2011 fatal_error("Fork failure"); … … 2032 2030 // Whether partition or biggiefile, just do your thang :-) 2033 2031 if (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) { 2034 write_header_block_to_stream(biggie_fsize, bigfile_fname, 2035 use_ntfsprog ? 2036 BLK_START_A_PIHBIGGIE : 2037 BLK_START_A_NORMBIGGIE); 2032 write_header_block_to_stream(biggie_fsize, bigfile_fname, use_ntfsprog ? BLK_START_A_PIHBIGGIE : BLK_START_A_NORMBIGGIE); 2038 2033 } 2039 2034 res = slice_up_file_etc(bigfile_fname, ntfsprog_fifo, biggie_file_number, noof_biggie_files, use_ntfsprog); … … 2042 2037 } 2043 2038 retval += res; 2044 p = strrchr(bigfile_fname, '/');2045 if (p) {2046 p++;2047 } else {2048 p = bigfile_fname;2049 }2050 2039 mr_asprintf(tmp, "Archiving %s ... ", bigfile_fname); 2051 2040 if (res) { … … 2059 2048 } 2060 2049 } 2050 mr_free(bigfile_fname); 2061 2051 #ifndef _XWIN 2062 2052 if (!g_text_mode) { … … 2067 2057 mr_free(tmp); 2068 2058 } 2059 mr_free(bigfile_fname); 2060 2069 2061 log_msg(1, "Finished backing up bigfiles"); 2070 2062 log_msg(1, "estimated slices = %ld; actual slices = %ld", … … 2072 2064 close_progress_form(); 2073 2065 paranoid_fclose(fin); 2074 paranoid_free(bigfile_fname);2075 2066 return (retval); 2076 2067 } -
branches/2.2.10/mondo/src/common/libmondo-devices.c
r2349 r2351 313 313 /*@ buffers **************************************************** */ 314 314 char *program = NULL; 315 char *incoming ;315 char *incoming = NULL; 316 316 char *searchstr = NULL; 317 317 char *tmp = NULL; … … 327 327 assert_string_is_neither_NULL_nor_zerolength(drive); 328 328 assert(partno >= 0 && partno < 999); 329 330 malloc_string(incoming);331 329 332 330 #ifdef __FreeBSD__ … … 356 354 searchstr = build_partition_name(drive, partno); 357 355 mr_strcat(searchstr, " "); 358 for (res = 0 ; !res && fgets(incoming, MAX_STR_LEN - 1, fin);) {356 for (res = 0, mr_getline(incoming, fin); !res && !feof(fin) ; mr_getline(incoming, fin)) { 359 357 if (strstr(incoming, searchstr)) { 360 358 res = 1; 361 359 } 362 } 360 mr_free(incoming); 361 } 362 mr_free(incoming); 363 363 mr_free(searchstr); 364 364 … … 366 366 log_OS_error("Cannot pclose fin"); 367 367 } 368 paranoid_free(incoming);369 368 return (res); 370 369 } … … 567 566 /*@ buffers ***************************************************** */ 568 567 char *tmp = NULL; 569 char *tmp1 = NULL;570 568 char *output = NULL; 571 569 char *cdr_exe = NULL; … … 634 632 } 635 633 636 malloc_string(tmp); 637 tmp[0] = '\0'; 638 for ((void)fgets(tmp, MAX_STR_LEN, fin); !feof(fin); 639 (void)fgets(tmp, MAX_STR_LEN, fin)) { 634 for (mr_getline(tmp, fin); !feof(fin); mr_getline(tmp, fin)) { 640 635 p = strchr(tmp, '\''); 641 636 if (p) { … … 657 652 } 658 653 } 659 } 654 mr_free(tmp); 655 } 656 mr_free(tmp); 660 657 paranoid_pclose(fin); 661 658 … … 671 668 log_msg(4, "Cannot run 2nd command - non-fatal, fortunately"); 672 669 } else { 673 for ((void)fgets(tmp, MAX_STR_LEN, fin); !feof(fin); 674 (void)fgets(tmp, MAX_STR_LEN, fin)) { 670 for (mr_getline(tmp, fin); !feof(fin); mr_getline(tmp, fin)) { 675 671 log_msg(5, "--> '%s'", tmp); 676 672 if (tmp[0] != ' ' && tmp[1] != ' ') { … … 688 684 } 689 685 } 686 mr_free(tmp); 690 687 } 691 688 paranoid_pclose(fin); 689 mr_free(tmp); 692 690 } 693 691 } 694 692 mr_free(phrase_two); 695 paranoid_free(tmp);696 693 697 694 #endif … … 725 722 726 723 if (found_it) { 727 mr_asprintf(tmp 1, "grep \"%s=ide-scsi\" " CMDLINE " &> /dev/null", strrchr(output, '/') + 1);728 if (system(tmp 1) == 0) {724 mr_asprintf(tmp, "grep \"%s=ide-scsi\" " CMDLINE " &> /dev/null", strrchr(output, '/') + 1); 725 if (system(tmp) == 0) { 729 726 log_msg(4, "%s is not right. It's being SCSI-emulated. Continuing.", output); 730 727 found_it = FALSE; 731 728 mr_free(output); 732 729 } 733 mr_free(tmp 1);730 mr_free(tmp); 734 731 } 735 732 … … 772 769 mr_free(output); 773 770 } else { 774 mr_asprintf(tmp 1, "%s/archives", mountpoint);771 mr_asprintf(tmp, "%s/archives", mountpoint); 775 772 if (!does_file_exist(tmp)) { 776 773 log_msg(4, "[Cardigans] I'll take it back"); … … 784 781 log_msg(4, "I'm confident the Mondo CD is in %s", output); 785 782 } 786 mr_free(tmp 1);783 mr_free(tmp); 787 784 } 788 785 } … … 808 805 809 806 log_msg(1, "command=%s", command); 810 mr_asprintf(tmp 1, "%s", call_program_and_get_last_line_of_output(command));807 mr_asprintf(tmp, "%s", call_program_and_get_last_line_of_output(command)); 811 808 mr_free(command); 812 809 813 810 mr_free(output); 814 if (strlen(tmp 1) > 0) {815 mr_asprintf(output, "%s", tmp 1);811 if (strlen(tmp) > 0) { 812 mr_asprintf(output, "%s", tmp); 816 813 log_msg(4, "Finally found it at %s", output); 817 814 } else { 818 815 log_msg(4, "Still couldn't find it."); 819 816 } 820 mr_free(tmp 1);817 mr_free(tmp); 821 818 822 819 return (output); … … 1026 1023 1027 1024 /*@ buffers ***************************************************** */ 1028 char *incoming ;1025 char *incoming = NULL; 1029 1026 char *device_with_tab = NULL; 1030 1027 char *device_with_space = NULL; … … 1044 1041 } 1045 1042 1046 malloc_string(incoming);1047 1043 if (device_raw[0] != '/' && !strstr(device_raw, ":/")) { 1048 1044 log_msg(1, "%s needs to have a '/' prefixed - I'll do it", … … 1067 1063 return(FALSE); 1068 1064 } 1069 for ((void)fgets(incoming, MAX_STR_LEN - 1, fin); !feof(fin); 1070 (void)fgets(incoming, MAX_STR_LEN - 1, fin)) { 1071 if (strstr(incoming, device_with_space) //> incoming 1072 || strstr(incoming, device_with_tab)) // > incoming) 1073 { 1065 1066 for (mr_getline(incoming, fin); !feof(fin); mr_getline(incoming, fin)) { 1067 if (strstr(incoming, device_with_space) || strstr(incoming, device_with_tab)) { 1074 1068 paranoid_pclose(fin); 1075 paranoid_free(incoming);1069 mr_free(incoming); 1076 1070 return(TRUE); 1077 1071 } 1078 } 1072 mr_free(incoming); 1073 } 1074 mr_free(incoming); 1079 1075 mr_free(device_with_tab); 1080 1076 mr_free(device_with_space); … … 1086 1082 } 1087 1083 mr_free(tmp); 1088 paranoid_free(incoming);1089 1084 return(retval); 1090 1085 } … … 2308 2303 char *list_drives_cmd = NULL; 2309 2304 char *tmp = NULL; 2310 char *current_drive ;2305 char *current_drive = NULL; 2311 2306 2312 2307 /*@ pointers *************************************************** */ 2313 FILE *pdrives ;2308 FILE *pdrives = NULL; 2314 2309 2315 2310 /*@ int ******************************************************** */ … … 2338 2333 } 2339 2334 2340 malloc_string(current_drive); 2341 for ((void)fgets(current_drive, MAX_STR_LEN, pdrives); !feof(pdrives); 2342 (void)fgets(current_drive, MAX_STR_LEN, pdrives)) { 2343 strip_spaces(current_drive); 2335 for (mr_getline(current_drive, pdrives); !feof(pdrives); mr_getline(current_drive, pdrives)) { 2336 mr_strip_spaces(current_drive); 2344 2337 log_it("looking at drive %s's MBR", current_drive); 2345 2338 if (does_string_exist_in_boot_block(current_drive, "GRUB")) { … … 2349 2342 mr_asprintf(which_device, "%s", current_drive); 2350 2343 */ 2344 mr_free(current_drive); 2351 2345 break; 2352 2346 } … … 2357 2351 mr_asprintf(which_device, "%s", current_drive); 2358 2352 */ 2353 mr_free(current_drive); 2359 2354 break; 2360 2355 } 2361 } 2356 mr_free(current_drive); 2357 } 2358 mr_free(current_drive); 2359 2362 2360 if (pclose(pdrives)) { 2363 2361 log_OS_error("Cannot pclose pdrives"); … … 2365 2363 log_it("%d grubs and %d lilos\n", count_grubs, count_lilos); 2366 2364 if (count_grubs && !count_lilos) { 2367 paranoid_free(current_drive);2368 2365 return ('G'); 2369 2366 } else if (count_lilos && !count_grubs) { 2370 paranoid_free(current_drive);2371 2367 return ('L'); 2372 2368 } else if (count_grubs == 1 && count_lilos == 1) { 2373 2369 log_it("I'll bet you used to use LILO but switched to GRUB..."); 2374 paranoid_free(current_drive);2375 2370 return ('G'); 2376 2371 } else { … … 2382 2377 log_OS_error("Unable to open list of drives"); 2383 2378 mr_free(list_drives_cmd); 2384 paranoid_free(current_drive);2385 2379 return ('\0'); 2386 2380 } 2387 2381 mr_free(list_drives_cmd); 2388 2382 2389 for ((void)fgets(current_drive, MAX_STR_LEN, pdrives); !feof(pdrives); 2390 (void)fgets(current_drive, MAX_STR_LEN, pdrives)) { 2391 strip_spaces(current_drive); 2383 for (mr_getline(current_drive, pdrives); !feof(pdrives); mr_getline(current_drive, pdrives)) { 2384 mr_strip_spaces(current_drive); 2392 2385 log_it("looking at partition %s's BR", current_drive); 2393 2386 if (does_string_exist_in_boot_block(current_drive, "GRUB")) { … … 2397 2390 mr_asprintf(which_device, "%s", current_drive); 2398 2391 */ 2392 mr_free(current_drive); 2399 2393 break; 2400 2394 } … … 2405 2399 mr_asprintf(which_device, "%s", current_drive); 2406 2400 */ 2401 mr_free(current_drive); 2407 2402 break; 2408 2403 } 2409 } 2404 mr_free(current_drive); 2405 } 2406 mr_free(current_drive); 2407 2410 2408 if (pclose(pdrives)) { 2411 2409 log_OS_error("Cannot pclose pdrives"); 2412 2410 } 2413 2411 log_it("%d grubs and %d lilos\n", count_grubs, count_lilos); 2414 paranoid_free(current_drive);2415 2412 if (count_grubs && !count_lilos) { 2416 2413 return ('G'); -
branches/2.2.10/mondo/src/common/libmondo-filelist.c
r2340 r2351 414 414 int call_exe_and_pipe_output_to_fd(char *syscall, FILE * pout) 415 415 { 416 FILE *pattr; 417 char *tmp; 416 FILE *pattr = NULL; 417 char *tmp = NULL; 418 418 419 pattr = popen(syscall, "r"); 419 420 if (!pattr) { … … 426 427 return (2); 427 428 } 428 malloc_string(tmp); 429 for ((void)fgets(tmp, MAX_STR_LEN, pattr); !feof(pattr); 430 (void)fgets(tmp, MAX_STR_LEN, pattr)) { 429 for (mr_getline(tmp, pattr); !feof(pattr); mr_getline(tmp, pattr)) { 431 430 fputs(tmp, pout); 432 } 431 mr_free(tmp); 432 } 433 mr_free(tmp); 433 434 paranoid_pclose(pattr); 434 paranoid_free(tmp);435 435 return (0); 436 436 } … … 441 441 char *auxlist_fname) 442 442 { 443 FILE *fin ;444 FILE *pout ;443 FILE *fin = NULL; 444 FILE *pout = NULL; 445 445 char *pout_command = NULL; 446 char *syscall ;447 char *file_to_analyze ;446 char *syscall = NULL; 447 char *file_to_analyze = NULL; 448 448 char *strtmp = NULL; 449 449 char *tmp = NULL; … … 463 463 mr_free(pout_command); 464 464 465 malloc_string(file_to_analyze); 466 for ((void)fgets(file_to_analyze, MAX_STR_LEN, fin); !feof(fin); 467 (void)fgets(file_to_analyze, MAX_STR_LEN, fin)) { 465 for (mr_getline(file_to_analyze, fin); !feof(fin); mr_getline(file_to_analyze, fin)) { 468 466 i = strlen(file_to_analyze); 469 467 if (i > 0 && file_to_analyze[i - 1] < 32) { … … 478 476 call_exe_and_pipe_output_to_fd(syscall, pout); 479 477 mr_free(syscall); 480 } 478 mr_free(file_to_analyze); 479 } 480 mr_free(file_to_analyze); 481 481 paranoid_fclose(fin); 482 482 paranoid_pclose(pout); 483 paranoid_free(file_to_analyze);484 483 return (0); 485 484 } … … 529 528 char *syscall_pin = NULL; 530 529 char *syscall_pout = NULL; 531 char *incoming ;532 char *current_subset_file ;530 char *incoming = NULL; 531 char *current_subset_file = NULL; 533 532 char *current_master_file = NULL; 534 533 char *masklist = NULL; … … 553 552 return (0); 554 553 } 555 malloc_string(incoming);556 malloc_string(current_subset_file);557 554 mr_asprintf(masklist, "%s/masklist", bkpinfo->tmpdir); 558 555 mr_asprintf(command, "cp -f %s %s", orig_msklist, masklist); … … 561 558 562 559 sort_file(masklist); 563 current_subset_file[0] = '\0';564 560 565 561 mr_asprintf(syscall_pout, "%s --restore - 2>> %s", executable, MONDO_LOGFILE); … … 594 590 // printf("Hi there. Starting the loop\n"); 595 591 596 (void)fgets(current_subset_file, MAX_STR_LEN, faclin);597 (void)fgets(incoming, MAX_STR_LEN, pin);592 mr_getline(current_subset_file, faclin); 593 mr_getline(incoming, pin); 598 594 while (!feof(pin) && !feof(faclin)) { 599 595 mr_asprintf(current_master_file, "%s", incoming + 8); … … 625 621 if (i < 0) { // read another subset file in. 626 622 log_msg(my_depth, "Reading next subset line in\n\n"); 627 (void)fgets(current_subset_file, MAX_STR_LEN, faclin); 623 mr_free(current_subset_file); 624 mr_getline(current_subset_file, faclin); 628 625 continue; 629 626 } … … 632 629 fputs(incoming, pout); 633 630 } 634 (void)fgets(incoming, MAX_STR_LEN, pin); 631 mr_free(incoming); 632 mr_getline(incoming, pin); 635 633 if (!i) { 636 634 log_msg(my_depth, "Copying master %s", q); … … 641 639 fputs(incoming, pout); 642 640 } 643 (void)fgets(incoming, MAX_STR_LEN, pin); 641 mr_free(incoming); 642 mr_getline(incoming, pin); 644 643 } 645 644 if (!i) { 646 (void)fgets(current_subset_file, MAX_STR_LEN, faclin); 645 mr_free(current_subset_file); 646 mr_getline(current_subset_file, faclin); 647 647 } 648 648 mr_free(current_master_file); 649 649 } 650 while (!feof(pin)) { 651 (void)fgets(incoming, MAX_STR_LEN, pin); 652 } 650 mr_free(current_subset_file); 651 mr_free(incoming); 653 652 fclose(faclin); 654 653 pclose(pin); 655 654 pclose(pout); 656 655 657 // printf("OK, loop is done\n");658 659 656 unlink(masklist); 660 657 mr_free(masklist); 661 658 662 paranoid_free(current_subset_file);663 paranoid_free(incoming);664 659 return (retval); 665 660 } … … 772 767 noof_chars = strlen(string_to_add) + 1; /* we include the '\0' */ 773 768 774 /* walk across tree if necessary */769 /* walk across tree if necessary */ 775 770 node = startnode; 776 771 char_to_add = string_to_add[0]; … … 781 776 } 782 777 783 /* walk down tree if appropriate */778 /* walk down tree if appropriate */ 784 779 if (node->down != NULL && node->ch == char_to_add) { 785 780 log_msg(7, "depth=%d char=%c --- going DOWN", depth, char_to_add); … … 795 790 } 796 791 797 /* add here */792 /* add here */ 798 793 if (!(newnode = (struct s_node *) malloc(sizeof(struct s_node)))) { 799 794 log_to_screen("failed to malloc"); … … 866 861 /*@ buffers **************************************************** */ 867 862 char *command_to_open_fname = NULL; 868 char fname[MAX_STR_LEN]; 869 char tmp[MAX_STR_LEN]; 870 char *tmp1 = NULL; 863 char *fname = NULL; 864 char *tmp = NULL; 871 865 int pos_in_fname; 872 866 /*@ int ******************************************************** */ … … 884 878 } 885 879 log_to_screen("Loading filelist"); 886 mr_asprintf(tmp 1, "zcat %s | wc -l", filelist_fname);887 log_msg(6, "tmp 1 = %s", tmp1);888 lines_in_filelist = atol(call_program_and_get_last_line_of_output(tmp 1));889 mr_free(tmp 1);880 mr_asprintf(tmp, "zcat %s | wc -l", filelist_fname); 881 log_msg(6, "tmp = %s", tmp); 882 lines_in_filelist = atol(call_program_and_get_last_line_of_output(tmp)); 883 mr_free(tmp); 890 884 891 885 if (lines_in_filelist < 3) { … … 913 907 914 908 open_evalcall_form("Loading filelist from disk"); 915 for ((void)fgets(fname, MAX_STR_LEN, pin); !feof(pin); 916 (void)fgets(fname, MAX_STR_LEN, pin)) { 917 if ((fname[strlen(fname) - 1] == 13 918 || fname[strlen(fname) - 1] == 10) && strlen(fname) > 0) { 909 for (mr_getline(fname, pin); !feof(pin); mr_getline(fname, pin)) { 910 if ((strlen(fname) > 0) && (fname[strlen(fname) - 1] == 13 || fname[strlen(fname) - 1] == 10)) { 919 911 fname[strlen(fname) - 1] = '\0'; 920 912 } 921 // strip_spaces (fname);922 913 if (!strlen(fname)) { 914 mr_free(fname); 923 915 continue; 924 916 } … … 927 919 continue; 928 920 } 929 strcpy(tmp, fname);921 mr_asprintf(tmp, "%s", fname); 930 922 tmp[pos_in_fname] = '\0'; 931 923 if (strlen(tmp)) { 932 924 add_string_at_node(filelist, tmp); 933 925 } 926 mr_free(tmp); 934 927 } 935 928 add_string_at_node(filelist, fname); 929 mr_free(fname); 930 936 931 if (!(++lino % 1111)) { 937 932 percentage = (int) (lino * 100 / lines_in_filelist); … … 939 934 } 940 935 } 936 mr_free(fname); 937 941 938 paranoid_pclose(pin); 942 939 close_evalcall_form(); … … 1835 1832 char *list_of_files_fname, bool flag_em) 1836 1833 { 1837 FILE *fin; 1838 char *tmp; 1839 struct s_node *nod; 1840 1841 malloc_string(tmp); 1834 FILE *fin = NULL; 1835 char *tmp = NULL; 1836 struct s_node *nod = NULL; 1837 1842 1838 log_msg(3, "Adding %s to filelist", list_of_files_fname); 1843 1839 if (!(fin = fopen(list_of_files_fname, "r"))) { … … 1845 1841 return (1); 1846 1842 } 1847 for ((void)fgets(tmp, MAX_STR_LEN, fin); !feof(fin); 1848 (void)fgets(tmp, MAX_STR_LEN, fin)) { 1843 for (mr_getline(tmp, fin); !feof(fin); mr_getline(tmp, fin)) { 1849 1844 if (!tmp[0]) { 1845 mr_free(tmp); 1850 1846 continue; 1851 1847 } 1852 if ((tmp[strlen(tmp) - 1] == 13 || tmp[strlen(tmp) - 1] == 10) 1853 && strlen(tmp) > 0) { 1848 if ((strlen(tmp) > 0) && (tmp[strlen(tmp) - 1] == 13 || tmp[strlen(tmp) - 1] == 10)) { 1854 1849 tmp[strlen(tmp) - 1] = '\0'; 1855 1850 } 1856 1851 log_msg(2, "tmp = '%s'", tmp); 1857 1852 if (!tmp[0]) { 1853 mr_free(tmp); 1858 1854 continue; 1859 1855 } … … 1869 1865 log_msg(5, "Flagged '%s'", tmp); 1870 1866 } 1871 } 1867 mr_free(tmp); 1868 } 1869 mr_free(tmp); 1872 1870 paranoid_fclose(fin); 1873 paranoid_free(tmp);1874 1871 return (0); 1875 1872 } -
branches/2.2.10/mondo/src/mondorestore/mondo-rstr-tools.c
r2338 r2351 298 298 299 299 mr_strcat(mount_isodir_command, " -o ro %s", bkpinfo->isodir); 300 run_program_and_log_output("df -m", FALSE); 301 log_msg(1, 302 "The 'mount' command is '%s'. PLEASE report this command to be if you have problems, ok?", 303 mount_isodir_command); 300 run_program_and_log_output("df -m -P", FALSE); 301 log_msg(1, "The 'mount' command is '%s'. PLEASE report this command to be if you have problems, ok?", mount_isodir_command); 304 302 if (run_program_and_log_output(mount_isodir_command, FALSE)) { 305 303 popup_and_OK … … 472 470 * @return The number of errors encountered (0 for success). 473 471 */ 474 int mount_all_devices(struct mountlist_itself 475 *p_external_copy_of_mountlist, bool writeable) 472 int mount_all_devices(struct mountlist_itself *p_external_copy_of_mountlist, bool writeable) 476 473 { 477 474 int retval = 0, lino, res; … … 488 485 489 486 mvaddstr_and_log_it(g_currentY, 0, "Mounting devices "); 490 open_progress_form("Mounting devices", 491 "I am now mounting all the drives.", 492 "This should not take long.", 493 "", mountlist->entries); 487 open_progress_form("Mounting devices", "I am now mounting all the drives.", "This should not take long.", "", mountlist->entries); 494 488 495 489 mr_asprintf(these_failed, ""); 496 490 for (lino = 0; lino < mountlist->entries; lino++) { 497 491 if (!strcmp(mountlist->el[lino].device, "/proc")) { 498 log_msg(1, 499 "Again with the /proc - why is this in your mountlist?"); 492 log_msg(1, "Again with the /proc - why is this in your mountlist?"); 500 493 } else if (is_this_device_mounted(mountlist->el[lino].device)) { 501 494 log_to_screen("%s is already mounted", mountlist->el[lino].device); … … 519 512 if (retval) { 520 513 if (g_partition_table_locked_up > 0) { 521 log_to_screen 522 ("fdisk's ictol() call to refresh its copy of the partition table causes the kernel to"); 523 log_to_screen 524 ("lock up the partition table. You might have to reboot and use Interactive Mode to"); 525 log_to_screen 526 ("format and restore *without* partitioning first. Sorry for the inconvenience."); 514 log_to_screen("fdisk's ictol() call to refresh its copy of the partition table causes the kernel to"); 515 log_to_screen("lock up the partition table. You might have to reboot and use Interactive Mode to"); 516 log_to_screen("format and restore *without* partitioning first. Sorry for the inconvenience."); 527 517 } 528 518 mr_asprintf(tmp, "Could not mount device(s) %s- shall I abort?", these_failed); … … 530 520 if (!ask_me_yes_or_no(tmp)) { 531 521 retval = 0; 532 log_to_screen 533 ("Continuing, although some device(s) failed to be mounted"); 522 log_to_screen("Continuing, although some device(s) failed to be mounted"); 534 523 mvaddstr_and_log_it(g_currentY++, 74, "Done."); 535 524 } else { 536 525 mvaddstr_and_log_it(g_currentY++, 74, "Failed."); 537 log_to_screen 538 ("Unable to mount some or all of your partitions."); 526 log_to_screen("Unable to mount some or all of your partitions."); 539 527 } 540 528 mr_free(tmp); … … 548 536 (void)mount_device("/proc","/proc","proc",TRUE); 549 537 (void)mount_device("/sys","/sys","sysfs",TRUE); 550 run_program_and_log_output("df -m ", 3);538 run_program_and_log_output("df -m -P", 3); 551 539 paranoid_free(mountlist); 552 540 return (retval); … … 2036 2024 sort_mountlist_by_mountpoint(mountlist, 0); 2037 2025 2038 run_program_and_log_output("df -m ", 3);2026 run_program_and_log_output("df -m -P", 3); 2039 2027 mvaddstr_and_log_it(g_currentY, 0, "Unmounting devices "); 2040 2028 open_progress_form("Unmounting devices", -
branches/2.2.10/tools/myval
r2340 r2351 6 6 sudo valgrind --log-file=/tmp/valg.log --show-reachable=yes --track-origins=yes --leak-check=full /home/bruno/local/pb/projects/mondorescue/build/BUILD/mondo-2.2.10/src/mondoarchive/mondoarchive -K 99 -Oi -g -G -I "/etc /var/lib/rpm" -E /etc/init.d -d /home 7 7 sudo valgrind --log-file=/tmp/valm.log --tool=massif --heap=yes --stacks=yes --alloc-fn=mr_malloc --massif-out-file=/tmp/valm.out /home/bruno/local/pb/projects/mondorescue/build/BUILD/mondo-2.2.10/src/mondoarchive/mondoarchive -K 99 -Oi -g -G -I "/etc /var/lib/rpm" -E /etc/init.d -d /home 8 sudo valgrind --log-file=/tmp/valc.log --tool=callgrind --callgrind-out-file=/tmp/valc.out /home/bruno/local/pb/projects/mondorescue/build/BUILD/mondo-2.2.10/src/mondoarchive/mondoarchive -K 99 -Oi -g -Y -I "/etc /var/lib/rpm" - E /etc/init.d -d /home8 sudo valgrind --log-file=/tmp/valc.log --tool=callgrind --callgrind-out-file=/tmp/valc.out /home/bruno/local/pb/projects/mondorescue/build/BUILD/mondo-2.2.10/src/mondoarchive/mondoarchive -K 99 -Oi -g -Y -I "/etc /var/lib/rpm" -T /tmp -S /var/spool/mondo -E /etc/init.d -d /home
Note:
See TracChangeset
for help on using the changeset viewer.