From 15ff7d549e4fd8c152a3b8b198e0f363e6bff31b Mon Sep 17 00:00:00 2001 From: Jaroslav Škarvada Date: Nov 22 2013 15:52:53 +0000 Subject: Fixed dosfsck on big endian platforms Resolves: rhbz#1029695 --- diff --git a/dosfstools-3.0.23-fix-big-endian.patch b/dosfstools-3.0.23-fix-big-endian.patch new file mode 100644 index 0000000..c7a5b64 --- /dev/null +++ b/dosfstools-3.0.23-fix-big-endian.patch @@ -0,0 +1,13 @@ +diff --git a/src/boot.c b/src/boot.c +index 2c6a38f..7acec70 100644 +--- a/src/boot.c ++++ b/src/boot.c +@@ -62,7 +62,7 @@ static struct { + + /* Unaligned fields must first be accessed byte-wise */ + #define GET_UNALIGNED_W(f) \ +- le16toh( (__u16)f[0] | ((__u16)f[1]<<8) ) ++ ( (__u16)f[0] | ((__u16)f[1]<<8) ) + + static char *get_media_descr(unsigned char media) + { diff --git a/dosfstools.spec b/dosfstools.spec index 28f1609..0bbeced 100644 --- a/dosfstools.spec +++ b/dosfstools.spec @@ -1,12 +1,13 @@ Name: dosfstools Summary: Utilities for making and checking MS-DOS FAT filesystems on Linux Version: 3.0.23 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv3+ Group: Applications/System Source0: http://www.daniel-baumann.ch/files/software/dosfstools/%{name}-%{version}.tar.xz URL: http://www.daniel-baumann.ch/software/dosfstools/ Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +Patch0: dosfstools-3.0.23-fix-big-endian.patch %description The dosfstools package includes the mkdosfs and dosfsck utilities, @@ -15,6 +16,7 @@ drives or on floppies. %prep %setup -q +%patch0 -p1 -b .fix-big-endian %build make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing" @@ -35,6 +37,10 @@ rm -rf %{buildroot} %changelog +* Fri Nov 22 2013 Jaroslav Škarvada - 3.0.23-2 +- Fixed dosfsck on big endian platforms + Resolves: rhbz#1029695 + * Tue Oct 15 2013 Jaroslav Škarvada - 3.0.23-1 - New version Resolves: rhbz#1019081