]> git.proxmox.com Git - proxmox-backup.git/commitdiff
typo fixes all over the place
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 10 Mar 2021 15:37:09 +0000 (16:37 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 10 Mar 2021 15:39:57 +0000 (16:39 +0100)
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>
46 files changed:
src/api2/access/tfa.rs
src/api2/admin/sync.rs
src/api2/config/tape_encryption_keys.rs
src/api2/node/apt.rs
src/api2/tape/drive.rs
src/api2/tape/media.rs
src/api2/types/mod.rs
src/api2/types/tape/device.rs
src/backup.rs
src/backup/chunk_store.rs
src/backup/datastore.rs
src/bin/proxmox-backup-client.rs
src/bin/proxmox-backup-manager.rs
src/bin/proxmox_backup_client/key.rs
src/bin/proxmox_backup_client/mount.rs
src/bin/proxmox_tape/encryption_key.rs
src/bin/sg-tape-cmd.rs
src/buildcfg.rs
src/client/backup_writer.rs
src/client/vsock_client.rs
src/config/network/helper.rs
src/config/tape_encryption_keys.rs
src/config/tfa.rs
src/server/email_notifications.rs
src/server/worker_task.rs
src/tape/changer/mod.rs
src/tape/changer/mtx/mod.rs
src/tape/changer/sg_pt_changer.rs
src/tape/drive/encryption.rs
src/tape/drive/mam.rs
src/tape/drive/mod.rs
src/tape/drive/virtual_tape.rs
src/tape/file_formats/blocked_reader.rs
src/tape/file_formats/chunk_archive.rs
src/tape/file_formats/snapshot_archive.rs
src/tape/helpers/snapshot_reader.rs
src/tape/inventory.rs
src/tape/media_pool.rs
src/tape/media_set.rs
src/tape/pool_writer.rs
src/tape/tape_write.rs
src/tape/test/alloc_writable_media.rs
src/tools/lru_cache.rs
src/tools/parallel_handler.rs
src/tools/sgutils2.rs
src/tools/subscription.rs

index 0127f54c1b104dd9f5c9e354887ed5019b0e2e34..d75b7f95a9be63b0f642447ad60d1a6a155c65d5 100644 (file)
@@ -181,7 +181,7 @@ fn get_tfa_entry(userid: Userid, id: String) -> Result<TypedTfaInfo, Error> {
 
     if let Some(user_data) = crate::config::tfa::read()?.users.remove(&userid) {
         match {
-            // scope to prevent the temprary iter from borrowing across the whole match
+            // scope to prevent the temporary iter from borrowing across the whole match
             let entry = tfa_id_iter(&user_data).find(|(_ty, _index, entry_id)| id == *entry_id);
             entry.map(|(ty, index, _)| (ty, index))
         } {
@@ -259,7 +259,7 @@ fn delete_tfa(
         .ok_or_else(|| http_err!(NOT_FOUND, "no such entry: {}/{}", userid, id))?;
 
     match {
-        // scope to prevent the temprary iter from borrowing across the whole match
+        // scope to prevent the temporary iter from borrowing across the whole match
         let entry = tfa_id_iter(&user_data).find(|(_, _, entry_id)| id == *entry_id);
         entry.map(|(ty, index, _)| (ty, index))
     } {
index d619bf8d55da60b9efb31fcabba2e70b4e06632a..f673e2caea3399b7029a6d0d8abeb12627261fd4 100644 (file)
@@ -1,4 +1,4 @@
-//! Datastore Syncronization Job Management
+//! Datastore Synchronization Job Management
 
 use anyhow::{bail, format_err, Error};
 use serde_json::Value;
index 467811306d5fa8b2f742516d790c94f1f0a83707..31be0ed19cccc17500c1bfd959bd2cb0f11d147b 100644 (file)
@@ -119,7 +119,7 @@ pub fn change_passphrase(
     let kdf = kdf.unwrap_or_default();
 
     if let Kdf::None = kdf {
-        bail!("Please specify a key derivation  funktion (none is not allowed here).");
+        bail!("Please specify a key derivation function (none is not allowed here).");
     }
 
     let _lock = open_file_locked(
@@ -187,7 +187,7 @@ pub fn create_key(
     let kdf = kdf.unwrap_or_default();
 
     if let Kdf::None = kdf {
-        bail!("Please specify a key derivation  funktion (none is not allowed here).");
+        bail!("Please specify a key derivation function (none is not allowed here).");
     }
 
     let (key, mut key_config) = KeyConfig::new(password.as_bytes(), kdf)?;
index 9d723f1763c11311e3c94376d9651a1ed8645d66..e77b89fa4c2642c89f7df4b2bc729330cfd4c1a6 100644 (file)
@@ -85,7 +85,7 @@ fn do_apt_update(worker: &WorkerTask, quiet: bool) -> Result<(), Error> {
             },
             notify: {
                 type: bool,
-                description: r#"Send notification mail about new package updates availanle to the
+                description: r#"Send notification mail about new package updates available to the
                     email address configured for 'root@pam')."#,
                 default: false,
                 optional: true,
index db9b919ea967ef3f3025c27ae9860e425a3ff87e..9e86d8f84f3ac45514ad8ac2c1384660f311dd44 100644 (file)
@@ -220,7 +220,7 @@ pub async fn load_slot(drive: String, source_slot: u64) -> Result<(), Error> {
         },
     },
     returns: {
-        description: "The import-export slot number the media was transfered to.",
+        description: "The import-export slot number the media was transferred to.",
         type: u64,
         minimum: 1,
     },
@@ -782,7 +782,7 @@ pub fn clean_drive(
                  }
              }
 
-            worker.log("Drive cleaned sucessfully");
+            worker.log("Drive cleaned successfully");
 
             Ok(())
         },
@@ -943,7 +943,7 @@ pub fn update_inventory(
                     }
                     Ok((Some(media_id), _key_config)) => {
                         if label_text != media_id.label.label_text {
-                            worker.warn(format!("label text missmatch ({} != {})", label_text, media_id.label.label_text));
+                            worker.warn(format!("label text mismatch ({} != {})", label_text, media_id.label.label_text));
                             continue;
                         }
                         worker.log(format!("inventorize media '{}' with uuid '{}'", label_text, media_id.label.uuid));
index ecfe41bf0904cc514d315dcd2ed9e2857ae5e4a7..963ae9bc2b8d47cee76b99d38ef92645e56d7159 100644 (file)
@@ -497,7 +497,7 @@ pub fn get_media_status(uuid: Uuid) -> Result<MediaStatus, Error> {
 /// Update media status (None, 'full', 'damaged' or 'retired')
 ///
 /// It is not allowed to set status to 'writable' or 'unknown' (those
-/// are internaly managed states).
+/// are internally managed states).
 pub fn update_media_status(uuid: Uuid, status: Option<MediaStatus>) -> Result<(), Error> {
 
     let status_path = Path::new(TAPE_STATUS_DIR);
index b72d54c1ecf63872ede0d334714ea09b099539a1..3e720dad5009e31d5568a17cd5cab54a087e3355 100644 (file)
@@ -1272,7 +1272,7 @@ pub struct APTUpdateInfo {
 pub enum Notify {
     /// Never send notification
     Never,
-    /// Send notifications for failed and sucessful jobs
+    /// Send notifications for failed and successful jobs
     Always,
     /// Send notifications for failed jobs only
     Error,
index 811cd36f16db0bb0ed8a56f05277cbdf7bef8218..368a00152329086b342dc4f52b7bdf069c953c0a 100644 (file)
@@ -21,7 +21,7 @@ pub struct OptionalDeviceIdentification {
 #[api()]
 #[derive(Debug,Serialize,Deserialize)]
 #[serde(rename_all = "kebab-case")]
-/// Kind of devive
+/// Kind of device
 pub enum DeviceKind {
     /// Tape changer (Autoloader, Robot)
     Changer,
index 62a40ddec7aa94086f0b9e84b9d1880528ecf7a6..cca438818b49724e10594ae2e12302f5fbf021df 100644 (file)
@@ -75,7 +75,7 @@
 //!
 //! Since PBS allows multiple potentially interfering operations at the
 //! same time (e.g. garbage collect, prune, multiple backup creations
-//! (only in seperate groups), forget, ...), these need to lock against
+//! (only in separate groups), forget, ...), these need to lock against
 //! each other in certain scenarios. There is no overarching global lock
 //! though, instead always the finest grained lock possible is used,
 //! because running these operations concurrently is treated as a feature
index cc4a94350f476386b42919a0b22d553aeff68836..31e8307c067566638cc025f69dfa776e9edac5c4 100644 (file)
@@ -452,7 +452,7 @@ impl ChunkStore {
 #[test]
 fn test_chunk_store1() {
 
-    let mut path = std::fs::canonicalize(".").unwrap(); // we need absulute path
+    let mut path = std::fs::canonicalize(".").unwrap(); // we need absolute path
     path.push(".testdir");
 
     if let Err(_e) = std::fs::remove_dir_all(".testdir") { /* ignore */ }
index f8298ae852e4b5f165dc4850ecab59983a0e769f..28dda7e7888fffec87cbbed4c3d18431c31d7676 100644 (file)
@@ -448,7 +448,7 @@ impl DataStore {
             if !self.chunk_store.cond_touch_chunk(digest, false)? {
                 crate::task_warn!(
                     worker,
-                    "warning: unable to access non-existant chunk {}, required by {:?}",
+                    "warning: unable to access non-existent chunk {}, required by {:?}",
                     proxmox::tools::digest_to_hex(digest),
                     file_name,
                 );
index 1b8b5bec17eb2a17a73e7e29510ffc436c0d71b3..5aae08734795aec5b893c78ac3a04da298cd1d1e 100644 (file)
@@ -1453,7 +1453,7 @@ fn parse_archive_type(name: &str) -> (String, ArchiveType) {
                type: String,
                description: r###"Target directory path. Use '-' to write to standard output.
 
-We do not extraxt '.pxar' archives when writing to standard output.
+We do not extract '.pxar' archives when writing to standard output.
 
 "###
            },
index 68934c28e509a4aa2648712c5faa8633564c01ac..105a11f86785593399e5a0ade7a7866d05c14af3 100644 (file)
@@ -330,7 +330,7 @@ async fn get_versions(verbose: bool, param: Value) -> Result<Value, Error> {
 
     let options = default_table_format_options()
         .disable_sort()
-        .noborder(true) // just not helpfull for version info which gets copy pasted often
+        .noborder(true) // just not helpful for version info which gets copy pasted often
         .column(ColumnConfig::new("Package"))
         .column(ColumnConfig::new("Version"))
         .column(ColumnConfig::new("ExtraInfo").header("Extra Info"))
index 6e18a0262c55bd794f6210b381e292811be1e549..76b135a2d20910acc51cd7067198c9c13ac30cee 100644 (file)
@@ -527,7 +527,7 @@ fn show_master_pubkey(path: Option<String>, param: Value) -> Result<(), Error> {
                 optional: true,
             },
             subject: {
-                description: "Include the specified subject as titel text.",
+                description: "Include the specified subject as title text.",
                 optional: true,
             },
             "output-format": {
index 2410075280a032febafb350d807f7d74316d0f7b..be6aca05cb553e4a584dd3ecd7e1dffeaf987b59 100644 (file)
@@ -140,7 +140,7 @@ fn mount(
         return proxmox_backup::tools::runtime::main(mount_do(param, None));
     }
 
-    // Process should be deamonized.
+    // Process should be daemonized.
     // Make sure to fork before the async runtime is instantiated to avoid troubles.
     let (pr, pw) = proxmox_backup::tools::pipe()?;
     match unsafe { fork() } {
index 9177a3777eaaa42f06afa36905a6849069414558..907d2d636d76180d27c3573e60aa8ec43065ba3a 100644 (file)
@@ -84,7 +84,7 @@ pub fn encryption_key_commands() -> CommandLineInterface {
                 schema: TAPE_ENCRYPTION_KEY_FINGERPRINT_SCHEMA,
             },
             subject: {
-                description: "Include the specified subject as titel text.",
+                description: "Include the specified subject as title text.",
                 optional: true,
             },
             "output-format": {
@@ -128,7 +128,7 @@ fn paper_key(
         },
     },
 )]
-/// Print tthe encryption key's metadata.
+/// Print the encryption key's metadata.
 fn show_key(
     param: Value,
     rpcenv: &mut dyn RpcEnvironment,
index 475b2cbb16b26b18784a09a21d56d7c5b6595ccb..86998972cac10b02ebd305503fad8aa5278eb62f 100644 (file)
@@ -1,6 +1,6 @@
 /// Tape command implemented using scsi-generic raw commands
 ///
-/// SCSI-generic command needs root priviledges, so this binary need
+/// SCSI-generic command needs root privileges, so this binary need
 /// to be setuid root.
 ///
 /// This command can use STDIN as tape device handle.
index 9aff8b4bae3be5550e9044ad40b77ea64c463f5b..4f333288aeb65c20c2875c7b57cfe0905a33197e 100644 (file)
@@ -16,11 +16,11 @@ pub const PROXMOX_BACKUP_RUN_DIR: &str = PROXMOX_BACKUP_RUN_DIR_M!();
 /// namespaced directory for persistent logging
 pub const PROXMOX_BACKUP_LOG_DIR: &str = PROXMOX_BACKUP_LOG_DIR_M!();
 
-/// logfile for all API reuests handled by the proxy and privileged API daemons. Note that not all
+/// logfile for all API requests handled by the proxy and privileged API daemons. Note that not all
 /// failed logins can be logged here with full information, use the auth log for that.
 pub const API_ACCESS_LOG_FN: &str = concat!(PROXMOX_BACKUP_LOG_DIR_M!(), "/api/access.log");
 
-/// logfile for any failed authentication, via ticket or via token, and new successfull ticket
+/// logfile for any failed authentication, via ticket or via token, and new successful ticket
 /// creations. This file can be useful for fail2ban.
 pub const API_AUTH_LOG_FN: &str = concat!(PROXMOX_BACKUP_LOG_DIR_M!(), "/api/auth.log");
 
index 01ea7704fdee474249a5800f4963c068c766a1e5..cef7edef3230c7d2a01d07c65e126c8099548287 100644 (file)
@@ -509,7 +509,7 @@ impl BackupWriter {
     }
 
     // We have no `self` here for `h2` and `verbose`, the only other arg "common" with 1 other
-    // funciton in the same path is `wid`, so those 3 could be in a struct, but there's no real use
+    // function in the same path is `wid`, so those 3 could be in a struct, but there's no real use
     // since this is a private method.
     #[allow(clippy::too_many_arguments)]
     fn upload_chunk_info_stream(
index ce3f7bc7d6a96174067f97b99566ebba1b7cf883..d78f2a8af630df33ab08283c3e0e27ab36285395 100644 (file)
@@ -86,7 +86,7 @@ impl tower_service::Service<Uri> for VsockConnector {
 
             Ok(connection)
         })
-        // unravel the thread JoinHandle to a useable future
+        // unravel the thread JoinHandle to a usable future
         .map(|res| match res {
             Ok(res) => res,
             Err(err) => Err(format_err!("thread join error on vsock connect: {}", err)),
index 0449caacd64044eee424009a817f56d018c9ce05..2ec0c1ea8211fbe3b693f0928634513223861d6b 100644 (file)
@@ -82,7 +82,7 @@ pub fn check_netmask(mask: u8, is_v6: bool) -> Result<(), Error> {
     Ok(())
 }
 
-// parse ip address with otional cidr mask
+// parse ip address with optional cidr mask
 pub fn parse_address_or_cidr(cidr: &str) -> Result<(String, Option<u8>, bool), Error> {
 
     lazy_static! {
index d9a83afb982ec361136058bb37171f17103250f5..42c3184dea0b50751c814156f38c37dfe50ffee2 100644 (file)
@@ -4,10 +4,10 @@
 //! indexed by key fingerprint.
 //!
 //! We store the plain key (unencrypted), as well as a encrypted
-//! version protected by passowrd (see struct `KeyConfig`)
+//! version protected by password (see struct `KeyConfig`)
 //!
 //! Tape backups store the password protected version on tape, so that
-//! it is possible to retore the key from tape if you know the
+//! it is possible to restore the key from tape if you know the
 //! password.
 
 use std::collections::HashMap;
index 7c656d20311f0afe859d98223ba9a7603e6f1593..6b65f6a555b354188178ce1fe65399fff475322a 100644 (file)
@@ -590,7 +590,7 @@ impl TfaUserChallengeData {
     }
 
     /// Save the current data. Note that we do not replace the file here since we lock the file
-    /// itself, as it is in `/run`, and the typicall error case for this particular situation
+    /// itself, as it is in `/run`, and the typical error case for this particular situation
     /// (machine loses power) simply prevents some login, but that'll probably fail anyway for
     /// other reasons then...
     ///
index f09a893145c85430c39f2e7585addc71ee0d33b6..306e84d0564b571ba33006f39b57da8c156541c5 100644 (file)
@@ -43,7 +43,7 @@ Deduplication Factor: {{deduplication-factor}}
 Garbage collection successful.
 
 
-Please visit the web interface for futher details:
+Please visit the web interface for further details:
 
 <https://{{fqdn}}:{{port}}/#DataStore-{{datastore}}>
 
@@ -57,7 +57,7 @@ Datastore: {{datastore}}
 Garbage collection failed: {{error}}
 
 
-Please visit the web interface for futher details:
+Please visit the web interface for further details:
 
 <https://{{fqdn}}:{{port}}/#pbsServerAdministration:tasks>
 
@@ -71,7 +71,7 @@ Datastore: {{job.store}}
 Verification successful.
 
 
-Please visit the web interface for futher details:
+Please visit the web interface for further details:
 
 <https://{{fqdn}}:{{port}}/#DataStore-{{job.store}}>
 
@@ -89,7 +89,7 @@ Verification failed on these snapshots/groups:
 {{/each}}
 
 
-Please visit the web interface for futher details:
+Please visit the web interface for further details:
 
 <https://{{fqdn}}:{{port}}/#pbsServerAdministration:tasks>
 
@@ -105,7 +105,7 @@ Remote Store: {{job.remote-store}}
 Synchronization successful.
 
 
-Please visit the web interface for futher details:
+Please visit the web interface for further details:
 
 <https://{{fqdn}}:{{port}}/#DataStore-{{job.store}}>
 
@@ -121,7 +121,7 @@ Remote Store: {{job.remote-store}}
 Synchronization failed: {{error}}
 
 
-Please visit the web interface for futher details:
+Please visit the web interface for further details:
 
 <https://{{fqdn}}:{{port}}/#pbsServerAdministration:tasks>
 
@@ -152,7 +152,7 @@ Tape Drive: {{job.drive}}
 Tape Backup successful.
 
 
-Please visit the web interface for futher details:
+Please visit the web interface for further details:
 
 <https://{{fqdn}}:{{port}}/#DataStore-{{job.store}}>
 
@@ -171,7 +171,7 @@ Tape Drive: {{job.drive}}
 Tape Backup failed: {{error}}
 
 
-Please visit the web interface for futher details:
+Please visit the web interface for further details:
 
 <https://{{fqdn}}:{{port}}/#pbsServerAdministration:tasks>
 
index 3e2887f5f52dd4227fef096627ba07a333c83e8f..1e8e009fcf82687dde9bfa596a999c0a970cce1c 100644 (file)
@@ -749,7 +749,7 @@ impl WorkerTask {
             match data.abort_listeners.pop() {
                 None => { break; },
                 Some(ch) => {
-                    let _ = ch.send(()); // ignore erros here
+                    let _ = ch.send(()); // ignore errors here
                 },
             }
         }
index 75b721319fb044ec18c6d7f056ee9d51591363e8..1e58a43754779c122302d9c6e2a44c508a874e0f 100644 (file)
@@ -35,7 +35,7 @@ use crate::api2::types::{
 /// Changer element status.
 ///
 /// Drive and slots may be `Empty`, or contain some media, either
-/// with knwon volume tag `VolumeTag(String)`, or without (`Full`).
+/// with known volume tag `VolumeTag(String)`, or without (`Full`).
 #[derive(Serialize, Deserialize, Debug)]
 pub enum ElementStatus {
     Empty,
@@ -87,7 +87,7 @@ pub struct MtxStatus {
     pub drives: Vec<DriveStatus>,
     /// List of known storage slots
     pub slots: Vec<StorageElementStatus>,
-    /// Tranport elements
+    /// Transport elements
     ///
     /// Note: Some libraries do not report transport elements.
     pub transports: Vec<TransportElementStatus>,
@@ -261,7 +261,7 @@ pub trait MediaChange {
 
     /// List online media labels (label_text/barcodes)
     ///
-    /// List acessible (online) label texts. This does not include
+    /// List accessible (online) label texts. This does not include
     /// media inside import-export slots or cleaning media.
     fn online_media_label_texts(&mut self) -> Result<Vec<String>, Error> {
         let status = self.status()?;
@@ -378,7 +378,7 @@ pub trait MediaChange {
 
     /// Unload media to a free storage slot
     ///
-    /// If posible to the slot it was previously loaded from.
+    /// If possible to the slot it was previously loaded from.
     ///
     /// Note: This method consumes status - so please use returned status afterward.
     fn unload_to_free_slot(&mut self, status: MtxStatus) -> Result<MtxStatus, Error> {
index 6ede17df9af26c612df8bf599fc8710a82ec3d62..dc3a3aee4c709e9ea527fa11a58ee2df53ca5809 100644 (file)
@@ -1,4 +1,4 @@
-//! Wrapper around expernal `mtx` command line tool
+//! Wrapper around external `mtx` command line tool
 
 mod parse_mtx_status;
 pub use parse_mtx_status::*;
index b2be95481a46668712125f075dcdaad7c5a69f45..ed63b61543f47d679e3510fd23730d32184943d2 100644 (file)
@@ -246,7 +246,7 @@ pub fn unload(
     Ok(())
 }
 
-/// Tranfer medium from one storage slot to another
+/// Transfer medium from one storage slot to another
 pub fn transfer_medium<F: AsRawFd>(
     file: &mut F,
     from_slot: u64,
@@ -362,7 +362,7 @@ pub fn read_element_status<F: AsRawFd>(file: &mut F) -> Result<MtxStatus, Error>
         bail!("got wrong number of import/export elements");
     }
     if (setup.transfer_element_count as usize) != drives.len() {
-        bail!("got wrong number of tranfer elements");
+        bail!("got wrong number of transfer elements");
     }
 
     // create same virtual slot order as mtx(1)
@@ -428,7 +428,7 @@ struct SubHeader {
     element_type_code: u8,
     flags: u8,
     descriptor_length: u16,
-    reseved: u8,
+    reserved: u8,
     byte_count_of_descriptor_data_available: [u8;3],
 }
 
index 1d9a50aeafec3d4fd2d8c60f847c22299a640ad4..7b687f2c35a789100fdc7dda76f18b9476472c8b 100644 (file)
@@ -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> {
index a90f1655b48799ef2212c7b1c596f53882062a8c..cbb377d3d592d37be04c1b03eaa6a12519a1236a 100644 (file)
@@ -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)"),
index c3021dc3a39c2227b95f1f8ce066e7f150a79de3..a386abf877542631be0e442c8d5ee0a70265f24f 100644 (file)
@@ -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>`.
index c3367790efceaa936f2eb7b6527026163f3ef870..6dcf31fb1d1f53b9c55c9770b74cd61a545a6c95 100644 (file)
@@ -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> {
index bfb84f3d272ea3a53bfb05ac0ec276153dd36a89..3ef7e7f4466758d5543b0907848df97dbf4746bf 100644 (file)
@@ -77,7 +77,7 @@ impl <R: Read> BlockedReader<R> {
 
         if seq_nr != buffer.seq_nr() {
             proxmox::io_bail!(
-                "detected tape block with wrong seqence number ({} != {})",
+                "detected tape block with wrong sequence number ({} != {})",
                 seq_nr, buffer.seq_nr())
         }
 
index fe0780fc011e2182551c9732670d986a8c40e1ba..a2edbdd60be075795fec73bc1e5b0c3e2d5b0f83 100644 (file)
@@ -25,7 +25,7 @@ use crate::tape::{
 ///
 /// A chunk archive consists of a `MediaContentHeader` followed by a
 /// list of chunks entries. Each chunk entry consists of a
-/// `ChunkArchiveEntryHeader` folowed by the chunk data (`DataBlob`).
+/// `ChunkArchiveEntryHeader` followed by the chunk data (`DataBlob`).
 ///
 /// `| MediaContentHeader | ( ChunkArchiveEntryHeader | DataBlob )* |`
 pub struct ChunkArchiveWriter<'a> {
@@ -153,7 +153,7 @@ impl <R: Read> ChunkArchiveDecoder<R> {
         Self { reader }
     }
 
-    /// Allow access to the underyling reader
+    /// Allow access to the underlying reader
     pub fn reader(&self) -> &R {
         &self.reader
     }
index 5dc81706b2313f85e35dde72a398a650865b75ad..e4d82abec8fa2a31b25ea72d18f9ddb262bad5ed 100644 (file)
@@ -21,7 +21,7 @@ use crate::tape::{
 ///
 /// This ignores file attributes like ACLs and xattrs.
 ///
-/// Returns `Ok(Some(content_uuid))` on succees, and `Ok(None)` if
+/// Returns `Ok(Some(content_uuid))` on success, and `Ok(None)` if
 /// `LEOM` was detected before all data was written. The stream is
 /// marked inclomplete in that case and does not contain all data (The
 /// backup task must rewrite the whole file on the next media).
index 5789fb267d0d35b29402a8bae5a9e7cd124d2900..c8deb58a325c5ae73dea3da0ecf8de705a719831 100644 (file)
@@ -85,7 +85,7 @@ impl SnapshotReader {
         Ok(file)
     }
 
-    /// Retunrs an iterator for all used chunks.
+    /// Returns an iterator for all used chunks.
     pub fn chunk_iterator(&self) -> Result<SnapshotChunkIterator, Error> {
         SnapshotChunkIterator::new(&self)
     }
index 5b731ace0cb20d8d198b3f0054174c92bdc6944e..7ae9d56504d8d6df32e02f9e6225379a904cbc51 100644 (file)
@@ -561,7 +561,7 @@ impl Inventory {
 
     // Helpers to simplify testing
 
-    /// Genreate and insert a new free tape (test helper)
+    /// Generate and insert a new free tape (test helper)
     pub fn generate_free_tape(&mut self, label_text: &str, ctime: i64) -> Uuid {
 
         let label = MediaLabel {
@@ -576,7 +576,7 @@ impl Inventory {
         uuid
     }
 
-    /// Genreate and insert a new tape assigned to a specific pool
+    /// Generate and insert a new tape assigned to a specific pool
     /// (test helper)
     pub fn generate_assigned_tape(
         &mut self,
@@ -600,7 +600,7 @@ impl Inventory {
         uuid
     }
 
-    /// Genreate and insert a used tape (test helper)
+    /// Generate and insert a used tape (test helper)
     pub fn generate_used_tape(
         &mut self,
         label_text: &str,
index 6b8b449b20a4f76bd5f3636088e22cb3e44fd1ff..a249da343b4cf150085c36a42d0c935d62e10f9b 100644 (file)
@@ -3,7 +3,7 @@
 //! A set of backup medias.
 //!
 //! This struct manages backup media state during backup. The main
-//! purpose is to allocate media sets and assing new tapes to it.
+//! purpose is to allocate media sets and assign new tapes to it.
 //!
 //!
 
@@ -137,7 +137,7 @@ impl MediaPool {
         &self.name
     }
 
-    /// Retruns encryption settings
+    /// Returns encryption settings
     pub fn encrypt_fingerprint(&self) -> Option<Fingerprint> {
         self.encrypt_fingerprint.clone()
     }
@@ -286,7 +286,7 @@ impl MediaPool {
         Ok(list)
     }
 
-    // tests if the media data is considered as expired at sepcified time
+    // tests if the media data is considered as expired at specified time
     pub fn media_is_expired(&self, media: &BackupMedia, current_time: i64) -> bool {
         if media.status() != &MediaStatus::Full {
             return false;
index 0cef10b757ef501cba975b4cc38990a0adec92fd..5568e7f605b804e8c8408860a972f69c9250c539 100644 (file)
@@ -48,7 +48,7 @@ impl MediaSet {
         let seq_nr = seq_nr as usize;
         if self.media_list.len() > seq_nr {
             if self.media_list[seq_nr].is_some() {
-                bail!("found duplicate squence number in media set '{}/{}'",
+                bail!("found duplicate sequence number in media set '{}/{}'",
                       self.uuid.to_string(), seq_nr);
             }
         } else {
index 7ea42ee06e5c798ab70456b863d0b15736089df4..15c4b0544e69ceb8344b5faacb18c3fd76d6dc27 100644 (file)
@@ -271,7 +271,7 @@ impl PoolWriter {
         }
     }
 
-    /// Move to EOM (if not aleady there), then creates a new snapshot
+    /// Move to EOM (if not already there), then creates a new snapshot
     /// archive writing specified files (as .pxar) into it. On
     /// success, this return 'Ok(true)' and the media catalog gets
     /// updated.
@@ -330,7 +330,7 @@ impl PoolWriter {
         Ok((done, bytes_written))
     }
 
-    /// Move to EOM (if not aleady there), then creates a new chunk
+    /// Move to EOM (if not already there), then creates a new chunk
     /// archive and writes chunks from 'chunk_iter'. This stops when
     /// it detect LEOM or when we reach max archive size
     /// (4GB). Written chunks are registered in the media catalog.
index 7e354c88a6e3d615685bc3a848c512e3b75d9bab..8a3d4fd6f7c57809a993c480e6ebbe12420247ab 100644 (file)
@@ -67,7 +67,7 @@ pub trait TapeWrite {
 ///
 /// See: https://github.com/torvalds/linux/blob/master/Documentation/scsi/st.rst
 ///
-/// On sucess, this returns if we en countered a EOM condition.
+/// On success, this returns if we en countered a EOM condition.
 pub fn tape_device_write_block<W: Write>(
     writer: &mut W,
     data: &[u8],
index 8fc8f53241d265f237939ad5c5a8abe1995faf79..e293ec4913ea20f7bf1475cee21494e7db9c81f9 100644 (file)
@@ -173,7 +173,7 @@ fn test_alloc_writable_media_4() -> Result<(), Error> {
     // next call fail because there is no free media
     assert!(pool.alloc_writable_media(start_time + 5).is_err());
 
-    // Create new nedia set, so that previous set can expire
+    // Create new media set, so that previous set can expire
     pool.start_write_session(start_time + 10)?;
 
     assert!(pool.alloc_writable_media(start_time + 10).is_err());
index ecd15ba6c18092463580b167424ca6263d09e329..70289d3f4fcd7ba0367f00d305fac15668b31744 100644 (file)
@@ -302,7 +302,7 @@ impl<K, V> LinkedList<K, V> {
         }
     }
 
-    /// Remove the node referenced by `node_ptr` from the linke list and return it.
+    /// Remove the node referenced by `node_ptr` from the linked list and return it.
     fn remove(&mut self, node_ptr: *mut CacheNode<K, V>) -> Box<CacheNode<K, V>> {
         let node = unsafe { Box::from_raw(node_ptr) };
 
index f2480b2fbb6e963b56c57c9eb0728fb1fa2d9421..76f761c4e3e3c54f88e16b60ccbfbe8e8fb8ed2b 100644 (file)
@@ -138,10 +138,10 @@ impl<I: Send + 'static> ParallelHandler<I> {
             if let Err(panic) = handle.join() {
                 match panic.downcast::<&str>() {
                     Ok(panic_msg) => msg_list.push(
-                        format!("thread {} ({}) paniced: {}", self.name, i, panic_msg)
+                        format!("thread {} ({}) panicked: {}", self.name, i, panic_msg)
                     ),
                     Err(_) => msg_list.push(
-                        format!("thread {} ({}) paniced", self.name, i)
+                        format!("thread {} ({}) panicked", self.name, i)
                     ),
                 }
             }
index 94943c28c9b7c5c5c3f91f753ebcdfbd46ded6fc..52352b15dd811ffb8d79c17442100998e8a27db2 100644 (file)
@@ -4,7 +4,7 @@
 //!
 //! See: `/usr/include/scsi/sg_pt.h`
 //!
-//! The SCSI Commands Reference Manual also contains some usefull information.
+//! The SCSI Commands Reference Manual also contains some useful information.
 
 use std::os::unix::io::AsRawFd;
 use std::ptr::NonNull;
index 4d5caf39de823c571da377a87df5e824cb7d0c00..07c6b40f7d09a77608bd46b6ae18c68b49f325a0 100644 (file)
@@ -210,7 +210,7 @@ fn test_parse_register_response() -> Result<(), Error> {
     Ok(())
 }
 
-/// querys the up to date subscription status and parses the response
+/// queries the up to date subscription status and parses the response
 pub fn check_subscription(key: String, server_id: String) -> Result<SubscriptionInfo, Error> {
 
     let now = proxmox::tools::time::epoch_i64();
@@ -299,7 +299,7 @@ pub fn delete_subscription() -> Result<(), Error> {
     Ok(())
 }
 
-/// updates apt authenification for repo access
+/// updates apt authentication for repo access
 pub fn update_apt_auth(key: Option<String>, password: Option<String>) -> Result<(), Error> {
     let auth_conf = std::path::Path::new(APT_AUTH_FN);
     match (key, password) {