Changeset 2211 in MondoRescue for branches/2.2.9/mondo/src/common/libmondo-verify.c
- Timestamp:
- Jun 3, 2009, 7:10:19 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.9/mondo/src/common/libmondo-verify.c
r1747 r2211 1 1 /*************************************************************************** 2 libmondo-verify.c - description 3 ----------------- 4 5 begin: Fri Apr 19 16:40:35 EDT 2002 6 copyright : (C) 2002 Mondo Hugo Rabson 7 email : Hugo Rabson <hugorabson@msn.com> 8 edited by : by Stan Benoit 4/2002 9 email : troff@nakedsoul.org 10 cvsid : $Id$ 2 $Id$ 11 3 ***************************************************************************/ 12 13 /***************************************************************************14 * *15 * This program is free software; you can redistribute it and/or modify *16 * it under the terms of the GNU General Public License as published by *17 * the Free Software Foundation; either version 2 of the License, or *18 * (at your option) any later version. *19 * *20 ***************************************************************************/21 /* mondo-verify22 23 24 07/0725 - added star verify support26 27 04/04/200428 - added star support29 30 10/23/200331 - changed "ISO #n" to "<media descriptor> #n"32 33 10/0134 - working on biggiefile verification (CDs)35 36 09/1637 - fixed bug in CD biggie verif'n38 39 09/1540 - state explicitly that we do not verify disk images41 42 09/1343 - working on verify_all_slices_on_CD()44 45 09/0146 - write list of changed biggiefiles (streaming only) to changed.files47 48 05/0549 - exclude /dev/ * from list of changed files50 - add Joshua Oreman's FreeBSD patches51 52 04/24/200353 - added lots of assert()'s and log_OS_error()'s54 55 09/01 - 09/30/200256 - run_program_and_log_output() now takes boolean operator to specify57 whether it will log its activities in the event of _success_58 - eject_device() added59 - cleaned up 'changed file' feedback a little bit60 61 08/01 - 08/3162 - make sure to prefix bkpinfo->restore_path to local biggiefile fname when63 comparing it to the archived copy of biggiefile; otherwise, biggiefile64 not found & checksum missing & so on65 - exclude "incheckentry xwait()" from changed.files66 - cleaned up some log_it() calls67 68 07/01 - 07/3169 - renamed libmondo-verify.c70 - say 'bigfile' not 'biggiefile'71 - exclude /dev/ * from changed.files72 73 01/01 - 06/3074 - remove /tmp/changed.files.* dead files75 - don't pclose() tape after calling closein_tape(): the latter does it already76 - fixed bug in verify_cd_image()'s CD-mounting code77 - don't write to screen "old cksum.. curr cksum.."78 - changed the gawks to awks for the benefit of Debian79 - handles files >2GB in size80 - fixed bug in /tmp/changed.files-generator81 - re-enabled a lot of CD-verification code82 - afioballs are saved in %s/tmpfs/ now (%s=tmpdir)83 - changed some labels to make them more user-friendly84 - don't chdir() anywhere before verifying stuff85 - changed files are now detected by verify_tape_backup() and listed in86 /tmp/changed.files87 - replaced &> with > .. 2>88 - still implementing improved tape support89 90 91 Started late Dec, 200192 93 -----------------------------------------------------------------------------94 */95 4 96 5 … … 101 10 102 11 #include "my-stuff.h" 12 #include "mr_mem.h" 103 13 #include "mondostructures.h" 104 14 #include "libmondo-verify.h" … … 419 329 bkpinfo->restore_path, 420 330 biggiestruct.filename); 421 asprintf(&tmp, "echo \"%s/%s not found\" >> %s/biggies.changed",331 mr_asprintf(&tmp, "echo \"%s/%s not found\" >> %s/biggies.changed", 422 332 bkpinfo->restore_path, 423 333 biggiestruct.filename, … … 1070 980 assert(bkpinfo != NULL); 1071 981 1072 asprintf(&fname, "%s1", bkpinfo->media_device);982 mr_asprintf(&fname, "%s1", bkpinfo->media_device); 1073 983 if (is_this_device_mounted(fname)) { 1074 984 log_msg(1, "USB device mounted. Remounting it at the right place"); 1075 asprintf(&tmp, "umount %s", fname);985 mr_asprintf(&tmp, "umount %s", fname); 1076 986 run_program_and_log_output(tmp, FALSE); 1077 987 paranoid_free(tmp); … … 1080 990 1081 991 log_msg(1, "Mounting USB device."); 1082 asprintf(&mountpoint, "%s/usb", bkpinfo->tmpdir);1083 asprintf(&tmp, "mkdir -p %s", mountpoint);992 mr_asprintf(&mountpoint, "%s/usb", bkpinfo->tmpdir); 993 mr_asprintf(&tmp, "mkdir -p %s", mountpoint); 1084 994 run_program_and_log_output(tmp, FALSE); 1085 995 paranoid_free(tmp); 1086 996 /* Mindi always create one single parition on the USB dev */ 1087 asprintf(&tmp, "mount %s1 %s", bkpinfo->media_device, mountpoint);997 mr_asprintf(&tmp, "mount %s1 %s", bkpinfo->media_device, mountpoint); 1088 998 ret = run_program_and_log_output(tmp, FALSE); 1089 999 paranoid_free(tmp); … … 1095 1005 sync(); 1096 1006 log_msg(2, "OK, I've mounted the USB Disk/Key\n"); 1097 asprintf(&tmp, "%s/archives/NOT-THE-LAST", mountpoint);1007 mr_asprintf(&tmp, "%s/archives/NOT-THE-LAST", mountpoint); 1098 1008 if (!does_file_exist(tmp)) { 1099 1009 log_msg … … 1112 1022 verify_all_slices_on_CD(mountpoint); 1113 1023 1114 asprintf(&tmp1, "umount %s", mountpoint);1024 mr_asprintf(&tmp1, "umount %s", mountpoint); 1115 1025 #ifdef __FreeBSD__ 1116 1026 ret += system(tmp1); … … 1121 1031 #endif 1122 1032 { 1123 asprintf(&tmp, "%s failed; unable to unmount USB device\n", tmp1);1033 mr_asprintf(&tmp, "%s failed; unable to unmount USB device\n", tmp1); 1124 1034 log_to_screen(tmp); 1125 1035 paranoid_free(tmp);
Note:
See TracChangeset
for help on using the changeset viewer.