Changeset 2030 in MondoRescue
- Timestamp:
- Oct 3, 2008, 1:50:44 AM (17 years ago)
- Location:
- branches/2.2.7/mondo/src
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.7/mondo/src/common/libmondo-archive.c
r1967 r2030 62 62 extern bool g_cd_recovery; 63 63 extern char *g_mondo_home; 64 /* 64 65 extern char *g_tmpfs_mountpt; 66 */ 65 67 extern char *g_serial_string; 66 68 extern char *g_getfacl; … … 285 287 int retval = 0; 286 288 int res = 0; 289 int tries = 0; 290 /* 287 291 int i = 0; 288 int tries = 0;289 292 static int free_ramdisk_space = 9999; 293 */ 290 294 291 295 /*@ buffers ************************************************************ */ … … 374 378 } 375 379 380 /* 376 381 if (g_tmpfs_mountpt[0] != '\0') { 377 382 i = atoi(call_program_and_get_last_line_of_output … … 389 394 } 390 395 } 396 */ 391 397 paranoid_free(command); 392 398 paranoid_free(zipparams); -
branches/2.2.7/mondo/src/common/libmondo-fifo.c
r1645 r2030 1 /* libmondo-fifo.c1 /* 2 2 $Id$ 3 4 5 04/176 - replaced INTERNAL_TAPE_BLK_SIZE with bkpinfo->internal_tape_block_size7 8 04/04/20049 - ps wax is now ps wwax10 11 09/10/200312 - p75 is now p80 in outopening tape call13 - negotiate largest buffer possible when opening tape drive14 - fall back to dd if buffer fails15 16 09/0917 - better logging for tape users18 - working on try_hard_to_fwrite(), try_hard_to_fread()19 - replaced internal w/ EXTERNAL 'buffer' exe.20 21 08/3022 - tweaked error msgs in try_hard_to_fwrite()23 24 08/0225 - updated is_incoming_block_valid() to make it26 return end-of-tape if >300 flotsam blocks27 28 05/0229 - when logging tape errors, don't repeat self30 31 04/2432 - added lots of log_OS_error()'s and assert()'s33 34 04/2235 - copy_file_from_here_to_there() --- added a bit of fault tolerance;36 if write fails, retry a few times before reporting error37 38 04/07/200339 - line 866 --- set block_size used by internal buffer to 32768;40 was INTERNAL_TAPE_BLK_SIZE/241 42 10/01 - 11/30/200243 - is_incoming_block_valid() --- always make44 checksums %65536, just in case int size is45 odd (GRRR, ArkLinux)46 - disabled rotor-related superfluous warnings47 - added INTERNAL_TAPE_BLK_SIZE48 - do_sem() now returns int explicitly49 - changed internal_block_size50 - some irregularities (e.g. bad 'type'-ing) found by Kylix; fixed by Hugo51 52 09/01 - 09/3053 - change 64k to TAPE_BLOCK_SIZE54 - added internal_block_size; set it to TAPE_BLOCK_SIZE*255 - if data is flowing FROM tape TO hard disk then set the threshold to 10 (not 75)56 - lots of multitape-related fixes57 - finally caught & fixed the 'won't finish unzipping last bigfile' bug58 - added WIFEXITED() after waitpid(), to improve multi-tape support59 60 08/01 - 08/3161 - trying to catch & stop 'won't finish unzipping last bigfile' bug by62 changing the copy_file_rom_here_to_there code63 - changed % threshold from 95 back to 7564 - don't insist on full 256K write of last block to tape65 - if >25 secs go by & all data (AFAIK) has been copied thru by FIFO wrapper66 and g_tape_stream is _still_ not closed then shrug shoulders & pthread_exit67 anyway...68 - change fprintf()'s to log_it()'s69 - added a header+footer to each block as it is read/written to/from tape70 by copy_file_from_here_to_there71 - wrote workaround to allow >2GB of archives w/buffering72 - changed % threshold from 75 to 9573 - added calls to set_signals(); 'buffer' was killing mondoarchive as74 it terminated75 - cleaned up struct-passing, to improve reliability and eliminate76 some race conditions77 - changed some forks to pthreads78 - added some comments79 - created libfifo{.c,.h,-EXT.h}80 - copied core of 'buffer' here81 - added some other, Mondo-specific functions82 - hacked 'buffer' into user-friendliness83 3 */ 84 4 … … 99 19 #include <sys/stat.h> 100 20 #include <sys/ipc.h> 101 #include <sys/shm.h>102 #include <sys/sem.h>103 #include <sys/wait.h>104 #include <pthread.h>105 21 106 22 #include "my-stuff.h" -
branches/2.2.7/mondo/src/common/libmondo-filelist.c
r1967 r2030 1 /* libmondo-filelist.c1 /* 2 2 $Id$ 3 4 - for subroutines which manipulate the filelist5 6 7 01/11/20058 - change time_of_last_full_backup = to st_mtime to allow manipulation of9 - /var/cache/mondo-archive/difflevel.010 - Conor Daly <conor.daly@met.ie>11 12 10/0113 - don't try to sort non-existent file; return 0 instead14 15 09/1416 - dropped 'sort -o' (busybox doesn't support); use 'sort > ' instead17 18 08/0219 - add \ in front of [, ], ? or * when generating filelist subset20 21 07/2722 - sort filelists after creating them23 24 07/1425 - disabled ACL, xattr stuff; moved it to libmondo-archive.c26 - max sane size for a file is now 32MB27 28 07/1029 - added ACL and xattr support for afio users30 31 07/0532 - exclude /dev/shm from backup (Roberto Alsina)33 34 06/0935 - exclude /media/floppy or SuSE 9.1 freezes :(36 37 01/18/200438 - exclude /sys as well as /proc39 40 10/18/200341 - load_filelist() --- make sure you add the paths42 leading to the file, e.g. if you add /usr/lib/thingy.so43 then add /usr, /usr/lib first44 - rewritten load_filelist(), save_filelist(),45 - add_string_at_node(), find_string_at_node(),46 - save_filelist_entries_in_common()47 48 09/2749 - line 1269 had one too many '%s's50 51 09/2652 - fix newt* to be enclosed in #ifndef _XWIN53 - added superior progress display to mondo_makefilelist()54 55 09/1856 - call locate w/ 2> /dev/null at end of str57 58 09/1659 - replaced mondo-makefilelist with C subroutine60 61 06/0662 - fixed silly bug in load_filelist() which stopped63 funny German filenames from being handled properly64 65 05/1966 - misc clean-up (Steve Hindle)67 68 05/0469 - added Herman Kuster's multi-level bkp patch70 71 04/2672 - maximum max_set_size_for_a_file = maxsetsizeK*273 - maximum is also 32MB74 75 04/2476 - added lots of assert()'s and log_OS_error()'s77 78 04/2279 - added lots of asserts() and log_OS_errors()'s80 81 04/0782 - cleaned up code a bit83 84 04/0485 - max_sane_size_for_a_file = maxsetsizeK*2 (was *8)86 87 01/02/200388 - tell mondo-makefilelist that it's a custom catalog (if it is)89 90 10/01 - 10/31/200291 - don't make large .bz2 or .tbz files into biggiefiles92 - max_sane_size_for_a_file = maxsetsizeK*8, or 64MB93 ...whichever is smaller94 95 08/01 - 08/3196 - if last filelist is <=2 bytes long then delete it97 - max_sane_size_for_a_file = maxsetsizeK98 (was SLICESIZE*4 or something)99 - cleaned up some log_it() calls100 101 07/26102 - started103 3 */ 104 4 -
branches/2.2.7/mondo/src/common/libmondo-tools.c
r1999 r2030 1 /* libmondo-tools.c misc tools1 /* 2 2 $Id$ 3 3 */ … … 64 64 /** 65 65 * The location where tmpfs is mounted, or "" if it's not mounted. 66 */67 66 char *g_tmpfs_mountpt = NULL; 67 */ 68 68 char *g_magicdev_command = NULL; 69 69 … … 426 426 char *hostname, *ip_address; 427 427 int retval = 0; 428 long avm = 0;429 428 char *colon; 430 429 char *cdr_exe; 431 430 char *tmp; 432 431 char call_before_iso_user[MAX_STR_LEN] = "\0"; 432 /* 433 long avm = 0; 433 434 int rdsiz_MB; 435 */ 434 436 char *iso_dev; 435 437 char *iso_mnt; … … 471 473 run_program_and_log_output("cat /etc/*-release", 5); 472 474 run_program_and_log_output("cat /etc/*issue*", 5); 475 /* 473 476 sprintf(g_tmpfs_mountpt, "%s/tmpfs", bkpinfo->tmpdir); 474 477 sprintf(command, "mkdir -p %s", g_tmpfs_mountpt); 475 478 paranoid_system(command); 476 479 rdsiz_MB = PPCFG_RAMDISK_SIZE + g_tape_buffer_size_MB; 480 */ 477 481 #ifdef __FreeBSD__ 482 /* 478 483 strcpy(tmp, 479 484 call_program_and_get_last_line_of_output … … 486 491 sprintf(command, "mdmfs -s %d%c md9 %s", rdsiz_MB, 'm', 487 492 g_tmpfs_mountpt); 493 */ 488 494 #else 495 /* 489 496 strcpy(tmp, 490 497 call_program_and_get_last_line_of_output … … 493 500 sprintf(command, "mount /dev/shm -t tmpfs %s -o size=%d%c", 494 501 g_tmpfs_mountpt, rdsiz_MB, 'm'); 502 */ 495 503 run_program_and_log_output("cat /proc/cpuinfo", 5); 496 504 run_program_and_log_output … … 498 506 5); 499 507 #endif 508 /* 500 509 if (avm / 1024 > rdsiz_MB * 3) { 501 510 if (run_program_and_log_output(command, 5)) { … … 509 518 log_it("It doesn't seem you have enough swap to use tmpfs. Fine."); 510 519 } 520 */ 511 521 512 522 if (bkpinfo->use_lzo) { … … 1429 1439 malloc_string(g_boot_mountpt); 1430 1440 malloc_string(g_mondo_home); 1441 /* 1431 1442 malloc_string(g_tmpfs_mountpt); 1443 */ 1432 1444 malloc_string(g_serial_string); 1433 1445 malloc_string(g_magicdev_command); … … 1435 1447 paranoid_free(g_boot_mountpt); 1436 1448 paranoid_free(g_mondo_home); 1449 /* 1437 1450 paranoid_free(g_tmpfs_mountpt); 1451 */ 1438 1452 paranoid_free(g_serial_string); 1439 1453 paranoid_free(g_magicdev_command); -
branches/2.2.7/mondo/src/common/newt-specific.c
r1999 r2030 37 37 38 38 extern pid_t g_mastermind_pid; 39 /* 39 40 extern char *g_tmpfs_mountpt; 41 */ 40 42 extern char *g_boot_mountpt; 41 43 extern char *ps_options; … … 324 326 kill_anything_like_this("ntfsclone"); 325 327 sync(); 328 /* 326 329 sprintf(tmp, "umount %s", g_tmpfs_mountpt); 327 chdir("/");328 330 for (i = 0; i < 10 && run_program_and_log_output(tmp, 5); i++) { 329 331 log_msg(2, "Waiting for child processes to terminate"); … … 331 333 run_program_and_log_output(tmp, 5); 332 334 } 333 335 */ 336 337 chdir("/"); 334 338 if (g_selfmounted_isodir) { 335 339 sprintf(command, "umount %s", g_selfmounted_isodir); -
branches/2.2.7/mondo/src/include/my-stuff.h
r2029 r2030 37 37 #endif 38 38 #include <sys/types.h> 39 #include <sys/shm.h>40 39 #include <sys/ipc.h> 41 40 #include <sys/ioctl.h> … … 323 322 #define DONT_KNOW_HOW_TO_EVALUATE_THIS_DEVICE_TYPE "/dev/md" 324 323 #define RAID_DEVICE_STUB DONT_KNOW_HOW_TO_EVALUATE_THIS_DEVICE_TYPE 325 #define SANE_FORMATS "swap image vfat ext2 ext3 xfs vfs jfs reiserfs vmfs dos minix coda nfs ntfs hpfs raid lvm cifs "324 #define SANE_FORMATS "swap image vfat ext2 ext3 xfs vfs jfs reiserfs vmfs dos minix coda nfs ntfs hpfs raid lvm cifs ocfs ocfs2" 326 325 #define ALT_TAPE "/dev/ht0" 327 326 #define MKE2FS_OR_NEWFS "mke2fs" … … 349 348 #define ARCH_BUFFER_NUM (ARCH_THREADS*4) // Number of permissible queued afio files 350 349 #define FORTY_SPACES " " ///< 40 spaces. 351 #define PPCFG_RAMDISK_SIZE 350 ///< Size of the tmpfs, in megabytes, to attempt to mount (to speed up Mondo). 350 ///< Size of the tmpfs, in megabytes, to attempt to mount (to speed up Mondo). 351 /* 352 #define PPCFG_RAMDISK_SIZE 350 353 */ 352 354 353 355 #define DO_MBR_PLEASE "/tmp/DO-MBR-PLEASE" -
branches/2.2.7/mondo/src/mondoarchive/mondoarchive.c
r1967 r2030 136 136 log_msg(2, "Unmounting old ramdisks if necessary"); 137 137 stop_magicdev_if_necessary(); // for RH+Gnome users 138 /* 138 139 run_program_and_log_output 139 140 ("umount `mount | grep shm | grep mondo | cut -d' ' -f3`", 2); 141 */ 140 142 unmount_supermounts_if_necessary(); // for Mandrake users whose CD-ROMs are supermounted 141 143 // stop_autofs_if_necessary(); // for Xandros users -
branches/2.2.7/mondo/src/mondorestore/mondo-rstr-tools.c
r2029 r2030 45 45 extern bool g_ISO_restore_mode; /* are we in Iso Mode? */ 46 46 extern bool g_I_have_just_nuked; 47 /* 47 48 extern char *g_tmpfs_mountpt; 49 */ 48 50 extern char *g_isodir_device; 49 51 extern char *g_isodir_format; … … 97 99 paranoid_free(g_mountlist_fname); 98 100 paranoid_free(g_mondo_home); 101 /* 99 102 paranoid_free(g_tmpfs_mountpt); 103 */ 100 104 paranoid_free(g_isodir_device); 101 105 paranoid_free(g_isodir_format); … … 1932 1936 malloc_string(g_mountlist_fname); 1933 1937 malloc_string(g_mondo_home); 1938 /* 1934 1939 malloc_string(g_tmpfs_mountpt); 1940 */ 1935 1941 malloc_string(g_isodir_device); 1936 1942 malloc_string(g_isodir_format); -
branches/2.2.7/mondo/src/mondorestore/mondorestore.c
r2022 r2030 39 39 * Globals * 40 40 **************************************************************************/ 41 /* 41 42 extern char *g_tmpfs_mountpt; // declared in libmondo-tools.c 43 */ 42 44 extern bool g_text_mode; 43 45 extern FILE *g_fprep; … … 2949 2951 strcpy(g_mondo_home, 2950 2952 call_program_and_get_last_line_of_output("which mondorestore")); 2953 /* 2951 2954 sprintf(g_tmpfs_mountpt, "/tmp/tmpfs"); 2952 2955 make_hole_for_dir(g_tmpfs_mountpt); 2956 */ 2953 2957 g_current_media_number = 1; // precaution 2954 2958
Note:
See TracChangeset
for help on using the changeset viewer.