Blob Blame History Raw
--- dosfstools-2.7/mkdosfs/mkdosfs.c.argfix	Fri Jul  6 11:25:46 2001
+++ dosfstools-2.7/mkdosfs/mkdosfs.c	Fri Jul  6 11:27:03 2001
@@ -1600,6 +1600,12 @@
       }
 
   device_name = argv[optind];	/* Determine the number of blocks in the FS */
+
+  if (!device_name) {
+      printf("No device specified.\n");
+      usage();
+  }
+      
   if (!create)
     i = count_blocks (device_name); /*  Have a look and see! */
   if (optind == argc - 2)	/*  Either check the user specified number */
@@ -1628,7 +1634,7 @@
 
   if (check && listfile)	/* Auto and specified bad block handling are mutually */
     die ("-c and -l are incompatible");		/* exclusive of each other! */
-
+  
   if (!create) {
     check_mount (device_name);	/* Is the device already mounted? */
     dev = open (device_name, O_RDWR);	/* Is it a suitable device to build the FS on? */