4a3cb48228
Signed-off-by: Karel Zak <kzak@redhat.com>
46 lines
1.6 KiB
Diff
46 lines
1.6 KiB
Diff
From 45b048b340742402695741229f01b151cce871c9 Mon Sep 17 00:00:00 2001
|
|
From: Karel Zak <kzak@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@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
|
|
|