Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#51663 - [ext4magic] Won't work without a patch

Attached to Project: Community Packages
Opened by Jonny Gerold (fsk141) - Thursday, 03 November 2016, 02:43 GMT
Last edited by Sébastien Luttringer (seblu) - Thursday, 03 November 2016, 11:50 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sébastien Luttringer (seblu)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
I tried using ext4magic; pulled straight from the repos, and it just plain didn't work. I scoured around and found the following patch that fixed it up nicely, was able to recover my data. Check it out, and please add at least a comment in the package. If this saved me, I'd only hope that it could help someone else.

I'm using latest version, 0.3.2.

Original forum post:
https://sourceforge.net/p/ext4magic/tickets/3/y

Download patch:
http://sourceforge.net/projects/ext4magic/files/Patches/workaround.patch/download

Plaintext of patch (for archival sake)
::workaround.patch::

diff -Naur ext4magic-0.3.2/src/block.c ext4magic-0.3.2_new/src/block.c
--- ext4magic-0.3.2/src/block.c 2014-03-12 01:54:03.000000000 +0100
+++ ext4magic-0.3.2_new/src/block.c 2015-10-18 23:28:47.060000000 +0200
@@ -130,7 +130,8 @@



-
+//FIXME : Debian Bug #802089 (temporary work around)
+/*
errcode_t local_ext2fs_extent_open(ext2_filsys fs, struct ext2_inode inode,
ext2_extent_handle_t *ret_handle) {

@@ -189,7 +190,7 @@

return 0;
}
-
+*/

static int mark_extent_block(ext2_filsys fs, char *extent_block ){
struct ext3_extent_header *eh;
@@ -613,7 +614,11 @@
int uninit;
unsigned int j;

- ctx.errcode = local_ext2fs_extent_open(fs, inode, &handle);
+
+//FIXME : Debian Bug #802089 (temporary work around)
+// ctx.errcode = local_ext2fs_extent_open(fs, inode, &handle);
+ ctx.errcode = ext2fs_extent_open2(fs,0,&inode,&handle);
+//
if (ctx.errcode)
goto abort_exit;

diff -Naur ext4magic-0.3.2/src/inode.c ext4magic-0.3.2_new/src/inode.c
--- ext4magic-0.3.2/src/inode.c 2014-03-12 01:54:03.000000000 +0100
+++ ext4magic-0.3.2_new/src/inode.c 2015-10-18 23:23:19.468000000 +0200
@@ -112,8 +112,10 @@
unsigned int printed = 0;
errcode_t errcode;

-
- errcode = local_ext2fs_extent_open(current_fs, *inode, &handle);
+//FIXME : Debian Bug #802089 (temporary work around)
+// errcode = local_ext2fs_extent_open(current_fs, *inode, &handle);
+ errcode = ext2fs_extent_open2(current_fs,0,inode,&handle);
+//
if (errcode)
return;

This task depends upon

Closed by  Sébastien Luttringer (seblu)
Thursday, 03 November 2016, 11:50 GMT
Reason for closing:  Fixed
Additional comments about closing:  ext4magic-0.3.2-2
Comment by Sébastien Luttringer (seblu) - Thursday, 03 November 2016, 11:50 GMT
Documentation takes place in our wiki. So if you want to save time to other, write some words there.

Patched version is uploaded

Loading...