]> git.wh0rd.org - dump.git/blobdiff - dump/main.c
Fix dump output message when using default level.
[dump.git] / dump / main.c
index fec91af93d1c755b9d516e2ce751aa90356a171c..b3bbf7d4a45058bb38a815112b8430f6fb2fe3f1 100644 (file)
@@ -37,7 +37,7 @@
 
 #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.95 2009/06/18 09:35:14 stelian Exp $";
 #endif /* not lint */
 
 #include <config.h>
@@ -239,6 +239,8 @@ main(int argc, char *argv[])
                quit("TP_BSIZE must be a multiple of DEV_BSIZE\n");
        memset(&lastlevel, 0, NUM_STR_SIZE);
        memset(&level, 0, NUM_STR_SIZE);
+       /* Default dump level is zero. */
+       level[0] = '0';
 
        if (argc < 2)
                usage();
@@ -584,13 +586,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,