Re: tronconneuse: how is current_position done?
Denis Corbin <[email protected]> Wed, 30 Mar 2005 19:44:01 +0200
| Newsgroups | gmane.comp.sysutils.backup.dar.general |
|---|---|
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Wesley Leggette wrote: | On Thu, 2005-03-24 at 22:29 +0100, Denis Corbin wrote: | | Wesley Leggette wrote: | | [...] | | when the tronconneuse object is constructed, the underlyling layer is in | the state where the header_version has been read. So the offset points | to the first encrypted byte. This value is used when initializing the | tronconneuse object. | | |> So when using the tronconneuse, say if you want to store an offset into |> the catalog, do you store the value returned by get_position(), or do |> you have to add initial_shift to the position? no, the catalogue always get the value from the get_position() method, whatever is the underlying object (compresseur, tronconneuse, sar, etc.). | |> (Sorry, I just can't get it through my head ;) I can grasp HOW the |> offset position stored in the catalog is calculated. the offset is not "calculated" by the catalog object it is stored as returned by the get_position() method of the inherited generic_file object. |> I just can't figure |> out WHERE in the code this calculation occurs. the calculation occures in the get_position() method of each generic_file inherited class used in the stack used (compresseur/tronconneuse/sar/fichier for an example of possible stack). |> And is this offset |> position always the same number used when calculating block_num? block_num is internal to tronconneuse object. It is useful when the encrypted data does not need the same amount of byte to be stored as requires the clear corresponding data. | |> Thanks, |> Wesley | Cheers, Denis. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFCSuVhpC5CI8gYGlIRAuQUAJ0YzKWEAT+s+pIRWRWBnKF34KVfXgCfSo4T pf+H88vc7s9gSGpBQE3kXfM= =dzwZ -----END PGP SIGNATURE----- ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click