diff -ru dosfstools-3.0.0/src/mkdosfs.c dosfstools-3.0.0-new/src/mkdosfs.c
--- dosfstools-3.0.0/src/mkdosfs.c 2008-09-28 05:22:09.000000000 -0400
+++ dosfstools-3.0.0-new/src/mkdosfs.c 2008-11-04 12:40:28.000000000 -0500
@@ -57,6 +57,7 @@
#include <stdlib.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
+#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#include <time.h>
@@ -283,6 +284,7 @@
static int verbose = 0; /* Default to verbose mode off */
static long volume_id; /* Volume ID number */
static time_t create_time; /* Creation time */
+static struct timeval create_timeval; /* Creation time */
static char volume_name[] = " "; /* Volume name */
static unsigned long long blocks; /* Number of blocks in filesystem */
static int sector_size = 512; /* Size of a logical sector */
@@ -1427,8 +1429,9 @@
program_name = p+1;
}
- time(&create_time);
- volume_id = (long)create_time; /* Default volume ID = creation time */
+ gettimeofday(&create_timeval, NULL);
+ create_time = create_timeval.tv_sec;
+ volume_id = (u_int32_t)( (create_timeval.tv_sec << 20) | create_timeval.tv_usec ); /* Default volume ID = creation time, fudged for more uniqueness */
check_atari();
printf ("%s " VERSION " (" VERSION_DATE ")\n",