Christian Ebner
1443927c02
src/pxar/decoder.rs: correctly handle hardlinks in `Decoder`s attribute function
...
If the attributes are then returned by seeking to the new offset.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-09-10 10:46:39 +02:00
Christian Ebner
d00097a0e6
src/pxar/decoder.rs: split functionality of list_dir into list_dir and goodbye_table
...
In order to read the contents of the goodbye table while keeping the
functionality of list_dir in place as is.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-09-10 10:46:29 +02:00
Christian Ebner
ac12570e99
src/pxar/decoder.rs: make read_directory_entry usable by fuse
...
... and thereby allow it to read a single directory entry based on the
start and end archive offsets.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-09-10 10:32:48 +02:00
Christian Ebner
3f7f4f34be
src/pxar/decoder.rs: remove `DirectoryEntry` start_offset and end_offset functions
...
... as they are not needed with the latest iteration of the fuse callback
function impl (which never made it into the repos).
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-09-10 10:30:45 +02:00
Christian Ebner
ac30bc3326
src/pxar/decoder.rs: correctly read, check and skip filename
...
The previous implementation simply skipped over `size` bytes, which is not
correct as size includes also the header.
By relying on `SequentailDecoder`s read_filename function, this is correctly
taken care of plus some more integrity checks.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-09-10 10:30:21 +02:00
Christian Ebner
bbd055bf45
src/pxar/decoder.rs: impl functionality needed for fuse implementation
...
Implements functions attributes, open, read, read_link and get_dir
to be used by the fuse implementation which uses file offsets within the archive
as inodes to reference the archives items.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-09-06 07:18:14 +02:00
Christian Ebner
132cb0d0db
src/pxar/decoder.rs: Add comment for unsolved issue and refactor if statement.
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-09-06 07:16:31 +02:00
Christian Ebner
c7fee396c6
src/pxar/decoder.rs: add getter functions to obtain start/end offsets for directories
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-09-04 06:10:56 +02:00
Christian Ebner
3626ac611f
src/pxar/decoder.rs: rustfmt fixups
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-09-04 06:09:17 +02:00
Christian Ebner
e5471b4836
pxar/decoder: avoid failing on hardlinks and return corresponding target file entry
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
[Fixup: remove unnecessary 'mut']
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-08-21 09:32:52 +02:00
Christian Ebner
58262f40f7
src/pxar/decoder.rs: get correct stats for root directory
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-08-21 09:31:41 +02:00
Christian Ebner
7d26720e79
src/pxar/decoder.rs: move GOODBYE_ITEM_SIZE from function to module scope.
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-08-21 09:31:39 +02:00
Christian Ebner
7750b7f2b7
pxar: decoder: take ownership of underlying reader
...
By taking ownership it is easier to move the decoder into another struct,
e.g. into a session context in fuse.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-08-14 08:55:08 +02:00
Christian Ebner
f50b4fd6a0
src/pxar/decoder.rs: cleanup s/CaDirectoryEntry/DirectoryEntry
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-08-14 08:54:08 +02:00
Christian Ebner
5e50c606b0
pxar: cleanup: s/CA_FORMAT/PXAR/g and s/CaFormat/Pxar/g
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-08-03 08:51:33 +02:00
Christian Ebner
47651f9530
pxar: cleanup: move feature flags to src/pxar/flags.rs and omit CA_FORMAT prefix on all of them
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-08-03 08:51:06 +02:00
Christian Ebner
fa7e957ca3
pxar: Adapt SequentialDecoder::restore() calls to pass empty match pattern for full restore
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-07-17 12:19:31 +02:00
Christian Ebner
7dcbe051e9
pxar: Refactor SequentialDecoder to store the callback function within the struct
...
Reduces the number of arguments for the function calls within the decoder.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-07-05 06:38:22 +02:00
Christian Ebner
b344461b33
pxar: pass feature_flags to encoder/decoder instead of individual flags
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-05-24 06:11:36 +02:00
Christian Ebner
54b14ad741
src/pxar/decoder.rs: pass flags for xattrs and fcaps to decoder.
...
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
2019-05-23 06:40:09 +02:00
Dietmar Maurer
9307279faf
cleanup: remove dead code
2019-03-15 10:18:28 +01:00
Dietmar Maurer
46cfe7ab7e
src/pxar/decoder.rs: implement seekable decoder
2019-03-15 09:36:05 +01:00
Dietmar Maurer
0e21b87be3
renamed: src/pxar/decoder.rs -> src/pxar/sequential_decoder.rs
2019-03-15 08:36:02 +01:00
Dietmar Maurer
3dbfe5b142
simplify pxar module structure
2019-03-15 08:24:32 +01:00
Dietmar Maurer
02c93163cf
src/pxar/decoder.rs: correctly call callback()
2019-03-15 08:02:04 +01:00
Dietmar Maurer
f98746ba6c
src/pxar/decoder.rs: improve docu
2019-03-15 07:12:11 +01:00
Dietmar Maurer
0b2d7fdc81
src/pxar/decoder.rs: avoid compiler warnings
2019-03-14 17:45:47 +01:00
Dietmar Maurer
37940aa1f9
src/bin/pxar.rs: implement dump/list
2019-03-14 17:43:11 +01:00
Dietmar Maurer
40360fde6e
src/pxar/decoder.rs: implement dump_archive
...
use this to debug archive problems ...
2019-03-14 13:10:27 +01:00
Dietmar Maurer
8968258b66
rename catar into pxar
...
To avoid confusion with the casync implementation.
2019-03-14 10:54:09 +01:00