Applying Fedoras dosfstools-vfat-timingfix.diff from Bill Nottingham

<notting@redhat.com> to fix vfat timing issue. See
https://bugzilla.redhat.com/show_bug.cgi?id=448247 for more information.

Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
This commit is contained in:
Daniel Baumann 2008-11-23 18:41:01 +01:00
parent e597cafef4
commit 17b269b03d

View File

@ -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 check = FALSE; /* Default to no readablity checking */
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 @@ main (int argc, char **argv)
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",