71 lines
2.4 KiB
Diff
71 lines
2.4 KiB
Diff
|
From 22ba393bd54b72da01ed2cd9f6705c1a7ca59d3a Mon Sep 17 00:00:00 2001
|
||
|
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
|
||
|
Date: Sun, 11 Jan 2015 18:16:28 -0500
|
||
|
Subject: [PATCH 1/2] fix lba calculation for BE
|
||
|
|
||
|
---
|
||
|
lib/udf/udf_fs.c | 6 +++---
|
||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||
|
|
||
|
diff --git a/lib/udf/udf_fs.c b/lib/udf/udf_fs.c
|
||
|
index a3b10d0..beaeb79 100644
|
||
|
--- a/lib/udf/udf_fs.c
|
||
|
+++ b/lib/udf/udf_fs.c
|
||
|
@@ -167,7 +167,7 @@ udf_get_lba(const udf_file_entry_t *p_udf_fe,
|
||
|
{
|
||
|
/* The allocation descriptor field is filled with short_ad's. */
|
||
|
udf_short_ad_t *p_ad = (udf_short_ad_t *)
|
||
|
- (p_udf_fe->u.ext_attr + p_udf_fe->i_extended_attr);
|
||
|
+ (p_udf_fe->u.ext_attr + uint32_from_le(p_udf_fe->i_extended_attr));
|
||
|
|
||
|
*start = uint32_from_le(p_ad->pos);
|
||
|
*end = *start +
|
||
|
@@ -179,7 +179,7 @@ udf_get_lba(const udf_file_entry_t *p_udf_fe,
|
||
|
{
|
||
|
/* The allocation descriptor field is filled with long_ad's */
|
||
|
udf_long_ad_t *p_ad = (udf_long_ad_t *)
|
||
|
- (p_udf_fe->u.ext_attr + p_udf_fe->i_extended_attr);
|
||
|
+ (p_udf_fe->u.ext_attr + uint32_from_le(p_udf_fe->i_extended_attr));
|
||
|
|
||
|
*start = uint32_from_le(p_ad->loc.lba); /* ignore partition number */
|
||
|
*end = *start +
|
||
|
@@ -190,7 +190,7 @@ udf_get_lba(const udf_file_entry_t *p_udf_fe,
|
||
|
case ICBTAG_FLAG_AD_EXTENDED:
|
||
|
{
|
||
|
udf_ext_ad_t *p_ad = (udf_ext_ad_t *)
|
||
|
- (p_udf_fe->u.ext_attr + p_udf_fe->i_extended_attr);
|
||
|
+ (p_udf_fe->u.ext_attr + uint32_from_le(p_udf_fe->i_extended_attr));
|
||
|
|
||
|
*start = uint32_from_le(p_ad->ext_loc.lba); /* ignore partition number */
|
||
|
*end = *start +
|
||
|
--
|
||
|
2.1.0
|
||
|
|
||
|
|
||
|
From b4e3a76af159b5f0d5f006f6acd6df10d4ffaefa Mon Sep 17 00:00:00 2001
|
||
|
From: Michal Toman <mtoman@redhat.com>
|
||
|
Date: Tue, 13 Jan 2015 05:40:14 -0500
|
||
|
Subject: [PATCH 2/2] udf_readdir: fix lba on BE
|
||
|
|
||
|
Signed-off-by: Michal Toman <mtoman@redhat.com>
|
||
|
---
|
||
|
lib/udf/udf_fs.c | 2 +-
|
||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/lib/udf/udf_fs.c b/lib/udf/udf_fs.c
|
||
|
index beaeb79..a0a3903 100644
|
||
|
--- a/lib/udf/udf_fs.c
|
||
|
+++ b/lib/udf/udf_fs.c
|
||
|
@@ -739,7 +739,7 @@ udf_readdir(udf_dirent_t *p_udf_dirent)
|
||
|
const unsigned int i_len = p_udf_dirent->fid->i_file_id;
|
||
|
|
||
|
if (DRIVER_OP_SUCCESS != udf_read_sectors(p_udf, &p_udf_dirent->fe, p_udf->i_part_start
|
||
|
- + p_udf_dirent->fid->icb.loc.lba, 1)) {
|
||
|
+ + uint32_from_le(p_udf_dirent->fid->icb.loc.lba), 1)) {
|
||
|
udf_dirent_free(p_udf_dirent);
|
||
|
return NULL;
|
||
|
}
|
||
|
--
|
||
|
2.1.0
|
||
|
|