]> git.wh0rd.org - dump.git/blobdiff - dump/main.c
Fix a bug where dump miscalculates the tape size based on -d/-s
[dump.git] / dump / main.c
index cecaaae79be572f16462083c3fa62479850f876b..b73a7887012475bfdd86f4953e5c0110679f59cb 100644 (file)
@@ -37,7 +37,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: main.c,v 1.92 2004/04/21 08:55:51 stelian Exp $";
+       "$Id: main.c,v 1.94 2004/07/05 15:12:45 stelian Exp $";
 #endif /* not lint */
 
 #include <config.h>
@@ -58,6 +58,7 @@ static const char rcsid[] =
 #include <sys/time.h>
 #include <time.h>
 #ifdef __linux__
+#include <linux/types.h>
 #ifdef HAVE_EXT2FS_EXT2_FS_H
 #include <ext2fs/ext2_fs.h>
 #else
@@ -583,13 +584,9 @@ main(int argc, char *argv[])
                        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,