]> git.wh0rd.org - dump.git/commitdiff
A wrong line in /etc/fstab containing LABEL=... could prevent dump from running....
authorStelian Pop <stelian@popies.net>
Mon, 5 Jul 2004 15:12:44 +0000 (15:12 +0000)
committerStelian Pop <stelian@popies.net>
Mon, 5 Jul 2004 15:12:44 +0000 (15:12 +0000)
CHANGES
dump/main.c
dump/optr.c

diff --git a/CHANGES b/CHANGES
index a5996ff963a64f586da8f90231e5c35654c1d0ff..f4062d2da92e13683dce144117b4c42202be31f0 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,4 @@
-$Id: CHANGES,v 1.252 2004/07/05 15:02:32 stelian Exp $
+$Id: CHANGES,v 1.253 2004/07/05 15:12:44 stelian Exp $
 
 Changes between versions 0.4b36 and 0.4b37 (released ??????????????)
 ====================================================================
 
 Changes between versions 0.4b36 and 0.4b37 (released ??????????????)
 ====================================================================
@@ -29,6 +29,11 @@ Changes between versions 0.4b36 and 0.4b37 (released ??????????????)
 5.     Made dump use the blkid library when searching for devices
        by label or uuid instead of dump's own routines.
 
 5.     Made dump use the blkid library when searching for devices
        by label or uuid instead of dump's own routines.
 
+6.     Corrected a bug in dump where a wrong LABEL=... line in
+       /etc/fstab could prevent dump from dumping unrelated 
+       filesystems. Thanks to Bruce Lowekamp
+       <lowekamp@users.sourceforge.net> for reporting the bug.
+
 Changes between versions 0.4b35 and 0.4b36 (released April 21, 2004)
 ====================================================================
 
 Changes between versions 0.4b35 and 0.4b36 (released April 21, 2004)
 ====================================================================
 
index fec91af93d1c755b9d516e2ce751aa90356a171c..b73a7887012475bfdd86f4953e5c0110679f59cb 100644 (file)
@@ -37,7 +37,7 @@
 
 #ifndef lint
 static const char rcsid[] =
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: main.c,v 1.93 2004/06/02 09:22:49 stelian Exp $";
+       "$Id: main.c,v 1.94 2004/07/05 15:12:45 stelian Exp $";
 #endif /* not lint */
 
 #include <config.h>
 #endif /* not lint */
 
 #include <config.h>
@@ -584,13 +584,9 @@ main(int argc, char *argv[])
                        diskparam[i] = '\0';
 
        disk = get_device_name(diskparam);
                        diskparam[i] = '\0';
 
        disk = get_device_name(diskparam);
-       if (!disk) {            /* null means the disk is some form
-                                  of LABEL= or UID= but it was not
-                                  found */
-               msg("Cannot find a disk having %s\n", diskparam);
-               msg("The ENTIRE dump is aborted.\n");
-               exit(X_STARTUP);
-       }
+       if (!disk)
+               disk = strdup(diskparam);
+
        /*
         *      disk can be either the full special file name,
         *      the suffix of the special file name,
        /*
         *      disk can be either the full special file name,
         *      the suffix of the special file name,
index 8afe500de71172260c25269ffc22eb052c660e01..a4504da1520f0078201bfbb2e295cfc6e69c3222 100644 (file)
@@ -37,7 +37,7 @@
 
 #ifndef lint
 static const char rcsid[] =
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: optr.c,v 1.38 2004/04/21 08:55:51 stelian Exp $";
+       "$Id: optr.c,v 1.39 2004/07/05 15:12:45 stelian Exp $";
 #endif /* not lint */
 
 #include <config.h>
 #endif /* not lint */
 
 #include <config.h>
@@ -444,7 +444,7 @@ allocfsent(struct mntent *fs)
        /* Translade UUID=, LABEL= ... */
        disk = get_device_name(fs->mnt_fsname);
        if (disk == NULL)
        /* Translade UUID=, LABEL= ... */
        disk = get_device_name(fs->mnt_fsname);
        if (disk == NULL)
-               quit("Cannot find a disk having %s\n", fs->mnt_fsname);
+               disk = strdup(fs->mnt_fsname);
 
        /* Discard non block devices */
        if (stat(disk, &buf) != 0 || !S_ISBLK(buf.st_mode)) {
 
        /* Discard non block devices */
        if (stat(disk, &buf) != 0 || !S_ISBLK(buf.st_mode)) {