]> git.wh0rd.org - dump.git/commitdiff
Emit warnings not panic() when comparing a file and we don't have enough priviledges...
authorStelian Pop <stelian@popies.net>
Mon, 24 Jan 2005 10:32:01 +0000 (10:32 +0000)
committerStelian Pop <stelian@popies.net>
Mon, 24 Jan 2005 10:32:01 +0000 (10:32 +0000)
CHANGES
restore/dirs.c
restore/tape.c

diff --git a/CHANGES b/CHANGES
index 5d2c1e175e00dfed1a2fb886a7daa0e5c85cdcd2..a5cd0eaa7c84be0f047ea38fbf15997cc9ab6146 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,13 @@
-$Id: CHANGES,v 1.269 2005/01/21 09:27:26 stelian Exp $
+$Id: CHANGES,v 1.270 2005/01/24 10:32:01 stelian Exp $
+
+Changes between versions 0.4b39 and 0.4b40 (released ????????????????)
+======================================================================
+
+1.     Changed restore to emit warnings (instead of emitting a fatal
+       error) if a file (or a directory) is unavailable for a 
+       comparision (if the user doesn't have the necessary permissions
+       to access it for example). Thanks to Kenneth Porter
+       <shiva@sewingwitch.com> for the bug report.
 
 Changes between versions 0.4b38 and 0.4b39 (released January 21, 2005)
 ======================================================================
index c9a9482cea38f2e47d909ba324283891b75a9ee1..26c637bffb69bebb46a58df6bf5c0869d6da8bc9 100644 (file)
@@ -42,7 +42,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: dirs.c,v 1.30 2005/01/14 13:01:34 stelian Exp $";
+       "$Id: dirs.c,v 1.31 2005/01/24 10:32:14 stelian Exp $";
 #endif /* not lint */
 
 #include <config.h>
@@ -753,7 +753,7 @@ comparedirmodes(void)
                        unsigned long newflags;
 
                        if (LSTAT(cp, &sb) < 0) {
-                               warn("%s: does not exist", cp);
+                               warn("unable to stat %s", cp);
                                do_compare_error;
                                continue;
                        }
index c4c50c0cc750d5af689358a9052e611ccf95e740..76bdb4cb7d7def62ef1bd319b870421f86beb065 100644 (file)
@@ -42,7 +42,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: tape.c,v 1.85 2005/01/14 13:01:34 stelian Exp $";
+       "$Id: tape.c,v 1.86 2005/01/24 10:32:14 stelian Exp $";
 #endif /* not lint */
 
 #include <config.h>
@@ -1527,7 +1527,7 @@ cmpfiles(char *tapefile, char *diskfile, struct STAT *sbuf_disk)
        int fd_tape, fd_disk;
 
        if (STAT(tapefile, &sbuf_tape) != 0) {
-               panic("Can't lstat tmp file %s: %s\n", tapefile,
+               panic("can't lstat tmp file %s: %s\n", tapefile,
                      strerror(errno));
                do_compare_error;
        }
@@ -1545,12 +1545,12 @@ cmpfiles(char *tapefile, char *diskfile, struct STAT *sbuf_disk)
        }
 
        if ((fd_tape = OPEN(tapefile, O_RDONLY)) < 0) {
-               panic("Can't open %s: %s\n", tapefile, strerror(errno));
+               panic("can't open %s: %s\n", tapefile, strerror(errno));
                do_compare_error;
        }
        if ((fd_disk = OPEN(diskfile, O_RDONLY)) < 0) {
                close(fd_tape);
-               panic("Can't open %s: %s\n", diskfile, strerror(errno));
+               panic("can't open %s: %s\n", diskfile, strerror(errno));
                do_compare_error;
        }
 
@@ -1652,7 +1652,7 @@ comparefile(char *name)
        }
 
        if ((r = LSTAT(name, &sb)) != 0) {
-               warn("%s: does not exist (%d)", name, r);
+               warn("unable to stat %s", name);
                do_compare_error;
                skipfile();
                return;
@@ -1773,7 +1773,7 @@ comparefile(char *name)
        case IFREG:
 #if COMPARE_ONTHEFLY
                if ((ifile = OPEN(name, O_RDONLY)) < 0) {
-                       panic("Can't open %s: %s\n", name, strerror(errno));
+                       warn("can't open %s", name);
                        skipfile();
                        do_compare_error;
                }