typo fixes all over the place
found and semi-manually replaced by using: codespell -L mut -L crate -i 3 -w Mostly in comments, but also email notification and two occurrences of misspelled 'reserved' struct member, which where not used and cargo build did not complain about the change, soo ... Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
@ -196,7 +196,7 @@ struct SspDataEncryptionCapabilityPage {
|
||||
page_code: u16,
|
||||
page_len: u16,
|
||||
extdecc_cfgp_byte: u8,
|
||||
reserverd: [u8; 15],
|
||||
reserved: [u8; 15],
|
||||
}
|
||||
|
||||
#[derive(Endian)]
|
||||
@ -241,13 +241,13 @@ fn decode_spin_data_encryption_caps(data: &[u8]) -> Result<u8, Error> {
|
||||
let desc: SspDataEncryptionAlgorithmDescriptor =
|
||||
unsafe { reader.read_be_value()? };
|
||||
if desc.descriptor_len != 0x14 {
|
||||
bail!("got wrong key descriptior len");
|
||||
bail!("got wrong key descriptor len");
|
||||
}
|
||||
if (desc.control_byte_4 & 0b00000011) != 2 {
|
||||
continue; // cant encrypt in hardware
|
||||
continue; // can't encrypt in hardware
|
||||
}
|
||||
if ((desc.control_byte_4 & 0b00001100) >> 2) != 2 {
|
||||
continue; // cant decrypt in hardware
|
||||
continue; // can't decrypt in hardware
|
||||
}
|
||||
if desc.algorithm_code == 0x00010014 && desc.key_size == 32 {
|
||||
aes_cgm_index = Some(desc.algorythm_index);
|
||||
@ -276,7 +276,7 @@ struct SspDataEncryptionStatusPage {
|
||||
control_byte: u8,
|
||||
key_format: u8,
|
||||
key_len: u16,
|
||||
reserverd: [u8; 8],
|
||||
reserved: [u8; 8],
|
||||
}
|
||||
|
||||
fn decode_spin_data_encryption_status(data: &[u8]) -> Result<DataEncryptionStatus, Error> {
|
||||
|
@ -72,14 +72,14 @@ static MAM_ATTRIBUTES: &[ (u16, u16, MamFormat, &str) ] = &[
|
||||
(0x08_02, 8, MamFormat::ASCII, "Application Version"),
|
||||
(0x08_03, 160, MamFormat::ASCII, "User Medium Text Label"),
|
||||
(0x08_04, 12, MamFormat::ASCII, "Date And Time Last Written"),
|
||||
(0x08_05, 1, MamFormat::BINARY, "Text Localization Identifer"),
|
||||
(0x08_05, 1, MamFormat::BINARY, "Text Localization Identifier"),
|
||||
(0x08_06, 32, MamFormat::ASCII, "Barcode"),
|
||||
(0x08_07, 80, MamFormat::ASCII, "Owning Host Textual Name"),
|
||||
(0x08_08, 160, MamFormat::ASCII, "Media Pool"),
|
||||
(0x08_0B, 16, MamFormat::ASCII, "Application Format Version"),
|
||||
(0x08_0C, 50, MamFormat::ASCII, "Volume Coherency Information"),
|
||||
(0x08_20, 36, MamFormat::ASCII, "Medium Globally Unique Identifer"),
|
||||
(0x08_21, 36, MamFormat::ASCII, "Media Pool Globally Unique Identifer"),
|
||||
(0x08_20, 36, MamFormat::ASCII, "Medium Globally Unique Identifier"),
|
||||
(0x08_21, 36, MamFormat::ASCII, "Media Pool Globally Unique Identifier"),
|
||||
|
||||
(0x10_00, 28, MamFormat::BINARY, "Unique Cartridge Identify (UCI)"),
|
||||
(0x10_01, 24, MamFormat::BINARY, "Alternate Unique Cartridge Identify (Alt-UCI)"),
|
||||
|
@ -209,7 +209,7 @@ pub trait TapeDriver {
|
||||
/// Set or clear encryption key
|
||||
///
|
||||
/// We use the media_set_uuid to XOR the secret key with the
|
||||
/// uuid (first 16 bytes), so that each media set uses an uique
|
||||
/// uuid (first 16 bytes), so that each media set uses an unique
|
||||
/// key for encryption.
|
||||
fn set_encryption(
|
||||
&mut self,
|
||||
@ -465,7 +465,7 @@ pub fn request_and_load_media(
|
||||
}
|
||||
}
|
||||
|
||||
/// Aquires an exclusive lock for the tape device
|
||||
/// Acquires an exclusive lock for the tape device
|
||||
///
|
||||
/// Basically calls lock_device_path() using the configured drive path.
|
||||
pub fn lock_tape_device(
|
||||
@ -539,7 +539,7 @@ fn tape_device_path(
|
||||
|
||||
pub struct DeviceLockGuard(std::fs::File);
|
||||
|
||||
// Aquires an exclusive lock on `device_path`
|
||||
// Acquires an exclusive lock on `device_path`
|
||||
//
|
||||
// Uses systemd escape_unit to compute a file name from `device_path`, the try
|
||||
// to lock `/var/lock/<name>`.
|
||||
|
@ -429,7 +429,7 @@ impl MediaChange for VirtualTapeHandle {
|
||||
}
|
||||
|
||||
fn transfer_media(&mut self, _from: u64, _to: u64) -> Result<MtxStatus, Error> {
|
||||
bail!("media tranfer is not implemented!");
|
||||
bail!("media transfer is not implemented!");
|
||||
}
|
||||
|
||||
fn export_media(&mut self, _label_text: &str) -> Result<Option<u64>, Error> {
|
||||
|
Reference in New Issue
Block a user