intel / bmap-tools

BMAP Tools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement bmaptool copy skip option

bartosh opened this issue · comments

It would be great to have an option to skip initial offset of the source file when copying.

There were some discussion about it with the great recommendations from Artem how to better do this: http://lists.infradead.org/pipermail/bmap-tools/2015/thread.html

Some quick comments / suggestions after quickly skimming through that discussion thread you linked to:

  • Does it make sense to add a 'skip' option without also adding a 'count' option at the same time? E.g. if there's 4 partitions in an image, and you only want to copy out partition 2, then only having a 'skip' option will force you to copy out partitions 2, 3 and 4 as well; whereas if you had both 'skip' and 'count' options then you could copy out only partition 2 ;-)

  • With all the discussion about block-misalignment, what's the likelihood of wanting to skip a non-block-aligned number of bytes? Will partition boundaries (the use-case being discussed) always be block-aligned? And if so, given the block-based nature of bmap-tools, I wonder if it might be easier to specify 'skip' and 'count' as block-offsets, rather than byte-offsets? 🤷‍♂️

Good questions. Yes, skip should probably come with count and the unit should be the block. There can be a way to specify offset, but that would be just for improved user-friendliness and that would translate offsets to blocks and fail in case of misalignment.

Lets keep this feature request open for some time. If there are no takers, we'll close it and move to a "WishList.txt" file in the project itself.

Hello, the project was moved and now owned by a new team. Please, work with them. Check the README.md file. Thanks!