mirror of
https://git.proxmox.com/git/proxmox-backup
synced 2025-05-02 19:38:56 +00:00
fix typos in variables and function names
Variables, methods and functions in public API were not changed. Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
This commit is contained in:
parent
19dfc86198
commit
42e5be0f87
@ -52,7 +52,7 @@ struct AddressAssignmentPage {
|
|||||||
storage_element_count: u16,
|
storage_element_count: u16,
|
||||||
first_import_export_element_address: u16,
|
first_import_export_element_address: u16,
|
||||||
import_export_element_count: u16,
|
import_export_element_count: u16,
|
||||||
first_tranfer_element_address: u16,
|
first_transfer_element_address: u16,
|
||||||
transfer_element_count: u16,
|
transfer_element_count: u16,
|
||||||
reserved22: u8,
|
reserved22: u8,
|
||||||
reserved23: u8,
|
reserved23: u8,
|
||||||
|
@ -76,7 +76,7 @@ struct SspSetDataEncryptionPage {
|
|||||||
control_byte_5: u8,
|
control_byte_5: u8,
|
||||||
encryption_mode: u8,
|
encryption_mode: u8,
|
||||||
decryption_mode: u8,
|
decryption_mode: u8,
|
||||||
algorythm_index: u8,
|
algorithm_index: u8,
|
||||||
key_format: u8,
|
key_format: u8,
|
||||||
reserved: [u8; 8],
|
reserved: [u8; 8],
|
||||||
key_len: u16,
|
key_len: u16,
|
||||||
@ -86,7 +86,7 @@ struct SspSetDataEncryptionPage {
|
|||||||
#[allow(clippy::vec_init_then_push)]
|
#[allow(clippy::vec_init_then_push)]
|
||||||
fn sg_spout_set_encryption<F: AsRawFd>(
|
fn sg_spout_set_encryption<F: AsRawFd>(
|
||||||
file: &mut F,
|
file: &mut F,
|
||||||
algorythm_index: u8,
|
algorithm_index: u8,
|
||||||
key: Option<[u8; 32]>,
|
key: Option<[u8; 32]>,
|
||||||
) -> Result<(), Error> {
|
) -> Result<(), Error> {
|
||||||
let mut sg_raw = SgRaw::new(file, 0)?;
|
let mut sg_raw = SgRaw::new(file, 0)?;
|
||||||
@ -106,7 +106,7 @@ fn sg_spout_set_encryption<F: AsRawFd>(
|
|||||||
control_byte_5: (chok << 2),
|
control_byte_5: (chok << 2),
|
||||||
encryption_mode: if key.is_some() { 2 } else { 0 },
|
encryption_mode: if key.is_some() { 2 } else { 0 },
|
||||||
decryption_mode: if key.is_some() { 3 } else { 0 }, // mixed mode
|
decryption_mode: if key.is_some() { 3 } else { 0 }, // mixed mode
|
||||||
algorythm_index,
|
algorithm_index,
|
||||||
key_format: 0,
|
key_format: 0,
|
||||||
reserved: [0u8; 8],
|
reserved: [0u8; 8],
|
||||||
key_len: if let Some(ref key) = key {
|
key_len: if let Some(ref key) = key {
|
||||||
@ -221,7 +221,7 @@ struct SspDataEncryptionCapabilityPage {
|
|||||||
#[derive(Endian)]
|
#[derive(Endian)]
|
||||||
#[repr(C, packed)]
|
#[repr(C, packed)]
|
||||||
struct SspDataEncryptionAlgorithmDescriptor {
|
struct SspDataEncryptionAlgorithmDescriptor {
|
||||||
algorythm_index: u8,
|
algorithm_index: u8,
|
||||||
reserved1: u8,
|
reserved1: u8,
|
||||||
descriptor_len: u16,
|
descriptor_len: u16,
|
||||||
control_byte_4: u8,
|
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
|
continue; // can't decrypt in hardware
|
||||||
}
|
}
|
||||||
if desc.algorithm_code == 0x00010014 && desc.key_size == 32 {
|
if desc.algorithm_code == 0x00010014 && desc.key_size == 32 {
|
||||||
aes_gcm_index = Some(desc.algorythm_index);
|
aes_gcm_index = Some(desc.algorithm_index);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -280,7 +280,7 @@ struct SspDataEncryptionStatusPage {
|
|||||||
scope_byte: u8,
|
scope_byte: u8,
|
||||||
encryption_mode: u8,
|
encryption_mode: u8,
|
||||||
decryption_mode: u8,
|
decryption_mode: u8,
|
||||||
algorythm_index: u8,
|
algorithm_index: u8,
|
||||||
key_instance_counter: u32,
|
key_instance_counter: u32,
|
||||||
control_byte: u8,
|
control_byte: u8,
|
||||||
key_format: u8,
|
key_format: u8,
|
||||||
|
@ -9,7 +9,7 @@ use crate::sgutils2::SgRaw;
|
|||||||
|
|
||||||
#[repr(C, packed)]
|
#[repr(C, packed)]
|
||||||
#[derive(Endian)]
|
#[derive(Endian)]
|
||||||
struct DesnityDescriptorBlock {
|
struct DensityDescriptorBlock {
|
||||||
primary_density_code: u8,
|
primary_density_code: u8,
|
||||||
secondary_density_code: u8,
|
secondary_density_code: u8,
|
||||||
flags2: u8,
|
flags2: u8,
|
||||||
@ -58,7 +58,7 @@ pub fn report_density<F: AsRawFd>(file: &mut F) -> Result<u8, Error> {
|
|||||||
if reader.is_empty() {
|
if reader.is_empty() {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
let block: DesnityDescriptorBlock = unsafe { reader.read_be_value()? };
|
let block: DensityDescriptorBlock = unsafe { reader.read_be_value()? };
|
||||||
if block.primary_density_code > max_density {
|
if block.primary_density_code > max_density {
|
||||||
max_density = block.primary_density_code;
|
max_density = block.primary_density_code;
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,7 @@ fn create_restore_log_dir() -> Result<String, Error> {
|
|||||||
Ok(logpath)
|
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 kernel = PathBuf::from(pbs_buildcfg::PROXMOX_BACKUP_KERNEL_FN);
|
||||||
let initramfs = PathBuf::from(if debug {
|
let initramfs = PathBuf::from(if debug {
|
||||||
pbs_buildcfg::PROXMOX_BACKUP_INITRAMFS_DBG_FN
|
pbs_buildcfg::PROXMOX_BACKUP_INITRAMFS_DBG_FN
|
||||||
@ -213,7 +213,7 @@ pub async fn start_vm(
|
|||||||
|
|
||||||
let debug = debug_mode();
|
let debug = debug_mode();
|
||||||
|
|
||||||
validate_img_existance(debug)?;
|
validate_img_existence(debug)?;
|
||||||
|
|
||||||
let pid;
|
let pid;
|
||||||
let (mut pid_file, pid_path) =
|
let (mut pid_file, pid_path) =
|
||||||
|
@ -787,7 +787,7 @@ impl FileEntryPrinter {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn write_column_seperator(&mut self) -> Result<(), Error> {
|
fn write_column_separator(&mut self) -> Result<(), Error> {
|
||||||
write!(self.stream, " ")?;
|
write!(self.stream, " ")?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
@ -800,25 +800,25 @@ impl FileEntryPrinter {
|
|||||||
operation: FileOperation,
|
operation: FileOperation,
|
||||||
) -> Result<(), Error> {
|
) -> Result<(), Error> {
|
||||||
self.write_operation(operation)?;
|
self.write_operation(operation)?;
|
||||||
self.write_column_seperator()?;
|
self.write_column_separator()?;
|
||||||
|
|
||||||
self.write_entry_type(entry, changed.entry_type)?;
|
self.write_entry_type(entry, changed.entry_type)?;
|
||||||
self.write_column_seperator()?;
|
self.write_column_separator()?;
|
||||||
|
|
||||||
self.write_uid(entry, changed.uid)?;
|
self.write_uid(entry, changed.uid)?;
|
||||||
self.write_column_seperator()?;
|
self.write_column_separator()?;
|
||||||
|
|
||||||
self.write_gid(entry, changed.gid)?;
|
self.write_gid(entry, changed.gid)?;
|
||||||
self.write_column_seperator()?;
|
self.write_column_separator()?;
|
||||||
|
|
||||||
self.write_mode(entry, changed.mode)?;
|
self.write_mode(entry, changed.mode)?;
|
||||||
self.write_column_seperator()?;
|
self.write_column_separator()?;
|
||||||
|
|
||||||
self.write_filesize(entry, changed.size)?;
|
self.write_filesize(entry, changed.size)?;
|
||||||
self.write_column_seperator()?;
|
self.write_column_separator()?;
|
||||||
|
|
||||||
self.write_mtime(entry, changed.mtime)?;
|
self.write_mtime(entry, changed.mtime)?;
|
||||||
self.write_column_seperator()?;
|
self.write_column_separator()?;
|
||||||
|
|
||||||
self.write_file_name(entry, changed.content)?;
|
self.write_file_name(entry, changed.content)?;
|
||||||
writeln!(self.stream)?;
|
writeln!(self.stream)?;
|
||||||
|
@ -92,7 +92,7 @@ fn network_match_len(networks: &[IpInet], ip: &IpAddr) -> Option<u8> {
|
|||||||
match_len
|
match_len
|
||||||
}
|
}
|
||||||
|
|
||||||
fn cannonical_ip(ip: IpAddr) -> IpAddr {
|
fn canonical_ip(ip: IpAddr) -> IpAddr {
|
||||||
// TODO: use std::net::IpAddr::to_cananical once stable
|
// TODO: use std::net::IpAddr::to_cananical once stable
|
||||||
match ip {
|
match ip {
|
||||||
IpAddr::V4(addr) => IpAddr::V4(addr),
|
IpAddr::V4(addr) => IpAddr::V4(addr),
|
||||||
@ -332,7 +332,7 @@ impl TrafficControlCache {
|
|||||||
peer: SocketAddr,
|
peer: SocketAddr,
|
||||||
now: i64,
|
now: i64,
|
||||||
) -> (&str, Option<SharedRateLimit>, Option<SharedRateLimit>) {
|
) -> (&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);
|
log::debug!("lookup_rate_limiter: {:?}", peer_ip);
|
||||||
|
|
||||||
|
@ -272,8 +272,8 @@ Ext.define('PBS.view.main.NavigationTree', {
|
|||||||
if (maintenance) {
|
if (maintenance) {
|
||||||
const [type, message] = PBS.Utils.parseMaintenanceMode(maintenance);
|
const [type, message] = PBS.Utils.parseMaintenanceMode(maintenance);
|
||||||
qtip = `${type}${message ? ': ' + message : ''}`;
|
qtip = `${type}${message ? ': ' + message : ''}`;
|
||||||
let mainenanceTypeCls = type === 'delete' ? 'destroying' : 'maintenance';
|
let maintenanceTypeCls = type === 'delete' ? 'destroying' : 'maintenance';
|
||||||
iconCls = `fa fa-database pmx-tree-icon-custom ${mainenanceTypeCls}`;
|
iconCls = `fa fa-database pmx-tree-icon-custom ${maintenanceTypeCls}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getChildTextAt(j).localeCompare(name) !== 0) {
|
if (getChildTextAt(j).localeCompare(name) !== 0) {
|
||||||
|
@ -53,8 +53,8 @@ Ext.define('PBS.config.PruneAndGC', {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
cbindData: function(initalConfig) {
|
cbindData: function(initialConfig) {
|
||||||
let me = this;
|
let me = this;
|
||||||
me.datastore = initalConfig.datastore ? initalConfig.datastore : undefined;
|
me.datastore = initialConfig.datastore ? initialConfig.datastore : undefined;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -9,7 +9,7 @@ Ext.define('PBS.DataStoreNotes', {
|
|||||||
scrollable: true,
|
scrollable: true,
|
||||||
animCollapse: false,
|
animCollapse: false,
|
||||||
|
|
||||||
cbindData: function(initalConfig) {
|
cbindData: function(initialConfig) {
|
||||||
let me = this;
|
let me = this;
|
||||||
me.url = `/api2/extjs/config/datastore/${me.datastore}`;
|
me.url = `/api2/extjs/config/datastore/${me.datastore}`;
|
||||||
return { };
|
return { };
|
||||||
|
@ -3,7 +3,7 @@ Ext.define('PBS.DataStorePanel', {
|
|||||||
alias: 'widget.pbsDataStorePanel',
|
alias: 'widget.pbsDataStorePanel',
|
||||||
mixins: ['Proxmox.Mixin.CBind'],
|
mixins: ['Proxmox.Mixin.CBind'],
|
||||||
|
|
||||||
cbindData: function(initalConfig) {
|
cbindData: function(initialConfig) {
|
||||||
let me = this;
|
let me = this;
|
||||||
return {
|
return {
|
||||||
aclPath: `/datastore/${me.datastore}`,
|
aclPath: `/datastore/${me.datastore}`,
|
||||||
|
@ -168,7 +168,7 @@ Ext.define('PBS.panel.NotificationRulesEditPanel', {
|
|||||||
onGetValues: function(values) {
|
onGetValues: function(values) {
|
||||||
let me = this;
|
let me = this;
|
||||||
|
|
||||||
let deleteArrayIfEmtpy = (field) => {
|
let deleteArrayIfEmpty = (field) => {
|
||||||
if (Ext.isArray(values[field])) {
|
if (Ext.isArray(values[field])) {
|
||||||
if (values[field].length === 0) {
|
if (values[field].length === 0) {
|
||||||
delete values[field];
|
delete values[field];
|
||||||
@ -178,9 +178,9 @@ Ext.define('PBS.panel.NotificationRulesEditPanel', {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
deleteArrayIfEmtpy('match-field');
|
deleteArrayIfEmpty('match-field');
|
||||||
deleteArrayIfEmtpy('match-severity');
|
deleteArrayIfEmpty('match-severity');
|
||||||
deleteArrayIfEmtpy('match-calendar');
|
deleteArrayIfEmpty('match-calendar');
|
||||||
|
|
||||||
return values;
|
return values;
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user