Changeset 1079 in MondoRescue for trunk/mondo
- Timestamp:
- Jan 28, 2007, 5:58:18 PM (17 years ago)
- Location:
- trunk/mondo
- Files:
-
- 1 deleted
- 31 edited
- 3 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/mondo/INSTALL
r129 r1079 13 13 configure --with-maximum-noof-media=<big-number>. To make a statically 14 14 linked mondorestore (not tested), configure --enable-static-mr. 15 16 15 17 16 [original entry] -
trunk/mondo/Makefile.am
r824 r1079 2 2 SUBDIRS = src po 3 3 man8_MANS = docs/man/mondoarchive.8 docs/man/mondorestore.8 4 5 4 ACLOCAL_AMFLAGS = -I m4 6 7 EXTRA_DIST = config.rpath mkinstalldirs8 9 -
trunk/mondo/bootstrap
r507 r1079 1 1 #!/bin/bash 2 # 3 # $Id$ 2 4 # 3 5 # Built from scratch -
trunk/mondo/configure.in
r932 r1079 74 74 AC_CHECK_LIB(pthread, pthread_create, true, [echo "*** Cannot find -lpthread."; echo "*** Please make sure you have the linuxthreads glibc add-on installed."; exit 1]) 75 75 PTHREAD="-lpthread" 76 CFLAGS="$CFLAGS -Wall -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_ REENTRANT"76 CFLAGS="$CFLAGS -Wall -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_REENTRANT -Wshadow -funsigned-char -Wstrict-prototypes -Wunused -Winit-self -Wcast-align" 77 77 ;; 78 78 *) -
trunk/mondo/distributions/rpm/mondo.spec
r1043 r1079 16 16 Source: SSS 17 17 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -u -n) 18 BuildRequires: newt-devel >= 0.50 18 BuildRequires: newt-devel >= 0.50, gettext-devel 19 19 ExcludeArch: ppc 20 20 OBS 21 Requires: mindi >= 1.2.1, bzip2 >= 0.9, afio, mkisofs, binutils, newt >= 0.50, DDD21 Requires: mindi >= 1.2.1, bzip2 >= 0.9, afio, mkisofs, binutils, newt >= 0.50, gettext, DDD 22 22 %ifarch ia64 23 23 Requires: elilo, parted -
trunk/mondo/po/POTFILES.in
r975 r1079 39 39 src/common/newt-specific.h 40 40 src/common/libmondo-tools.h 41 src/common/libmondo-string.c42 41 src/common/libmondo-fork.h 43 42 src/common/libmondo-files.h 44 43 src/common/libmondo-filelist.c 45 src/common/libmondo-string.h46 44 src/common/libmondo-raid.c 47 45 src/common/libmondo-filelist.h … … 49 47 src/common/libmondo-raid.h 50 48 src/common/mondostructures.h 51 src/common/libmondo-msg.c52 49 src/common/libmondo-archive.h 53 50 src/common/libmondo-stream.c -
trunk/mondo/src/common/Makefile.am
r839 r1079 1 ## 2 ## $Id$ 1 3 ## 2 4 ## Process this file with Automake to generate `Makefile.in' -
trunk/mondo/src/common/libmondo-archive.c
r1074 r1079 32 32 #include "libmondo-verify-EXT.h" 33 33 #include "libmondo-archive.h" 34 34 35 #define DVDRWFORMAT 1 35 36 … … 544 545 char *tmp = NULL; 545 546 char *tmp1 = NULL; 547 char *tmp2 = NULL; 546 548 char *command = NULL; 547 549 char *use_lzo_sz = NULL; … … 786 788 mr_asprintf(&value, "dvd"); 787 789 break; 790 case usb: 791 strcpy(value, "usb"); 792 break; 788 793 default: 789 794 fatal_error("Unknown backup_media_type"); … … 854 859 log_msg(1, "lines_in_filelist = %ld", lines_in_filelist); 855 860 861 if (bkpinfo->backup_media_type == usb) { 862 asprintf(&tmp2, "--usb %s", bkpinfo->media_device); 863 } else { 864 asprintf(&tmp2,""); 865 } 866 856 867 // Watch it! This next line adds a parameter... 857 868 if (bkpinfo->nonbootable_backup) { … … 862 873 863 874 mr_asprintf(&command, 864 /* "mindi --custom 2=%s 3=%s/images 4=\"%s\" 5=\"%s\" \ 865 6=\"%s\" 7=%ld 8=\"%s\" 9=\"%s\" 10=\"%s\" \ 866 11=\"%s\" 12=%s 13=%ld 14=\"%s\" 15=\"%s\" 16=\"%s\" 17=\"%s\" 18=%ld 19=%d",*/ 867 "mindi --custom %s %s/images '%s' '%s' \ 875 "mindi %s --custom '%s' '%s/images' '%s' '%s' \ 868 876 '%s' %ld '%s' '%s' '%s' \ 869 '%s' %s %ld '%s' '%s' '%s' '%s' %ld %d '%s'", bkpinfo->tmpdir, // parameter #2 870 bkpinfo->scratchdir, // parameter #3 871 bkpinfo->kernel_path, // parameter #4 872 tape_device, // parameter #5 873 tape_size_sz, // parameter #6 874 lines_in_filelist, // parameter #7 (INT) 875 use_lzo_sz, // parameter #8 876 cd_recovery_sz, // parameter #9 877 bkpinfo->image_devs, // parameter #10 878 broken_bios_sz, // parameter #11 879 last_filelist_number, // parameter #12 (STRING) 880 estimated_total_noof_slices, // parameter #13 (INT) 881 devs_to_exclude, // parameter #14 882 use_comp_sz, // parameter #15 883 use_lilo_sz, // parameter #16 884 use_star_sz, // parameter #17 885 bkpinfo->internal_tape_block_size, // parameter #18 (LONG) 886 bkpinfo->differential, // parameter #19 (INT) 887 use_gzip_sz, // parameter #20 (STRING) 888 tmp); 877 '%s' %s %ld '%s' '%s' '%s' '%s' %ld %d '%s'", 878 tmp2, 879 bkpinfo->tmpdir, // parameter #2 880 bkpinfo->scratchdir, // parameter #3 881 bkpinfo->kernel_path, // parameter #4 882 tape_device, // parameter #5 883 tape_size_sz, // parameter #6 884 lines_in_filelist, // parameter #7 (INT) 885 use_lzo_sz, // parameter #8 886 cd_recovery_sz, // parameter #9 887 bkpinfo->image_devs, // parameter #10 888 broken_bios_sz, // parameter #11 889 last_filelist_number, // parameter #12 (STRING) 890 estimated_total_noof_slices, // parameter #13 (INT) 891 devs_to_exclude, // parameter #14 892 use_comp_sz, // parameter #15 893 use_lilo_sz, // parameter #16 894 use_star_sz, // parameter #17 895 bkpinfo->internal_tape_block_size, // parameter #18 (LONG) 896 bkpinfo->differential, // parameter #19 (INT) 897 use_gzip_sz, // parameter #20 (STRING) 898 tmp); 889 899 mr_free(tmp); 890 900 mr_free(tape_size_sz); … … 899 909 mr_free(use_lilo_sz); 900 910 mr_free(use_gzip_sz); 911 mr_free(tmp2); 901 912 902 913 log_msg(2, command); -
trunk/mondo/src/common/libmondo-devices.c
r1000 r1079 1 /* 2 *$Id$3 * Subroutines for handling devices 4 */ 1 /* libmondo-devices.c Subroutines for handling devices 2 $Id$ 3 */ 4 5 5 /** 6 6 * @file … … 1469 1469 case cdrw: 1470 1470 case dvd: 1471 case usb: 1471 1472 if (archiving_to_media) { 1472 if ( bkpinfo->backup_media_type != dvd) {1473 if ((bkpinfo->backup_media_type != dvd) && (bkpinfo->backup_media_type != usb)) { 1473 1474 if (ask_me_yes_or_no 1474 1475 (_("Is your computer a laptop, or does the CD writer incorporate BurnProof technology?"))) … … 1490 1491 mr_asprintf(&sz_size, "%d", DEFAULT_DVD_DISK_SIZE); // 4.7 salesman's GB = 4.482 real GB = 4582 MB 1491 1492 log_msg(1, "Setting to DVD defaults"); 1493 } else if (bkpinfo->backup_media_type == usb) { 1494 strcpy(bkpinfo->media_device, VANILLA_USB_DEVICE); 1495 strcpy(sz_size, "512"); 1492 1496 } else { 1493 1497 mr_allocstr(bkpinfo->media_device,VANILLA_SCSI_CDROM ); … … 1496 1500 log_msg(1, "Setting to CD defaults"); 1497 1501 } 1498 if ( bkpinfo->backup_media_type != dvd) {1502 if ((bkpinfo->backup_media_type != dvd) && (bkpinfo->backup_media_type != usb)) { 1499 1503 if (!popup_and_get_string(_("Speed"), comment, tmp)) { 1500 1504 log_to_screen(_("User has chosen not to backup the PC")); -
trunk/mondo/src/common/libmondo-fifo.c
r956 r1079 1 1 /* $Id$ */ 2 3 2 /** 4 3 * @file -
trunk/mondo/src/common/libmondo-fork.c
r900 r1079 2 2 * $Id$ 3 3 */ 4 5 4 #include "my-stuff.h" 6 5 #include "mondostructures.h" -
trunk/mondo/src/common/libmondo-raid.c
r900 r1079 17 17 #include "libmondo-raid.h" 18 18 #include "mr_mem.h" 19 #include "mr_str.h" 19 20 20 21 #ifdef __FreeBSD__ -
trunk/mondo/src/common/libmondo-tools.c
r1046 r1079 181 181 182 182 /** 183 * Locate mondoarchive's home directory. Searches in /usr/ local/mondo, /usr/share/mondo,183 * Locate mondoarchive's home directory. Searches in /usr/share/mondo, 184 184 * /usr/local/share/mondo, /opt, or if all else fails, search /usr. 185 185 * -
trunk/mondo/src/common/libmondo-verify.c
r1074 r1079 1 1 /* $Id$ */ 2 3 2 /** 4 3 * @file -
trunk/mondo/src/common/mondostructures.h
r1043 r1079 167 167 nfs, ///< Back up to an NFS mount on the local subnet. 168 168 tape, ///< Back up to tapes. 169 usb, ///< Back up to USB devices. 169 170 udev ///< Back up to another unsupported device; just send a stream of bytes. 170 171 } t_bkptype; … … 312 313 * The device we're backing up to. 313 314 * If backup_media_type is @b cdr, @b cdrw, or @b cdstream, this should be the SCSI node (e.g. 0,1,0). 314 * If backup_media_type is @b dvd, @b tape, or @b udev, this should be a /dev entry.315 * If backup_media_type is @b dvd, @b tape, @b usb or @b udev, this should be a /dev entry. 315 316 * If backup_media_type is anything else, this should be blank. 316 317 */ -
trunk/mondo/src/include/mr_conf.h
-
Property svn:eol-style
set to
native
-
Property svn:eol-style
set to
-
trunk/mondo/src/include/mr_str.h
-
Property svn:eol-style
set to
native
-
Property svn:eol-style
set to
-
trunk/mondo/src/include/my-stuff.h
-
Property svn:eol-style
set to
native
r1074 r1079 126 126 #define ARBITRARY_MAXIMUM 2000 ///< The maximum number of items showing at once in the mountlist or filelist editor. 127 127 #define MAX_TAPECATALOG_ENTRIES 8192 ///< The maximum number of entries in the tape catalog. 128 #define MAX_STR_LEN 380 ///< The maximum length of almost all @p char buffers in Mondo. 128 #define MAX_STR_LEN 384 ///< The maximum length of almost all @p char buffers in Mondo. 129 /// Note: Make this divisible by eight to avoid aligment issues 130 /// on 64bit platforms like ia64. 129 131 #define MAXIMUM_RAID_DEVS 32 ///< The maximum number of RAID devices in the raidlist. 130 132 #define MAXIMUM_ADDITIONAL_RAID_VARS 32 ///< The maximum number of additional RAID variables per RAID device in the raidlist. -
Property svn:eol-style
set to
-
trunk/mondo/src/lib/mr_conf.c
-
Property svn:eol-style
set to
native
-
Property svn:eol-style
set to
-
trunk/mondo/src/lib/mr_str.c
-
Property svn:eol-style
set to
native
-
Property svn:eol-style
set to
-
trunk/mondo/src/mondoarchive/Makefile.am
r900 r1079 1 ## $Id$ 2 ## 1 3 ## $Id$ 2 4 ## -
trunk/mondo/src/mondoarchive/mondo-cli.c
r1043 r1079 216 216 i = flag_set['c'] + flag_set['i'] + flag_set['n'] + 217 217 flag_set['t'] + flag_set['u'] + flag_set['r'] + 218 flag_set['w'] + flag_set['C'] ;218 flag_set['w'] + flag_set['C'] + flag_set['U']; 219 219 if (i == 0) { 220 220 retval++; … … 404 404 } 405 405 406 if (flag_set['U']) // USB 407 { 408 if (! flag_set['d']) { 409 fatal_error 410 ("You need to specify a device file with -d for bootable USB device creation"); 411 } 412 if (!flag_set['s']) { 413 fatal_error("You did not specify a size (-s) for your USB device. Aborting"); 414 } 415 } 416 406 417 if (flag_set['r']) // DVD 407 418 { … … 453 464 } 454 465 } 455 } else { /* CD size */466 } else { /* CD|USB size */ 456 467 if (flag_set['s']) { 457 468 if (process_the_s_switch(bkpinfo, flag_val['s'])) { … … 505 516 if (flag_set['w']) { 506 517 bkpinfo->backup_media_type = cdrw; 518 } 519 if (flag_set['U']) { 520 bkpinfo->backup_media_type = usb; 507 521 } 508 522 if (flag_set['z']) { … … 641 655 } 642 656 643 if (flag_set['d']) { /* backup directory (if ISO/NFS ) */657 if (flag_set['d']) { /* backup directory (if ISO/NFS/USB) */ 644 658 if (flag_set['i']) { 645 659 mr_allocstr(bkpinfo->isodir,flag_val['d']); … … 653 667 mr_allocstr(bkpinfo->nfs_remote_dir,flag_val['d']); 654 668 } else { /* backup device (if tape/CD-R/CD-RW) */ 655 656 669 mr_allocstr(bkpinfo->media_device, flag_val['d']); 657 670 } … … 673 686 674 687 if (!flag_set['d'] 675 && (flag_set['c'] || flag_set['w'] || flag_set['C'] )) {688 && (flag_set['c'] || flag_set['w'] || flag_set['C'] || flag_set['U'])) { 676 689 if (g_kernel_version >= 2.6) { 677 690 if (popup_and_get_string … … 902 915 while ((opt = 903 916 getopt(argc, argv, 904 "0123456789A:B:C:DE:FGHI:J:K:LNOP:QRS:T: VWb:c:d:ef:gik:l:mn:op:rs:tuw:x:z"))917 "0123456789A:B:C:DE:FGHI:J:K:LNOP:QRS:T:UVWb:c:d:ef:gik:l:mn:op:rs:tuw:x:z")) 905 918 != -1) { 906 919 if (opt == '?') { -
trunk/mondo/src/mondorestore/Makefile.am
r900 r1079 1 ## $Id$ 2 ## 1 3 ## $Id$ 2 4 ## 3 5 ## Process with Automake to generate Makefile.in 4 6 ## 7 AM_CPPFLAGS = -DMONDO_CONF_DIR=\"$(sysconfdir)\" -I${top_builddir}/src/include 5 8 6 9 AM_CPPFLAGS = -DMONDO_CONF_DIR=\"$(sysconfdir)\" -I${top_builddir}/src/include -
trunk/mondo/src/mondorestore/mondo-restore.c
r1043 r1079 1 1 /*************************************************************************** 2 * $Id$ 3 */ 2 $Id$ 3 restores mondoarchive data 4 ***************************************************************************/ 4 5 5 6 /** … … 2156 2157 mr_free(tarball_fname); 2157 2158 mr_asprintf(&tarball_fname, MNT_CDROM "/archives/%ld.afio.lzo", 2159 current_tarball_number); 2160 } 2161 if (!does_file_exist(tarball_fname)) { 2162 mr_free(tarball_fname); 2163 mr_asprintf(&tarball_fname, MNT_CDROM "/archives/%ld.afio.gz", 2158 2164 current_tarball_number); 2159 2165 } -
trunk/mondo/src/mondorestore/mondo-rstr-tools.h
r914 r1079 9 9 void kill_petris(void); 10 10 int mount_cdrom(struct s_bkpinfo *bkpinfo); 11 int mount_device(char *, char *, char *, bool); 11 12 int mount_all_devices(struct mountlist_itself *, bool); 12 13 void protect_against_braindead_sysadmins(void); -
trunk/mondo/src/test/mktest
r900 r1079 6 6 # 7 7 8 gcc -O2 -I../common -I../lib test-conf.c ../lib/mr_conf.c ../common/libmondo-msg.c -o test-conf 9 gcc -O2 -I../common -I../lib test-string.c ../lib/mr_str.c -o test-string 8 lib="../lib/mr_conf.c ../lib/mr_msg.c ../lib/mr_err.c ../lib/mr_mem.c" 9 OPT="-Wall -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_REENTRANT -Wstrict-prototypes -Wshadow -funsigned-char -Wunused -Winit-self -Wcast-align -O2 -g -I../common -I../include" 10 10 11 for f in "test-conf"; do 11 echo "Generating test-msg" 12 gcc $OPT test-msg.c $lib -o test-msg 13 echo "Generating test-string" 14 gcc $OPT test-string.c ../lib/mr_str.c $lib -o test-string 15 echo "Generating test-conf" 16 gcc $OPT test-conf.c $lib -o test-conf 17 18 echo "Testing against previous run" 19 for f in test-conf test-string test-msg; do 12 20 chmod 755 $f 13 21 ./$f > /tmp/$f.res … … 16 24 echo "$f test KO !!" 17 25 fi 26 valgrind -q --error-exitcode=1 --leak-check=yes ./$f 2>&1 > /tmp/valgrind-$f.res 27 if [ $? -ne 0 ]; then 28 echo "valgrind $f test KO !!" 29 fi 18 30 done -
trunk/mondo/src/test/mondo.conf
r531 r1079 5 5 # Test conf file for mondo 6 6 testfalse = TRUE 7 # For msg tests 8 logfile = "/tmp/mondo-test.log" 9 loglevel = 3 -
trunk/mondo/src/test/test-conf.c
-
Property svn:eol-style
set to
native
r900 r1079 7 7 8 8 #include <stdio.h> 9 #include "my-stuff.h" 9 #include <stdlib.h> 10 10 11 #include "mr_conf.h" 11 12 #include "mr_mem.h" … … 14 15 int g_buffer_pid = 0; 15 16 16 main() {17 int main(void) { 17 18 int ret = 0; 18 19 int i = 0; -
Property svn:eol-style
set to
-
trunk/mondo/src/test/test-conf.res
r561 r1079 1 1 Integer : ***3*** 2 2 Float : ***32.670000*** 3 String : *** "The big string"***3 String : ***The big string*** -
trunk/mondo/src/test/test-string.c
-
Property svn:eol-style
set to
native
r900 r1079 6 6 */ 7 7 8 #define _GNU_SOURCE9 8 #include <string.h> 10 9 #include <stdlib.h> 11 10 #include <stdio.h> 12 11 13 #include "my-stuff.h"14 12 #include "mr_str.h" 15 13 #include "mr_mem.h" 16 14 17 main() {15 int main(void) { 18 16 const char delims[3] = ": \n"; 19 17 … … 31 29 } 32 30 mr_free(string); 31 33 32 exit(0); 34 33 } -
Property svn:eol-style
set to
-
trunk/mondo/src/test/test-string.res
r561 r1079 6 6 token=|hda1[0]|, lastpos=28 7 7 token=|hda12[3]|, lastpos=37 8 token=|hda6[2] ]|, lastpos=459 token=|hda5[1] ]|, lastpos=538 token=|hda6[2]|, lastpos=45 9 token=|hda5[1]|, lastpos=53
Note:
See TracChangeset
for help on using the changeset viewer.