]> git.proxmox.com Git - proxmox-backup.git/commit
tape: changer: correctly consume data in decode_element_status_page
authorDominik Csapak <d.csapak@proxmox.com>
Thu, 22 Jul 2021 09:26:29 +0000 (11:26 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 22 Jul 2021 09:37:14 +0000 (11:37 +0200)
commitf9aa980c7d9f6a2cb6c64cd5f5547a2bce3d01cf
tree9d76a49b3cf00eba86fdeaf1c593d66fae8ff6f9
parentad0364c5581cb48d3d9868f58bf1c711689d1465
tape: changer: correctly consume data in decode_element_status_page

instead of 'blindly' trusting the changer to deliver the fields written
in the specification, trust the length data it returns in the header.

we slice the descriptor data into equal sized chunks of the correct
size, then we do not have care bout the len and empty checks anymore

this also makes the code to read the rest of the page obsolete,
since the next descriptor is on the correct offset anyway

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
src/tape/changer/sg_pt_changer.rs