[dosfstools/f19] Fixed dosfsck on big endian platforms

Jaroslav Škarvada jskarvad at fedoraproject.org
Fri Nov 22 16:02:30 UTC 2013


commit c41a80c31600ee9272fe71355d78df23124c3695
Author: Jaroslav Škarvada <jskarvad at redhat.com>
Date:   Fri Nov 22 17:02:19 2013 +0100

    Fixed dosfsck on big endian platforms
    
      Resolves: rhbz#1029695

 dosfstools-3.0.22-fix-big-endian.patch |   13 +++++++++++++
 dosfstools.spec                        |    8 +++++++-
 2 files changed, 20 insertions(+), 1 deletions(-)
---
diff --git a/dosfstools-3.0.22-fix-big-endian.patch b/dosfstools-3.0.22-fix-big-endian.patch
new file mode 100644
index 0000000..c7a5b64
--- /dev/null
+++ b/dosfstools-3.0.22-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 4903900..ad52229 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.22
-Release: 2%{?dist}
+Release: 3%{?dist}
 License: GPLv3+
 Group: Applications/System
 Source0: http://www.daniel-baumann.ch/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.22-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 <jskarvad at redhat.com> - 3.0.22-3
+- Fixed dosfsck on big endian platforms
+  Resolves: rhbz#1029695
+
 * Wed Jul 24 2013 Jaroslav Škarvada <jskarvad at redhat.com> - 3.0.22-2
 - Fixed ownership of man directories
   Resolves: rhbz#987735


More information about the scm-commits mailing list