aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Bauer <mail@david-bauer.net>2023-01-16 18:25:40 +0100
committerDavid Bauer <mail@david-bauer.net>2023-01-16 18:28:57 +0100
commit8292537e905b8f0042aaf03fe76be03681f77d13 (patch)
tree54ee90dda4bb7c106101b5f3414eb4d77a2a2a47
parent26c095cb4d27428acedf1b738507a585f1585fe4 (diff)
downloadupstream-8292537e905b8f0042aaf03fe76be03681f77d13.tar.gz
upstream-8292537e905b8f0042aaf03fe76be03681f77d13.tar.bz2
upstream-8292537e905b8f0042aaf03fe76be03681f77d13.zip
dosfstools: refresh patches
Signed-off-by: David Bauer <mail@david-bauer.net>
-rw-r--r--tools/dosfstools/patches/source-date-epoch.patch17
1 files changed, 5 insertions, 12 deletions
diff --git a/tools/dosfstools/patches/source-date-epoch.patch b/tools/dosfstools/patches/source-date-epoch.patch
index fb46753f24..c758caa4c1 100644
--- a/tools/dosfstools/patches/source-date-epoch.patch
+++ b/tools/dosfstools/patches/source-date-epoch.patch
@@ -19,8 +19,6 @@ Signed-off-by: Bjørn Forsman <bjorn.forsman@gmail.com>
src/mkfs.fat.c | 19 ++++++++++++++++---
3 files changed, 53 insertions(+), 7 deletions(-)
-diff --git a/src/boot.c b/src/boot.c
-index 4de450d..8f78e1c 100644
--- a/src/boot.c
+++ b/src/boot.c
@@ -33,6 +33,8 @@
@@ -32,7 +30,7 @@ index 4de450d..8f78e1c 100644
#include "common.h"
#include "fsck.fat.h"
-@@ -672,6 +674,7 @@ void write_volume_label(DOS_FS * fs, char *label)
+@@ -672,6 +674,7 @@ void write_volume_label(DOS_FS * fs, cha
{
time_t now;
struct tm *mtime;
@@ -40,7 +38,7 @@ index 4de450d..8f78e1c 100644
off_t offset;
int created;
DIR_ENT de;
-@@ -687,8 +690,24 @@ void write_volume_label(DOS_FS * fs, char *label)
+@@ -687,8 +690,24 @@ void write_volume_label(DOS_FS * fs, cha
if (de.name[0] == 0xe5)
de.name[0] = 0x05;
@@ -67,8 +65,6 @@ index 4de450d..8f78e1c 100644
if (mtime && mtime->tm_year >= 80 && mtime->tm_year <= 207) {
de.time = htole16((unsigned short)((mtime->tm_sec >> 1) +
(mtime->tm_min << 5) +
-diff --git a/src/common.c b/src/common.c
-index 6a2e396..4f1afcb 100644
--- a/src/common.c
+++ b/src/common.c
@@ -30,6 +30,7 @@
@@ -83,10 +79,9 @@ index 6a2e396..4f1afcb 100644
uint32_t generate_volume_id(void)
{
struct timeval now;
--
-- if (gettimeofday(&now, NULL) != 0 || now.tv_sec == (time_t)-1 || now.tv_sec < 0) {
+ char *source_date_epoch = NULL;
-+
+
+- if (gettimeofday(&now, NULL) != 0 || now.tv_sec == (time_t)-1 || now.tv_sec < 0) {
+ source_date_epoch = getenv("SOURCE_DATE_EPOCH");
+ if (source_date_epoch) {
+ char *tmp = NULL;
@@ -103,8 +98,6 @@ index 6a2e396..4f1afcb 100644
srand(getpid());
/* rand() returns int from [0,RAND_MAX], therefore only 31 bits */
return (((uint32_t)(rand() & 0xFFFF)) << 16) | ((uint32_t)(rand() & 0xFFFF));
-diff --git a/src/mkfs.fat.c b/src/mkfs.fat.c
-index 37fc8ff..1948635 100644
--- a/src/mkfs.fat.c
+++ b/src/mkfs.fat.c
@@ -1074,7 +1074,7 @@ static void setup_tables(void)
@@ -154,4 +147,4 @@ index 37fc8ff..1948635 100644
+
volume_id = generate_volume_id();
check_atari();
- \ No newline at end of file
+