From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 05DF31FF15C for ; Wed, 7 Aug 2024 12:32:23 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 60B64481F; Wed, 7 Aug 2024 12:32:29 +0200 (CEST) From: Maximiliano Sandoval To: pbs-devel@lists.proxmox.com Date: Wed, 7 Aug 2024 12:32:22 +0200 Message-Id: <20240807103222.219740-5-m.sandoval@proxmox.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240807103222.219740-1-m.sandoval@proxmox.com> References: <20240807103222.219740-1-m.sandoval@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.117 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 SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pbs-devel] [PATCH backup 5/5] fix typos in variables and function names X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Backup Server development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pbs-devel-bounces@lists.proxmox.com Sender: "pbs-devel" Variables, methods and functions in public API were not changed. Signed-off-by: Maximiliano Sandoval --- pbs-tape/src/sg_pt_changer.rs | 2 +- pbs-tape/src/sg_tape/encryption.rs | 12 ++++++------ pbs-tape/src/sg_tape/report_density.rs | 4 ++-- proxmox-file-restore/src/qemu_helper.rs | 4 ++-- src/bin/proxmox_backup_debug/diff.rs | 16 ++++++++-------- src/traffic_control_cache.rs | 4 ++-- www/NavigationTree.js | 4 ++-- www/config/PruneAndGC.js | 4 ++-- www/datastore/Notes.js | 2 +- www/datastore/Panel.js | 2 +- www/window/NotificationMatcherOverride.js | 8 ++++---- 11 files changed, 31 insertions(+), 31 deletions(-) diff --git a/pbs-tape/src/sg_pt_changer.rs b/pbs-tape/src/sg_pt_changer.rs index 4825e36f..b600a49d 100644 --- a/pbs-tape/src/sg_pt_changer.rs +++ b/pbs-tape/src/sg_pt_changer.rs @@ -52,7 +52,7 @@ struct AddressAssignmentPage { storage_element_count: u16, first_import_export_element_address: u16, import_export_element_count: u16, - first_tranfer_element_address: u16, + first_transfer_element_address: u16, transfer_element_count: u16, reserved22: u8, reserved23: u8, diff --git a/pbs-tape/src/sg_tape/encryption.rs b/pbs-tape/src/sg_tape/encryption.rs index 19444d28..7247d257 100644 --- a/pbs-tape/src/sg_tape/encryption.rs +++ b/pbs-tape/src/sg_tape/encryption.rs @@ -76,7 +76,7 @@ struct SspSetDataEncryptionPage { control_byte_5: u8, encryption_mode: u8, decryption_mode: u8, - algorythm_index: u8, + algorithm_index: u8, key_format: u8, reserved: [u8; 8], key_len: u16, @@ -86,7 +86,7 @@ struct SspSetDataEncryptionPage { #[allow(clippy::vec_init_then_push)] fn sg_spout_set_encryption( file: &mut F, - algorythm_index: u8, + algorithm_index: u8, key: Option<[u8; 32]>, ) -> Result<(), Error> { let mut sg_raw = SgRaw::new(file, 0)?; @@ -106,7 +106,7 @@ fn sg_spout_set_encryption( control_byte_5: (chok << 2), encryption_mode: if key.is_some() { 2 } else { 0 }, decryption_mode: if key.is_some() { 3 } else { 0 }, // mixed mode - algorythm_index, + algorithm_index, key_format: 0, reserved: [0u8; 8], key_len: if let Some(ref key) = key { @@ -221,7 +221,7 @@ struct SspDataEncryptionCapabilityPage { #[derive(Endian)] #[repr(C, packed)] struct SspDataEncryptionAlgorithmDescriptor { - algorythm_index: u8, + algorithm_index: u8, reserved1: u8, descriptor_len: u16, control_byte_4: u8, @@ -259,7 +259,7 @@ fn decode_spin_data_encryption_caps(data: &[u8]) -> Result { continue; // can't decrypt in hardware } if desc.algorithm_code == 0x00010014 && desc.key_size == 32 { - aes_gcm_index = Some(desc.algorythm_index); + aes_gcm_index = Some(desc.algorithm_index); break; } } @@ -280,7 +280,7 @@ struct SspDataEncryptionStatusPage { scope_byte: u8, encryption_mode: u8, decryption_mode: u8, - algorythm_index: u8, + algorithm_index: u8, key_instance_counter: u32, control_byte: u8, key_format: u8, diff --git a/pbs-tape/src/sg_tape/report_density.rs b/pbs-tape/src/sg_tape/report_density.rs index 57b75323..74596b7b 100644 --- a/pbs-tape/src/sg_tape/report_density.rs +++ b/pbs-tape/src/sg_tape/report_density.rs @@ -9,7 +9,7 @@ use crate::sgutils2::SgRaw; #[repr(C, packed)] #[derive(Endian)] -struct DesnityDescriptorBlock { +struct DensityDescriptorBlock { primary_density_code: u8, secondary_density_code: u8, flags2: u8, @@ -58,7 +58,7 @@ pub fn report_density(file: &mut F) -> Result { if reader.is_empty() { break; } - let block: DesnityDescriptorBlock = unsafe { reader.read_be_value()? }; + let block: DensityDescriptorBlock = unsafe { reader.read_be_value()? }; if block.primary_density_code > max_density { max_density = block.primary_density_code; } diff --git a/proxmox-file-restore/src/qemu_helper.rs b/proxmox-file-restore/src/qemu_helper.rs index 6112822a..471010aa 100644 --- a/proxmox-file-restore/src/qemu_helper.rs +++ b/proxmox-file-restore/src/qemu_helper.rs @@ -51,7 +51,7 @@ fn create_restore_log_dir() -> Result { Ok(logpath) } -fn validate_img_existance(debug: bool) -> Result<(), Error> { +fn validate_img_existence(debug: bool) -> Result<(), Error> { let kernel = PathBuf::from(pbs_buildcfg::PROXMOX_BACKUP_KERNEL_FN); let initramfs = PathBuf::from(if debug { pbs_buildcfg::PROXMOX_BACKUP_INITRAMFS_DBG_FN @@ -213,7 +213,7 @@ pub async fn start_vm( let debug = debug_mode(); - validate_img_existance(debug)?; + validate_img_existence(debug)?; let pid; let (mut pid_file, pid_path) = diff --git a/src/bin/proxmox_backup_debug/diff.rs b/src/bin/proxmox_backup_debug/diff.rs index e6767c17..b0436d04 100644 --- a/src/bin/proxmox_backup_debug/diff.rs +++ b/src/bin/proxmox_backup_debug/diff.rs @@ -787,7 +787,7 @@ impl FileEntryPrinter { Ok(()) } - fn write_column_seperator(&mut self) -> Result<(), Error> { + fn write_column_separator(&mut self) -> Result<(), Error> { write!(self.stream, " ")?; Ok(()) } @@ -800,25 +800,25 @@ impl FileEntryPrinter { operation: FileOperation, ) -> Result<(), Error> { self.write_operation(operation)?; - self.write_column_seperator()?; + self.write_column_separator()?; self.write_entry_type(entry, changed.entry_type)?; - self.write_column_seperator()?; + self.write_column_separator()?; self.write_uid(entry, changed.uid)?; - self.write_column_seperator()?; + self.write_column_separator()?; self.write_gid(entry, changed.gid)?; - self.write_column_seperator()?; + self.write_column_separator()?; self.write_mode(entry, changed.mode)?; - self.write_column_seperator()?; + self.write_column_separator()?; self.write_filesize(entry, changed.size)?; - self.write_column_seperator()?; + self.write_column_separator()?; self.write_mtime(entry, changed.mtime)?; - self.write_column_seperator()?; + self.write_column_separator()?; self.write_file_name(entry, changed.content)?; writeln!(self.stream)?; diff --git a/src/traffic_control_cache.rs b/src/traffic_control_cache.rs index 4c3bccee..32da6f4c 100644 --- a/src/traffic_control_cache.rs +++ b/src/traffic_control_cache.rs @@ -92,7 +92,7 @@ fn network_match_len(networks: &[IpInet], ip: &IpAddr) -> Option { match_len } -fn cannonical_ip(ip: IpAddr) -> IpAddr { +fn canonical_ip(ip: IpAddr) -> IpAddr { // TODO: use std::net::IpAddr::to_cananical once stable match ip { IpAddr::V4(addr) => IpAddr::V4(addr), @@ -332,7 +332,7 @@ impl TrafficControlCache { peer: SocketAddr, now: i64, ) -> (&str, Option, Option) { - let peer_ip = cannonical_ip(peer.ip()); + let peer_ip = canonical_ip(peer.ip()); log::debug!("lookup_rate_limiter: {:?}", peer_ip); diff --git a/www/NavigationTree.js b/www/NavigationTree.js index a5ea390f..53c8daff 100644 --- a/www/NavigationTree.js +++ b/www/NavigationTree.js @@ -272,8 +272,8 @@ Ext.define('PBS.view.main.NavigationTree', { if (maintenance) { const [type, message] = PBS.Utils.parseMaintenanceMode(maintenance); qtip = `${type}${message ? ': ' + message : ''}`; - let mainenanceTypeCls = type === 'delete' ? 'destroying' : 'maintenance'; - iconCls = `fa fa-database pmx-tree-icon-custom ${mainenanceTypeCls}`; + let maintenanceTypeCls = type === 'delete' ? 'destroying' : 'maintenance'; + iconCls = `fa fa-database pmx-tree-icon-custom ${maintenanceTypeCls}`; } if (getChildTextAt(j).localeCompare(name) !== 0) { diff --git a/www/config/PruneAndGC.js b/www/config/PruneAndGC.js index b85c2961..ab92c8fe 100644 --- a/www/config/PruneAndGC.js +++ b/www/config/PruneAndGC.js @@ -53,8 +53,8 @@ Ext.define('PBS.config.PruneAndGC', { } }, - cbindData: function(initalConfig) { + cbindData: function(initialConfig) { let me = this; - me.datastore = initalConfig.datastore ? initalConfig.datastore : undefined; + me.datastore = initialConfig.datastore ? initialConfig.datastore : undefined; }, }); diff --git a/www/datastore/Notes.js b/www/datastore/Notes.js index 2928b7ec..b9914728 100644 --- a/www/datastore/Notes.js +++ b/www/datastore/Notes.js @@ -9,7 +9,7 @@ Ext.define('PBS.DataStoreNotes', { scrollable: true, animCollapse: false, - cbindData: function(initalConfig) { + cbindData: function(initialConfig) { let me = this; me.url = `/api2/extjs/config/datastore/${me.datastore}`; return { }; diff --git a/www/datastore/Panel.js b/www/datastore/Panel.js index 0ee38a1b..ad9fc10f 100644 --- a/www/datastore/Panel.js +++ b/www/datastore/Panel.js @@ -3,7 +3,7 @@ Ext.define('PBS.DataStorePanel', { alias: 'widget.pbsDataStorePanel', mixins: ['Proxmox.Mixin.CBind'], - cbindData: function(initalConfig) { + cbindData: function(initialConfig) { let me = this; return { aclPath: `/datastore/${me.datastore}`, diff --git a/www/window/NotificationMatcherOverride.js b/www/window/NotificationMatcherOverride.js index 8636653c..bc7b7c1d 100644 --- a/www/window/NotificationMatcherOverride.js +++ b/www/window/NotificationMatcherOverride.js @@ -168,7 +168,7 @@ Ext.define('PBS.panel.NotificationRulesEditPanel', { onGetValues: function(values) { let me = this; - let deleteArrayIfEmtpy = (field) => { + let deleteArrayIfEmpty = (field) => { if (Ext.isArray(values[field])) { if (values[field].length === 0) { delete values[field]; @@ -178,9 +178,9 @@ Ext.define('PBS.panel.NotificationRulesEditPanel', { } } }; - deleteArrayIfEmtpy('match-field'); - deleteArrayIfEmtpy('match-severity'); - deleteArrayIfEmtpy('match-calendar'); + deleteArrayIfEmpty('match-field'); + deleteArrayIfEmpty('match-severity'); + deleteArrayIfEmpty('match-calendar'); return values; }, -- 2.39.2 _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel