wufuyue / yaffs2utils

Automatically exported from code.google.com/p/yaffs2utils
GNU General Public License v2.0
1 stars 3 forks source link

Feature: extract only a selection of files #8

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
It would be nice to be able to extract a given file or fileset from a YAFFS2 
image. (e.g. a file carrying an image version number)

Original issue reported on code.google.com by HIGH...@gmail.com on 13 Jan 2011 at 3:24

GoogleCodeExporter commented 8 years ago

Original comment by penguin.lin on 18 Jan 2011 at 6:31

GoogleCodeExporter commented 8 years ago

Original comment by penguin.lin on 3 Mar 2011 at 10:10

GoogleCodeExporter commented 8 years ago
For this enhancement, I am thinking about the solution to extract a hardlink 
file which underlying object is NOT in the same fileset. Is there any 
suggestions?

Original comment by penguin.lin on 3 Mar 2011 at 2:24

GoogleCodeExporter commented 8 years ago
For hardlinks, I suggest extracting the target file with the name of the 
requested file. For softlinks, I'd extract the soft-link as is. Do you think 
this is feasible?

Original comment by HIGH...@gmail.com on 4 Mar 2011 at 8:17

GoogleCodeExporter commented 8 years ago
In my current implementation, all the hardlinks will be listed into a list, and 
they will be extracted after all others files are extracted.

For hardlinks, there are some method can be done when the target file is NOT 
existed:
1) Linking the files and ignoring the error.
2) Extracting the content of target file.
3) Extracting the content of target file, and scan & update the hardlink object 
in the list (update their equivalent object to the one which was extracted 
successfully).
4) Extracting the target contest into the temporary directory, linking them, 
then delete these temporary files after all hardlinks are processed.

Original comment by penguin.lin on 7 Mar 2011 at 6:22

GoogleCodeExporter commented 8 years ago

Original comment by penguin.lin on 8 Mar 2011 at 10:10

GoogleCodeExporter commented 8 years ago
Consider the following case with 2 files a and b which are hardlinked.
If a was the original file and b was hardlinked afterwards or if a is a 
hardlink to b, the result for extracting only 'a' would be different although 
conceptually (2 directory entries, 1 inode, 1 file) they shouldn't be.

So I believe option 2 is the only sane option.

Original comment by HIGH...@gmail.com on 8 Mar 2011 at 7:16

GoogleCodeExporter commented 8 years ago
I will start committing the codes into the trunk,
and these enhancement will be set as fixed in the several days.

Original comment by penguin.lin on 4 May 2011 at 6:39

GoogleCodeExporter commented 8 years ago

Original comment by penguin.lin on 7 Jul 2011 at 10:19