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:
parent
e597cafef4
commit
17b269b03d
@ -57,6 +57,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
#include <sys/time.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <time.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 int verbose = 0; /* Default to verbose mode off */
|
||||||
static long volume_id; /* Volume ID number */
|
static long volume_id; /* Volume ID number */
|
||||||
static time_t create_time; /* Creation time */
|
static time_t create_time; /* Creation time */
|
||||||
|
static struct timeval create_timeval; /* Creation time */
|
||||||
static char volume_name[] = " "; /* Volume name */
|
static char volume_name[] = " "; /* Volume name */
|
||||||
static unsigned long long blocks; /* Number of blocks in filesystem */
|
static unsigned long long blocks; /* Number of blocks in filesystem */
|
||||||
static int sector_size = 512; /* Size of a logical sector */
|
static int sector_size = 512; /* Size of a logical sector */
|
||||||
@ -1427,8 +1429,9 @@ main (int argc, char **argv)
|
|||||||
program_name = p+1;
|
program_name = p+1;
|
||||||
}
|
}
|
||||||
|
|
||||||
time(&create_time);
|
gettimeofday(&create_timeval, NULL);
|
||||||
volume_id = (long)create_time; /* Default volume ID = creation time */
|
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();
|
check_atari();
|
||||||
|
|
||||||
printf ("%s " VERSION " (" VERSION_DATE ")\n",
|
printf ("%s " VERSION " (" VERSION_DATE ")\n",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user