- add big endian fix for udf
This commit is contained in:
parent
b507b830b0
commit
6d51a8bbc0
70
libcdio-0.93-udf-bigendian.patch
Normal file
70
libcdio-0.93-udf-bigendian.patch
Normal file
@ -0,0 +1,70 @@
|
||||
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
|
||||
|
@ -1,6 +1,6 @@
|
||||
Name: libcdio
|
||||
Version: 0.93
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: CD-ROM input and control library
|
||||
Group: System Environment/Libraries
|
||||
License: GPLv3+
|
||||
@ -9,6 +9,8 @@ Source0: http://ftp.gnu.org/gnu/libcdio/libcdio-0.93.tar.gz
|
||||
Source1: http://ftp.gnu.org/gnu/libcdio/libcdio-0.93.tar.gz.sig
|
||||
Source2: libcdio-no_date_footer.hml
|
||||
Source3: cdio_config.h
|
||||
# https://savannah.gnu.org/bugs/index.php?43995
|
||||
Patch0: libcdio-0.93-udf-bigendian.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: pkgconfig doxygen
|
||||
BuildRequires: ncurses-devel
|
||||
@ -36,6 +38,7 @@ This package contains header files and libraries for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1 -b .udf-bigendian
|
||||
|
||||
iconv -f ISO88591 -t utf-8 -o THANKS.utf8 THANKS && mv THANKS.utf8 THANKS
|
||||
|
||||
@ -138,6 +141,9 @@ fi
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Jan 13 2015 Dan Horák <dan[at]danny.cz> - 0.93-2
|
||||
- add big endian fix for udf
|
||||
|
||||
* Fri Oct 31 2014 Frantisek Kluknavsky <fkluknav@redhat.com> - 0.93-1
|
||||
- rebase to 0.93
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user