[util-linux/f19] 2.23-0.3: fix build for s390

kzak kzak at fedoraproject.org
Wed Mar 27 11:14:12 UTC 2013


commit 4a3cb4822873eb1724259319d61e6b34994dbfc3
Author: Karel Zak <kzak at redhat.com>
Date:   Wed Mar 27 12:13:24 2013 +0100

    2.23-0.3: fix build for s390
    
    Signed-off-by: Karel Zak <kzak at redhat.com>

 ...id-fix-NTFS-prober-on-big-endian-machines.patch |   45 ++++++++++++++++++++
 util-linux.spec                                    |    6 ++-
 2 files changed, 50 insertions(+), 1 deletions(-)
---
diff --git a/0001-libblkid-fix-NTFS-prober-on-big-endian-machines.patch b/0001-libblkid-fix-NTFS-prober-on-big-endian-machines.patch
new file mode 100644
index 0000000..b469458
--- /dev/null
+++ b/0001-libblkid-fix-NTFS-prober-on-big-endian-machines.patch
@@ -0,0 +1,45 @@
+From 45b048b340742402695741229f01b151cce871c9 Mon Sep 17 00:00:00 2001
+From: Karel Zak <kzak at redhat.com>
+Date: Wed, 27 Mar 2013 11:37:57 +0100
+Subject: [PATCH] libblkid: fix NTFS prober on big-endian machines
+
+ MFT_RECORD_ATTR_VOLUME_NAME  = cpu_to_le32(0x60),
+                                 ^
+./include/bitops.h:94:36: error: braced-group within expression
+allowed only inside a function
+
+Signed-off-by: Karel Zak <kzak at redhat.com>
+---
+ libblkid/src/superblocks/ntfs.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/libblkid/src/superblocks/ntfs.c b/libblkid/src/superblocks/ntfs.c
+index 41c6b9c..c60a151 100644
+--- a/libblkid/src/superblocks/ntfs.c
++++ b/libblkid/src/superblocks/ntfs.c
+@@ -75,8 +75,8 @@ struct file_attribute {
+ #define NTFS_MAX_CLUSTER_SIZE	(64 * 1024)
+ 
+ enum {
+-	MFT_RECORD_ATTR_VOLUME_NAME		= cpu_to_le32(0x60),
+-	MFT_RECORD_ATTR_END			= cpu_to_le32(0xffffffff)
++	MFT_RECORD_ATTR_VOLUME_NAME		= 0x60,
++	MFT_RECORD_ATTR_END			= 0xffffffff
+ };
+ 
+ static int probe_ntfs(blkid_probe pr, const struct blkid_idmag *mag)
+@@ -186,9 +186,9 @@ static int probe_ntfs(blkid_probe pr, const struct blkid_idmag *mag)
+ 		if (!attr_len)
+ 			break;
+ 
+-		if (attr->type == MFT_RECORD_ATTR_END)
++		if (le32_to_cpu(attr->type) == MFT_RECORD_ATTR_END)
+ 			break;
+-		if (attr->type == MFT_RECORD_ATTR_VOLUME_NAME) {
++		if (le32_to_cpu(attr->type) == MFT_RECORD_ATTR_VOLUME_NAME) {
+ 			unsigned int val_off = le16_to_cpu(attr->value_offset);
+ 			unsigned int val_len = le32_to_cpu(attr->value_len);
+ 			unsigned char *val = ((uint8_t *) attr) + val_off;
+-- 
+1.8.1.4
+
diff --git a/util-linux.spec b/util-linux.spec
index dcd74c5..eb49d56 100644
--- a/util-linux.spec
+++ b/util-linux.spec
@@ -2,7 +2,7 @@
 Summary: A collection of basic system utilities
 Name: util-linux
 Version: 2.23
-Release: 0.2%{?dist}
+Release: 0.3%{?dist}
 License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain
 Group: System Environment/Base
 URL: http://en.wikipedia.org/wiki/Util-linux
@@ -90,6 +90,7 @@ Patch3: util-linux-ng-2.22-login-lastlog.patch
 ###
 Patch100: 0001-libmount-fix-user-mount-by-root-for-mount.-type-help.patch
 Patch101: 0001-libmount-umount-crashes-when-trying-to-umount-a-non-.patch
+Patch102: 0001-libblkid-fix-NTFS-prober-on-big-endian-machines.patch
 
 
 %description
@@ -751,6 +752,9 @@ fi
 %{_libdir}/pkgconfig/uuid.pc
 
 %changelog
+* Wed Mar 27 2013 Karel Zak <kzak at redhat.com> 2.23-0.3
+- libblkid ntfs bugfix for build on s390
+
 * Wed Mar 27 2013 Karel Zak <kzak at redhat.com> 2.23-0.2
 - add upstream patches for to fix umount and mount.<type>
 


More information about the scm-commits mailing list