[pbs-devel] [PATCH backup v2 5/5] fix typos in variables and function names
Maximiliano Sandoval
m.sandoval at proxmox.com
Wed Aug 7 14:10:45 CEST 2024
Variables, methods and functions in public API were not changed.
Signed-off-by: Maximiliano Sandoval <m.sandoval at proxmox.com>
---
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<F: AsRawFd>(
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<F: AsRawFd>(
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<u8, Error> {
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<F: AsRawFd>(file: &mut F) -> Result<u8, Error> {
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<String, Error> {
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<u8> {
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<SharedRateLimit>, Option<SharedRateLimit>) {
- 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
More information about the pbs-devel
mailing list