tree-wide: fix typos in comments

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
This commit is contained in:
Fiona Ebner 2024-01-19 10:57:03 +01:00 committed by Fabian Grünbichler
parent e8400780b5
commit 2860f6ee65
4 changed files with 18 additions and 18 deletions

View File

@ -19,6 +19,6 @@
* result: *mut c_int, * result: *mut c_int,
* error: *mut *mut c_char, * error: *mut *mut c_char,
* *
* The callback function is called when the the async function is * The callback function is called when the async function is ready.
* ready. Possible errors are returned in 'error'. * Possible errors are returned in 'error'.
*/ */

View File

@ -34,7 +34,7 @@ pub(crate) struct BackupTask {
registry: Arc<Mutex<Registry<ImageUploadInfo>>>, registry: Arc<Mutex<Registry<ImageUploadInfo>>>,
known_chunks: Arc<Mutex<HashSet<[u8; 32]>>>, known_chunks: Arc<Mutex<HashSet<[u8; 32]>>>,
abort: tokio::sync::broadcast::Sender<()>, 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 { impl BackupTask {

View File

@ -58,7 +58,7 @@ pub(crate) fn deserialize_state(data: &[u8]) -> Result<(), Error> {
Ok(()) Ok(())
} }
// Note: We alway register/upload a chunk containing zeros // Note: We always register/upload a chunk containing zeros
async fn register_zero_chunk( async fn register_zero_chunk(
client: Arc<BackupWriter>, client: Arc<BackupWriter>,
crypt_config: Option<Arc<CryptConfig>>, crypt_config: Option<Arc<CryptConfig>>,
@ -439,7 +439,7 @@ pub(crate) async fn write_data(
match upload_queue { match upload_queue {
Some(ref mut 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() { if upload_queue.send(upload_future).await.is_err() {
let upload_result = { let upload_result = {
let mut guard = registry.lock().unwrap(); 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 }) Ok(if reused { 0 } else { size as c_int })
} }

View File

@ -98,7 +98,7 @@ macro_rules! param_not_null {
/// Returns the text presentation (relative path) for a backup snapshot /// 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(). /// with free().
#[no_mangle] #[no_mangle]
#[allow(clippy::not_unsafe_ptr_arg_deref)] #[allow(clippy::not_unsafe_ptr_arg_deref)]
@ -142,7 +142,7 @@ pub(crate) struct BackupSetup {
pub fingerprint: Option<String>, pub fingerprint: Option<String>,
} }
// helper class to implement synchrounous interface // helper class to implement synchronous interface
struct GotResultCondition { struct GotResultCondition {
lock: Mutex<bool>, lock: Mutex<bool>,
cond: Condvar, cond: Condvar,
@ -327,7 +327,7 @@ fn backup_handle_to_task(handle: *mut ProxmoxBackupHandle) -> Arc<BackupTask> {
/// Open connection to the backup server (sync) /// Open connection to the backup server (sync)
/// ///
/// Returns: /// Returns:
/// 0 ... Sucecss (no prevbious backup) /// 0 ... Success (no previous backup)
/// 1 ... Success (found previous backup) /// 1 ... Success (found previous backup)
/// -1 ... Error /// -1 ... Error
#[no_mangle] #[no_mangle]
@ -358,7 +358,7 @@ pub extern "C" fn proxmox_backup_connect(
/// Open connection to the backup server /// Open connection to the backup server
/// ///
/// Returns: /// Returns:
/// 0 ... Sucecss (no prevbious backup) /// 0 ... Success (no previous backup)
/// 1 ... Success (found previous backup) /// 1 ... Success (found previous backup)
/// -1 ... Error /// -1 ... Error
#[no_mangle] #[no_mangle]
@ -565,7 +565,7 @@ pub extern "C" fn proxmox_backup_add_config_async(
/// ///
/// Returns: /// Returns:
/// -1: on error /// -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 /// size: successful, chunk uploaded
#[no_mangle] #[no_mangle]
#[allow(clippy::not_unsafe_ptr_arg_deref)] #[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) /// (only allowed if size == chunk_size)
/// ///
/// Note: The data pointer needs to be valid until the async /// Note: The data pointer needs to be valid until the async
/// opteration is finished. /// operation is finished.
/// ///
/// Returns: /// Returns:
/// -1: on error /// -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 /// size: successful, chunk uploaded
#[no_mangle] #[no_mangle]
#[allow(clippy::not_unsafe_ptr_arg_deref)] #[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) 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. /// 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 /// 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] #[no_mangle]
#[allow(clippy::not_unsafe_ptr_arg_deref)] #[allow(clippy::not_unsafe_ptr_arg_deref)]
pub extern "C" fn proxmox_restore_new_ns( 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) /// Open connection to the backup server (sync)
/// ///
/// Returns: /// Returns:
/// 0 ... Sucecss (no prevbious backup) /// 0 ... Success (no previous backup)
/// -1 ... Error /// -1 ... Error
#[no_mangle] #[no_mangle]
#[allow(clippy::not_unsafe_ptr_arg_deref)] #[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) /// Open connection to the backup server (async)
/// ///
/// Returns: /// Returns:
/// 0 ... Sucecss (no prevbious backup) /// 0 ... Success (no previous backup)
/// -1 ... Error /// -1 ... Error
#[no_mangle] #[no_mangle]
#[allow(clippy::not_unsafe_ptr_arg_deref)] #[allow(clippy::not_unsafe_ptr_arg_deref)]
@ -1125,7 +1125,7 @@ pub extern "C" fn proxmox_restore_read_image_at(
/// of file). /// of file).
/// ///
/// Note: The data pointer needs to be valid until the async /// 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 /// Note: The call will only ever transfer less than 'size' bytes if
/// the end of the file has been reached. /// the end of the file has been reached.