From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <f.ebner@proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by lists.proxmox.com (Postfix) with ESMTPS id 3653BC1DFD
 for <pve-devel@lists.proxmox.com>; Fri, 19 Jan 2024 10:57:08 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id 1F7331F729
 for <pve-devel@lists.proxmox.com>; Fri, 19 Jan 2024 10:57:08 +0100 (CET)
Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com
 [94.136.29.106])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by firstgate.proxmox.com (Proxmox) with ESMTPS
 for <pve-devel@lists.proxmox.com>; Fri, 19 Jan 2024 10:57:07 +0100 (CET)
Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1])
 by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 3296E49204
 for <pve-devel@lists.proxmox.com>; Fri, 19 Jan 2024 10:57:07 +0100 (CET)
From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Date: Fri, 19 Jan 2024 10:57:03 +0100
Message-Id: <20240119095703.11730-1-f.ebner@proxmox.com>
X-Mailer: git-send-email 2.39.2
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-SPAM-LEVEL: Spam detection results:  0
 AWL -0.225 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DMARC_MISSING             0.1 Missing DMARC policy
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 POISEN_SPAM_PILL          0.1 Meta: its spam
 POISEN_SPAM_PILL_2        0.1 random spam to be learned in bayes
 POISEN_SPAM_PILL_4        0.1 random spam to be learned in bayes
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
 T_SCC_BODY_TEXT_LINE    -0.01 -
Subject: [pve-devel] [PATCH proxmox-backup-qemu] tree-wide: fix typos in
 comments
X-BeenThere: pve-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
List-Post: <mailto:pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
X-List-Received-Date: Fri, 19 Jan 2024 09:57:08 -0000

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 header-preamble.c |  4 ++--
 src/backup.rs     |  2 +-
 src/commands.rs   |  6 +++---
 src/lib.rs        | 24 ++++++++++++------------
 4 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/header-preamble.c b/header-preamble.c
index b44ab32..e6a6068 100644
--- a/header-preamble.c
+++ b/header-preamble.c
@@ -19,6 +19,6 @@
  * result: *mut c_int,
  * error: *mut *mut c_char,
  *
- * The callback function is called when the the async function is
- * ready. Possible errors are returned in 'error'.
+ * The callback function is called when the async function is ready.
+ * Possible errors are returned in 'error'.
  */
