I see source code.
More at http://www.openxource.com/crossings/2005/02/21/read_the_source_luke/brief
Bob
![]() | Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years. Thanks, CNET Support |
I'm trying to figure out exactly how partimage distinguishes
between a free block (containing old/garbage data) and an empty (zero)
block when it comes to disk imaging.
In other words, since "dd" copies all the blocks, what technique does
partimage use that enables it to only clone the used blocks?
Everywhere I've looked online says partimage has this ability, but HOW does it do it?
Any ideas?
Discussion is locked
I already did, but it's not exactly easy to decipher what it's doing.
Anyway, after some research on the source code I have a slight clue as to how it's doing this.
Partimage basically looks for the bits that are set ("1") and treats those as used bits. Everything else is treated as unused/"0"/empty. Look for "isBitSet" function in the source code.
I think that's how it works...still need more research to figure it out exactly. Anyway, hoped this helped some people.