summaryrefslogtreecommitdiff
path: root/testing/libarchive/skip-fiemap-on-unavail.patch
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-02-25 23:15:06 +0000
committerroot <root@rshg054.dnsready.net>2012-02-25 23:15:06 +0000
commite4a5730eb358cb0d78bc022204ddccac068c2bf2 (patch)
tree8dc9d2ac6b1313cb68be1a6c8b51500397f8b225 /testing/libarchive/skip-fiemap-on-unavail.patch
parent299e917c17619f800f0c21cf43209065b608223f (diff)
Sat Feb 25 23:15:06 UTC 2012
Diffstat (limited to 'testing/libarchive/skip-fiemap-on-unavail.patch')
-rw-r--r--testing/libarchive/skip-fiemap-on-unavail.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/testing/libarchive/skip-fiemap-on-unavail.patch b/testing/libarchive/skip-fiemap-on-unavail.patch
new file mode 100644
index 000000000..d054aea4e
--- /dev/null
+++ b/testing/libarchive/skip-fiemap-on-unavail.patch
@@ -0,0 +1,41 @@
+From 293687358e2c52213a3f077bb3d8f860ea5bfda9 Mon Sep 17 00:00:00 2001
+From: Michihiro NAKAJIMA <ggcueroad@gmail.com>
+Date: Mon, 6 Feb 2012 04:51:16 +0900
+Subject: [PATCH] Fix issue 238. Skip the setup sparse on linux without a
+ check of errno if ioctl(,FS_IOC_FIEMAP,) failed because the
+ errno is not fixed , for example, some file system returns
+ ENOTTY, another returns EOPNOTSUPP, or EINVAL and so on. We
+ cannot decide what errno exactly indicates an unsupported
+ error.
+
+---
+ libarchive/archive_read_disk_entry_from_file.c | 13 +++----------
+ 1 file changed, 3 insertions(+), 10 deletions(-)
+
+diff --git a/libarchive/archive_read_disk_entry_from_file.c b/libarchive/archive_read_disk_entry_from_file.c
+index eef42ef74..6415008 100644
+--- a/libarchive/archive_read_disk_entry_from_file.c
++++ b/libarchive/archive_read_disk_entry_from_file.c
+@@ -859,16 +859,9 @@ setup_sparse(struct archive_read_disk *a,
+
+ r = ioctl(fd, FS_IOC_FIEMAP, fm);
+ if (r < 0) {
+- /* When errno is ENOTTY, it is better we should
+- * return ARCHIVE_OK because an earlier version
+- *(<2.6.28) cannot perfom FS_IOC_FIEMAP.
+- * We should also check if errno is EOPNOTSUPP,
+- * it means "Operation not supported". */
+- if (errno != ENOTTY && errno != EOPNOTSUPP) {
+- archive_set_error(&a->archive, errno,
+- "FIEMAP failed");
+- exit_sts = ARCHIVE_FAILED;
+- }
++ /* When something error happens, it is better we
++ * should return ARCHIVE_OK because an earlier
++ * version(<2.6.28) cannot perfom FS_IOC_FIEMAP. */
+ goto exit_setup_sparse;
+ }
+ if (fm->fm_mapped_extents == 0)
+--
+1.7.9.2
+