diff --git a/src/backup.rs b/src/backup.rs
index bbe4f00..d662520 100644
--- a/src/backup.rs
+++ b/src/backup.rs
@@ -34,7 +34,7 @@ pub(crate) struct BackupTask {
     registry: Arc<Mutex<Registry<ImageUploadInfo>>>,
     known_chunks: Arc<Mutex<HashSet<[u8; 32]>>>,
     abort: tokio::sync::broadcast::Sender<()>,
-    aborted: OnceCell<String>, // set on abort, conatins abort reason
+    aborted: OnceCell<String>, // set on abort, contains abort reason
 }
 
 impl BackupTask {
diff --git a/src/commands.rs b/src/commands.rs
index 37d653c..ba1832f 100644
--- a/src/commands.rs
+++ b/src/commands.rs
@@ -58,7 +58,7 @@ pub(crate) fn deserialize_state(data: &[u8]) -> Result<(), Error> {
     Ok(())
 }
 
-// Note: We alway register/upload a chunk containing zeros
+// Note: We always register/upload a chunk containing zeros
 async fn register_zero_chunk(
     client: Arc<BackupWriter>,
     crypt_config: Option<Arc<CryptConfig>>,
@@ -439,7 +439,7 @@ pub(crate) async fn write_data(
 
     match upload_queue {
         Some(ref mut upload_queue) => {
-            // Phase 2: send reponse future to other task
+            // Phase 2: send response future to other task
             if upload_queue.send(upload_future).await.is_err() {
                 let upload_result = {
                     let mut guard = registry.lock().unwrap();
@@ -463,7 +463,7 @@ pub(crate) async fn write_data(
         }
     }
 
-    //println!("upload chunk sucessful");
+    //println!("upload chunk successful");
 
     Ok(if reused { 0 } else { size as c_int })
 }
diff --git a/src/lib.rs b/src/lib.rs
index 02e74f7..3b0c1fa 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -98,7 +98,7 @@ macro_rules! param_not_null {
 
 /// Returns the text presentation (relative path) for a backup snapshot
 ///
-/// The resturned value is allocated with strdup(), and can be freed
+/// The returned value is allocated with strdup(), and can be freed
 /// with free().
 #[no_mangle]
 #[allow(clippy::not_unsafe_ptr_arg_deref)]
@@ -142,7 +142,7 @@ pub(crate) struct BackupSetup {
     pub fingerprint: Option<String>,
 }
 
-// helper class to implement synchrounous interface
+// helper class to implement synchronous interface
 struct GotResultCondition {
     lock: Mutex<bool>,
     cond: Condvar,
@@ -327,7 +327,7 @@ fn backup_handle_to_task(handle: *mut ProxmoxBackupHandle) -> Arc<BackupTask> {
 /// Open connection to the backup server (sync)
 ///
 /// Returns:
-///  0 ... Sucecss (no prevbious backup)
+///  0 ... Success (no previous backup)
 ///  1 ... Success (found previous backup)
 /// -1 ... Error
 #[no_mangle]
@@ -358,7 +358,7 @@ pub extern "C" fn proxmox_backup_connect(
 /// Open connection to the backup server
 ///
 /// Returns:
-///  0 ... Sucecss (no prevbious backup)
+///  0 ... Success (no previous backup)
 ///  1 ... Success (found previous backup)
 /// -1 ... Error
 #[no_mangle]
@@ -565,7 +565,7 @@ pub extern "C" fn proxmox_backup_add_config_async(
 ///
 /// Returns:
 /// -1: on error
-///  0: successful, chunk already exists on server, so it was resued
+///  0: successful, chunk already exists on server, so it was reused
 ///  size: successful, chunk uploaded
 #[no_mangle]
 #[allow(clippy::not_unsafe_ptr_arg_deref)]
@@ -608,11 +608,11 @@ pub extern "C" fn proxmox_backup_write_data(
 /// (only allowed if size == chunk_size)
 ///
 /// Note: The data pointer needs to be valid until the async
-/// opteration is finished.
+/// operation is finished.
 ///
 /// Returns:
 /// -1: on error
-///  0: successful, chunk already exists on server, so it was resued
+///  0: successful, chunk already exists on server, so it was reused
 ///  size: successful, chunk uploaded
 #[no_mangle]
 #[allow(clippy::not_unsafe_ptr_arg_deref)]
@@ -772,7 +772,7 @@ fn restore_handle_to_task(handle: *mut ProxmoxRestoreHandle) -> Arc<RestoreTask>
     Arc::clone(restore_task)
 }
 
-/// DEPRECATED: Connect the the backup server for restore (sync)
+/// DEPRECATED: Connect to the backup server for restore (sync)
 ///
 /// Deprecated in favor of `proxmox_restore_new_ns` which includes a namespace parameter.
 /// Also, it used "lossy" utf8 decoding on the snapshot name which is not the case in the new
@@ -830,7 +830,7 @@ pub extern "C" fn proxmox_restore_new(
     }
 }
 
-/// Connect the the backup server for restore (sync)
+/// Connect to the backup server for restore (sync)
 #[no_mangle]
 #[allow(clippy::not_unsafe_ptr_arg_deref)]
 pub extern "C" fn proxmox_restore_new_ns(
@@ -893,7 +893,7 @@ pub extern "C" fn proxmox_restore_new_ns(
 /// Open connection to the backup server (sync)
 ///
 /// Returns:
-///  0 ... Sucecss (no prevbious backup)
+///  0 ... Success (no previous backup)
 /// -1 ... Error
 #[no_mangle]
 #[allow(clippy::not_unsafe_ptr_arg_deref)]
@@ -922,7 +922,7 @@ pub extern "C" fn proxmox_restore_connect(
 /// Open connection to the backup server (async)
 ///
 /// Returns:
-///  0 ... Sucecss (no prevbious backup)
+///  0 ... Success (no previous backup)
 /// -1 ... Error
 #[no_mangle]
 #[allow(clippy::not_unsafe_ptr_arg_deref)]
@@ -1125,7 +1125,7 @@ pub extern "C" fn proxmox_restore_read_image_at(
 /// of file).
 ///
 /// Note: The data pointer needs to be valid until the async
-/// opteration is finished.
+/// operation is finished.
 ///
 /// Note: The call will only ever transfer less than 'size' bytes if
 /// the end of the file has been reached.
-- 
2.39.2