logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git
commit: 1e17f569cbf756d1106e3ad60aa163f8bc863f18
parent cc24b86146331590f52e49c4aaa1a1d620bfe921
Author: Michael Forney <mforney@mforney.org>
Date:   Tue,  2 Mar 2021 01:31:25 -0800

dosfstools: Update to 4.2

Diffstat:

Mpkg/dosfstools/config.h58+++++++++++++++++++++++++++++++++++++---------------------
Mpkg/dosfstools/gen.lua19+++++++++++++------
Apkg/dosfstools/patch/0001-Use-__attribute__-consistently.patch31+++++++++++++++++++++++++++++++
Dpkg/dosfstools/patch/0001-Use-static-inline-function-instead-of-statement-expr.patch74--------------------------------------------------------------------------
Dpkg/dosfstools/patch/0002-Use-__attribute__-consistently.patch31-------------------------------
Mpkg/dosfstools/ver2+-
Mpkg/dosfstools/version.h4++--
7 files changed, 84 insertions(+), 135 deletions(-)

diff --git a/pkg/dosfstools/config.h b/pkg/dosfstools/config.h @@ -1,25 +1,41 @@ -#define PACKAGE_NAME "dosfstools" -#define PACKAGE_TARNAME "dosfstools" -#define PACKAGE_VERSION "4.1" -#define PACKAGE_STRING "dosfstools 4.1" -#define PACKAGE_BUGREPORT "" -#define PACKAGE_URL "" -#define PACKAGE "dosfstools" -#define VERSION "4.1" -#define STDC_HEADERS 1 -#define HAVE_SYS_TYPES_H 1 -#define HAVE_SYS_STAT_H 1 -#define HAVE_STDLIB_H 1 -#define HAVE_STRING_H 1 -#define HAVE_MEMORY_H 1 -#define HAVE_STRINGS_H 1 -#define HAVE_INTTYPES_H 1 -#define HAVE_STDINT_H 1 -#define HAVE_UNISTD_H 1 +/* #undef CONF_CHECK_ATARI */ +#define HAVE_DECL_GETMNTENT 1 +#define HAVE_DECL_GETMNTINFO 0 +#define HAVE_ENDIAN_H 1 #define HAVE_ERR_H 1 +/* #undef HAVE_ICONV */ +#define HAVE_INTTYPES_H 1 +/* #undef HAVE_LIBKERN_OSBYTEORDER_H */ #define HAVE_LINUX_FD_H 1 #define HAVE_LINUX_HDREG_H 1 +#define HAVE_LINUX_LOOP_H 1 #define HAVE_LINUX_VERSION_H 1 -#define HAVE_ENDIAN_H 1 -#define HAVE_DECL_GETMNTENT 1 -#define HAVE_DECL_GETMNTINFO 0 +/* #undef HAVE_MINIX_CONFIG_H */ +#define HAVE_STDINT_H 1 +#define HAVE_STDIO_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STRINGS_H 1 +#define HAVE_STRING_H 1 +/* #undef HAVE_SYS_DISKLABEL_H */ +/* #undef HAVE_SYS_DISK_H */ +/* #undef HAVE_SYS_ENDIAN_H */ +/* #undef HAVE_SYS_IOCCOM_H */ +/* #undef HAVE_SYS_MKDEV_H */ +/* #undef HAVE_SYS_QUEUE_H */ +#define HAVE_SYS_STAT_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_UNISTD_H 1 +#define HAVE_VASPRINTF 1 +#define HAVE_WCHAR_H 1 +/* #undef ICONV_CONST */ +#define PACKAGE "dosfstools" +#define PACKAGE_BUGREPORT "" +#define PACKAGE_NAME "dosfstools" +#define PACKAGE_STRING "dosfstools 4.2" +#define PACKAGE_TARNAME "dosfstools" +#define PACKAGE_URL "" +#define PACKAGE_VERSION "4.2" +#define STDC_HEADERS 1 +#define VERSION "4.2" +/* #undef _FILE_OFFSET_BITS */ +/* #undef _LARGE_FILES */ diff --git a/pkg/dosfstools/gen.lua b/pkg/dosfstools/gen.lua @@ -1,9 +1,8 @@ -set('version', '4.1') +set('version', '4.2') cflags{ '-std=c99', '-Wall', '-Wpedantic', - '-Wno-address-of-packed-member', '-Wno-format-overflow', - '-Wno-overflow', -- ioctl - '-D _POSIX_C_SOURCE=200809L', + '-Wno-address-of-packed-member', '-Wno-overflow', -- ioctl + '-D _GNU_SOURCE', '-include $dir/config.h', '-I $dir', '-I $srcdir/src/blkdev', @@ -14,10 +13,18 @@ pkg.deps = { 'pkg/linux-headers/headers', } -exe('mkfs.fat', [[src/(mkfs.fat.c device_info.c blkdev/(blkdev.c linux_version.c))]]) +lib('libcommon.a', [[src/(common.c charconv.c)]]) + +exe('mkfs.fat', [[ + src/(mkfs.fat.c device_info.c blkdev/(blkdev.c linux_version.c)) + libcommon.a +]]) file('bin/mkfs.fat', '755', '$outdir/mkfs.fat') -exe('fsck.fat', [[src/(fsck.fat.c boot.c check.c common.c fat.c file.c io.c lfn.c charconv.c)]]) +exe('fsck.fat', [[ + src/(fsck.fat.c check.c file.c lfn.c boot.c fat.c io.c) + libcommon.a +]]) file('bin/fsck.fat', '755', '$outdir/fsck.fat') for _, src in ipairs{'fsck.fat.8', 'mkfs.fat.8'} do diff --git a/pkg/dosfstools/patch/0001-Use-__attribute__-consistently.patch b/pkg/dosfstools/patch/0001-Use-__attribute__-consistently.patch @@ -0,0 +1,31 @@ +From 651393ea7aeb6e0a14cd35e72ca2350656388dc4 Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Mon, 1 Jul 2019 22:52:11 -0700 +Subject: [PATCH] Use __attribute__ consistently + +--- + src/common.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/common.h b/src/common.h +index 9a68531..0e13fb3 100644 +--- a/src/common.h ++++ b/src/common.h +@@ -41,12 +41,12 @@ extern int atari_format; /* Use Atari variation of MS-DOS FS format */ + extern const char *program_name; + + void die(const char *msg, ...) +- __attribute((noreturn, format(printf, 1, 2))); ++ __attribute__ ((noreturn, format(printf, 1, 2))); + + /* Displays a prinf-style message and terminates the program. */ + + void pdie(const char *msg, ...) +- __attribute((noreturn, format(printf, 1, 2))); ++ __attribute__ ((noreturn, format(printf, 1, 2))); + + /* Like die, but appends an error message according to the state of errno. */ + +-- +2.30.0 + diff --git a/pkg/dosfstools/patch/0001-Use-static-inline-function-instead-of-statement-expr.patch b/pkg/dosfstools/patch/0001-Use-static-inline-function-instead-of-statement-expr.patch @@ -1,74 +0,0 @@ -From 825f4980d59f780e906fc2d6b55fe6646df1b415 Mon Sep 17 00:00:00 2001 -From: Michael Forney <mforney@mforney.org> -Date: Tue, 4 Jun 2019 10:40:53 -0700 -Subject: [PATCH] Use static inline function instead of statement expression -Upstream: 91978a272e4fe465c3a754a7342b496ff9e49211 - ---- - src/lfn.c | 22 +++++++++++----------- - 1 file changed, 11 insertions(+), 11 deletions(-) - -diff --git a/src/lfn.c b/src/lfn.c -index b33e125..9727ab3 100644 ---- a/src/lfn.c -+++ b/src/lfn.c -@@ -74,14 +74,6 @@ static unsigned char fat_uni2esc[64] = { - /* for maxlen param */ - #define UNTIL_0 INT_MAX - --/* Convert name part in 'lfn' from unicode to ASCII */ --#define CNV_THIS_PART(lfn) \ -- ({ \ -- unsigned char __part_uni[CHARS_PER_LFN*2]; \ -- copy_lfn_part( __part_uni, lfn ); \ -- cnv_unicode( __part_uni, CHARS_PER_LFN, 0 ); \ -- }) -- - /* Convert name parts collected so far (from previous slots) from unicode to - * ASCII */ - #define CNV_PARTS_SO_FAR() \ -@@ -155,6 +147,14 @@ static void copy_lfn_part(unsigned char *dst, LFN_ENT * lfn) - memcpy(dst + 22, lfn->name11_12, 4); - } - -+/* Convert name part in 'lfn' from unicode to ASCII */ -+static inline char *cnv_this_part(LFN_ENT *lfn) -+{ -+ unsigned char __part_uni[CHARS_PER_LFN*2]; -+ copy_lfn_part( __part_uni, lfn ); -+ return cnv_unicode( __part_uni, CHARS_PER_LFN, 0 ); -+} -+ - static void clear_lfn_slots(int start, int end) - { - int i; -@@ -222,7 +222,7 @@ void lfn_add_slot(DIR_ENT * de, off_t dir_offset) - * display the name) */ - printf("A new long file name starts within an old one.\n"); - if (slot == lfn_slot && lfn->alias_checksum == lfn_checksum) { -- char *part1 = CNV_THIS_PART(lfn); -+ char *part1 = cnv_this_part(lfn); - char *part2 = CNV_PARTS_SO_FAR(); - printf(" It could be that the LFN start bit is wrong here\n" - " if \"%s\" seems to match \"%s\".\n", part1, part2); -@@ -262,7 +262,7 @@ void lfn_add_slot(DIR_ENT * de, off_t dir_offset) - /* Causes: 1) start bit got lost, 2) Previous slot with start bit got - * lost */ - /* Fixes: 1) delete LFN, 2) set start bit */ -- char *part = CNV_THIS_PART(lfn); -+ char *part = cnv_this_part(lfn); - printf("Long filename fragment \"%s\" found outside a LFN " - "sequence.\n (Maybe the start bit is missing on the " - "last fragment)\n", part); -@@ -304,7 +304,7 @@ void lfn_add_slot(DIR_ENT * de, off_t dir_offset) - printf("Unexpected long filename sequence number " - "(%d vs. expected %d).\n", slot, lfn_slot); - if (lfn->alias_checksum == lfn_checksum && lfn_slot > 0) { -- char *part1 = CNV_THIS_PART(lfn); -+ char *part1 = cnv_this_part(lfn); - char *part2 = CNV_PARTS_SO_FAR(); - printf(" It could be that just the number is wrong\n" - " if \"%s\" seems to match \"%s\".\n", part1, part2); --- -2.20.1 - diff --git a/pkg/dosfstools/patch/0002-Use-__attribute__-consistently.patch b/pkg/dosfstools/patch/0002-Use-__attribute__-consistently.patch @@ -1,31 +0,0 @@ -From d38b4d1d39784aefebb585ed955d16bb674bd2ff Mon Sep 17 00:00:00 2001 -From: Michael Forney <mforney@mforney.org> -Date: Mon, 1 Jul 2019 22:52:11 -0700 -Subject: [PATCH] Use __attribute__ consistently - ---- - src/common.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/common.h b/src/common.h -index e2c398c..03f6984 100644 ---- a/src/common.h -+++ b/src/common.h -@@ -24,12 +24,12 @@ - #define _COMMON_H - - void die(const char *msg, ...) -- __attribute((noreturn, format(printf, 1, 2))); -+ __attribute__ ((noreturn, format(printf, 1, 2))); - - /* Displays a prinf-style message and terminates the program. */ - - void pdie(const char *msg, ...) -- __attribute((noreturn, format(printf, 1, 2))); -+ __attribute__ ((noreturn, format(printf, 1, 2))); - - /* Like die, but appends an error message according to the state of errno. */ - --- -2.22.0 - diff --git a/pkg/dosfstools/ver b/pkg/dosfstools/ver @@ -1 +1 @@ -4.1 r2 +4.2 r0 diff --git a/pkg/dosfstools/version.h b/pkg/dosfstools/version.h @@ -1,2 +1,2 @@ -#define VERSION "4.1" -#define VERSION_DATE "2017-01-24" +#define VERSION "4.2" +#define VERSION_DATE "2021-01-31"