Changeset 2376 in MondoRescue
- Timestamp:
- Sep 9, 2009, 12:37:59 PM (15 years ago)
- Location:
- branches/2.2.10/mondo/src
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mondo/src/common/libmondo-archive.c
r2357 r2376 1722 1722 ("Failed to write to disk. I shall blank it and then try again."); 1723 1723 sleep(5); 1724 (void)system("sync");1724 sync(); 1725 1725 pause_for_N_seconds(5, "Letting DVD drive settle"); 1726 1726 -
branches/2.2.10/mondo/src/common/libmondo-devices.c
r2375 r2376 1350 1350 1351 1351 while (what_number_cd_is_this() != cd_number_i_want) { 1352 paranoid_system("sync");1352 sync(); 1353 1353 if (is_this_device_mounted(MNT_CDROM)) { 1354 1354 res = … … 1372 1372 inject_device(bkpinfo->media_device); 1373 1373 } 1374 paranoid_system("sync");1374 sync(); 1375 1375 } 1376 1376 mr_free(request); -
branches/2.2.10/mondo/src/common/libmondo-fifo.c
r2332 r2376 85 85 wise_upper_limit = (am_I_in_disaster_recovery_mode()? 8 : 32); 86 86 wise_lower_limit = 1; // wise_upper_limit/2 + 1; 87 paranoid_system("sync");87 sync(); 88 88 for (bufsize = wise_upper_limit, res = -1; 89 89 res != 0 && bufsize >= wise_lower_limit; bufsize--) { … … 162 162 return; 163 163 } 164 paranoid_system("sync");164 sync(); 165 165 mr_asprintf(command, "ps %s | grep -F \"%s\" | grep -Fv grep | awk '{print $2;}' | grep -v PID | head -1", ps_options, g_sz_call_to_buffer); 166 166 log_msg(2, "kill_buffer() --- command = %s", command); -
branches/2.2.10/mondo/src/common/libmondo-stream.c
r2334 r2376 134 134 } 135 135 sleep(1); 136 paranoid_system("sync");136 sync(); 137 137 sleep(1); 138 138 paranoid_pclose(g_tape_stream); … … 173 173 174 174 sleep(1); 175 paranoid_system("sync");175 sync(); 176 176 sleep(1); 177 177 log_it("closeout_tape() -- entering"); … … 1467 1467 1468 1468 paranoid_pclose(g_tape_stream); 1469 sy stem("sync");1470 sy stem("sync");1471 sy stem("sync");1469 sync(); 1470 sync(); 1471 sync(); 1472 1472 log_it("New tape requested."); 1473 1473 insist_on_this_tape_number(g_current_media_number + 1); // will increment g_current_media, too -
branches/2.2.10/mondo/src/common/libmondo-verify.c
r2357 r2376 92 92 93 93 mr_asprintf(afio_found_changes, "%s.afio", ignorefiles_fname); 94 paranoid_system("sync");94 sync(); 95 95 96 96 log_msg(1, "Now scanning log file for 'afio: ' stuff"); … … 1177 1177 retval += verify_biggiefiles_from_stream(); 1178 1178 /* find the final blocks */ 1179 paranoid_system("sync");1179 sync(); 1180 1180 sleep(2); 1181 1181 closein_tape(); -
branches/2.2.10/mondo/src/common/newt-specific.c
r2357 r2376 99 99 long g_start_time = 0L; ///< The time (in seconds since the epoch) that the progress form was opened. 100 100 bool g_text_mode = TRUE; ///< If FALSE, use a newt interface; if TRUE, use an ugly (but more compatible) dumb terminal interface. 101 char g_xmondo_stdin[MAX_NEWT_COMMENT_LEN], ///< ... @bug Unneeded w/current XMondo.102 g_xmondo_stdout[MAX_NEWT_COMMENT_LEN]; ///< .... @bug Unneeded w/current XMondo.103 bool g_called_by_xmondo = FALSE; ///< @bug Unneeded w/current XMondo.104 101 char *g_selfmounted_isodir; ///< Holds the NFS mountpoint if mounted via mondoarchive. 105 102 106 103 /* @} - end of globalGroup */ 107 108 //int g_fd_in=-1, g_fd_out=-1;109 104 110 105 void popup_and_OK(char *); … … 130 125 if (g_text_mode) { 131 126 while (1) { 132 sy stem("sync");127 sync(); 133 128 printf("---promptdialogYN---1--- %s\n---promptdialogYN---Q--- [yes] [no] ---\n--> ", prompt); 134 129 mr_getline(tmp, stdin); … … 147 142 return (FALSE); 148 143 } else { 149 sy stem("sync");144 sync(); 150 145 printf("Please enter either YES or NO (or yes or no, or y or n, or...)\n"); 151 146 } … … 172 167 173 168 if (g_text_mode) { 174 sy stem("sync");169 sync(); 175 170 printf("---promptdialogOKC---1--- %s\n---promptdialogOKC---Q--- [OK] [Cancel] ---\n--> ", prompt); 176 171 mr_getline(tmp, stdin); -
branches/2.2.10/mondo/src/mondorestore/mondo-prep.c
r2357 r2376 118 118 } 119 119 } 120 sy stem("sync");121 sy stem("sync");122 sy stem("sync");120 sync(); 121 sync(); 122 sync(); 123 123 popup_and_OK 124 124 ("I must now reboot. Please leave the boot media in the drive and repeat your actions - e.g. type 'nuke' - and it should work fine."); … … 277 277 if (res && strstr(command, "create") && vacuum_pack) { 278 278 sleep(2); 279 sy stem("sync");280 sy stem("sync");281 sy stem("sync");279 sync(); 280 sync(); 281 sync(); 282 282 } 283 283 if ((p = strstr(incoming, "vgcreate"))) { … … 408 408 } 409 409 paranoid_free(command); 410 sy stem("sync");411 sy stem("sync");412 sy stem("sync");410 sync(); 411 sync(); 412 sync(); 413 413 sleep(1); 414 414 log_it("ENDING"); … … 764 764 log_to_screen("Stopping %s", device); 765 765 stop_raid_device(device); 766 sy stem("sync");766 sync(); 767 767 sleep(1); 768 768 … … 776 776 res = run_program_and_log_output(program, 1); 777 777 log_msg(1, "%s returned %d", program, res); 778 sy stem("sync");778 sync(); 779 779 sleep(3); 780 780 start_raid_device(device); … … 784 784 mr_free(program); 785 785 } 786 sy stem("sync");786 sync(); 787 787 sleep(2); 788 788 #endif 789 sy stem("sync");789 sync(); 790 790 sleep(1); 791 791 newtResume(); … … 849 849 mr_free(program); 850 850 retval += res; 851 sy stem("sync");851 sync(); 852 852 sleep(1); 853 853 return (retval); … … 901 901 log_msg(1, "Stopping all RAID devices"); 902 902 stop_all_raid_devices(mountlist); 903 sy stem("sync");904 sy stem("sync");905 sy stem("sync");903 sync(); 904 sync(); 905 sync(); 906 906 sleep(2); 907 907 log_msg(1, "Prepare soft-RAIDs"); // prep and format too … … 925 925 } 926 926 } 927 sy stem("sync");928 sy stem("sync");929 sy stem("sync");927 sync(); 928 sync(); 929 sync(); 930 930 sleep(2); 931 931 // This last step is probably necessary … … 1028 1028 ("Please choose 'yes' to reboot and try again; or 'no' to ignore this warning and continue.")) 1029 1029 { 1030 sy stem("sync");1031 sy stem("sync");1032 sy stem("sync");1030 sync(); 1031 sync(); 1032 sync(); 1033 1033 system("reboot"); 1034 1034 } … … 1521 1521 } 1522 1522 } 1523 sy stem("sync");1523 sync(); 1524 1524 #else 1525 1525 log_it("New, kernel-friendly partition remover"); … … 1584 1584 // close fdisk 1585 1585 fput_string_one_char_at_a_time(pout_to_fdisk, "w\n"); 1586 sy stem("sync");1586 sync(); 1587 1587 paranoid_pclose(pout_to_fdisk); 1588 1588 log_msg(0, … … 2215 2215 log_msg(1, "Warning - unable to stop some RAID devices"); 2216 2216 } 2217 sy stem("sync");2218 sy stem("sync");2219 sy stem("sync");2217 sync(); 2218 sync(); 2219 sync(); 2220 2220 sleep(1); 2221 2221 return (retval); -
branches/2.2.10/mondo/src/mondorestore/mondo-rstr-tools.c
r2357 r2376 624 624 log_msg(2, "Failed to mount device."); 625 625 sleep(5); 626 run_program_and_log_output("sync", FALSE);626 sync(); 627 627 } 628 628 } … … 1371 1371 name = read_cfg_var(g_mondo_cfg_file, "bootloader.name"); 1372 1372 log_msg(2, "run_boot_loader: device='%s', name='%s'", device, name); 1373 sy stem("sync");1373 sync(); 1374 1374 1375 1375 offer_to_make_initrd(); … … 2026 2026 } 2027 2027 2028 paranoid_system("sync");2028 sync(); 2029 2029 2030 2030 mr_asprintf(tmp, "cp -f %s " MNT_RESTORING "/var/log", MONDO_LOGFILE); -
branches/2.2.10/mondo/src/mondorestore/mondorestore.c
r2352 r2376 811 811 log_to_screen("Preparing to format your disk(s)"); 812 812 sleep(1); 813 sy stem("sync");813 sync(); 814 814 log_to_screen("Please wait. This may take a few minutes."); 815 815 res += format_everything(mountlist, FALSE, raidlist); … … 2925 2925 "Run complete. Please remove media and reboot."); 2926 2926 } else { 2927 run_program_and_log_output("sync", FALSE);2927 sync(); 2928 2928 if (is_this_device_mounted(MNT_CDROM)) { 2929 2929 run_program_and_log_output("umount " MNT_CDROM, FALSE);
Note:
See TracChangeset
for help on using the changeset viewer.