Move all localizable strings from Aaru.Devices project to resources.

This commit is contained in:
2022-11-27 18:51:44 +00:00
parent 4c9176ee42
commit 119ceea01d
41 changed files with 1845 additions and 301 deletions

View File

@@ -51,6 +51,11 @@
<Compile Include="Linux\Structs.cs"/>
<Compile Include="Linux\Enums.cs"/>
<Compile Include="Enums.cs"/>
<Compile Include="Localization\Localization.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Localization.resx</DependentUpon>
</Compile>
<Compile Include="Remote\Command.cs"/>
<Compile Include="Remote\Consts.cs"/>
<Compile Include="Remote\Device.cs"/>
@@ -113,5 +118,9 @@
<EmbeddedResource Include="..\LICENSE.LGPL">
<Link>LICENSE.LGPL</Link>
</EmbeddedResource>
<EmbeddedResource Update="Localization\Localization.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Localization.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
</Project>

View File

@@ -1,11 +1,6 @@
<wpf:ResourceDictionary xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib"
xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xml:space="preserve">
<s:Boolean
x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=device/@EntryIndexedValue">True</s:Boolean>
<s:Boolean
x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=device_005Catacommands/@EntryIndexedValue">True</s:Boolean>
<s:Boolean
x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=device_005Cmmccommands/@EntryIndexedValue">True</s:Boolean>
<s:Boolean
x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=device_005Cscsicommands/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
<wpf:ResourceDictionary xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xml:space="preserve">
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=device/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=device_005Catacommands/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=device_005Cmmccommands/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=device_005Cscsicommands/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=localization/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

View File

@@ -59,7 +59,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("ATA Device", "READ BUFFER took {0} ms.", duration);
AaruConsole.DebugWriteLine("ATA Device", Localization.READ_BUFFER_took_0_ms, duration);
return sense;
}
@@ -85,7 +85,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("ATA Device", "READ BUFFER DMA took {0} ms.", duration);
AaruConsole.DebugWriteLine("ATA Device", Localization.READ_BUFFER_DMA_took_0_ms, duration);
return sense;
}
@@ -133,7 +133,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("ATA Device", "READ DMA took {0} ms.", duration);
AaruConsole.DebugWriteLine("ATA Device", Localization.READ_DMA_took_0_ms, duration);
return sense;
}
@@ -171,7 +171,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("ATA Device", "READ MULTIPLE took {0} ms.", duration);
AaruConsole.DebugWriteLine("ATA Device", Localization.READ_MULTIPLE_took_0_ms, duration);
return sense;
}
@@ -209,7 +209,7 @@ public partial class Device
lba += statusRegisters.LbaLow;
}
AaruConsole.DebugWriteLine("ATA Device", "READ NATIVE MAX ADDRESS took {0} ms.", duration);
AaruConsole.DebugWriteLine("ATA Device", Localization.READ_NATIVE_MAX_ADDRESS_took_0_ms, duration);
return sense;
}
@@ -257,7 +257,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("ATA Device", "READ SECTORS took {0} ms.", duration);
AaruConsole.DebugWriteLine("ATA Device", Localization.READ_SECTORS_took_0_ms, duration);
return sense;
}
@@ -305,7 +305,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("ATA Device", "READ LONG took {0} ms.", duration);
AaruConsole.DebugWriteLine("ATA Device", Localization.READ_LONG_took_0_ms, duration);
return sense;
}
@@ -336,7 +336,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("ATA Device", "SEEK took {0} ms.", duration);
AaruConsole.DebugWriteLine("ATA Device", Localization.SEEK_took_0_ms, duration);
return sense;
}

View File

@@ -72,7 +72,7 @@ public partial class Device
statusRegisters.LbaLowPrevious);
}
AaruConsole.DebugWriteLine("ATA Device", "GET NATIVE MAX ADDRESS EXT took {0} ms.", duration);
AaruConsole.DebugWriteLine("ATA Device", Localization.GET_NATIVE_MAX_ADDRESS_EXT_took_0_ms, duration);
return sense;
}
@@ -109,7 +109,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("ATA Device", "READ DMA EXT took {0} ms.", duration);
AaruConsole.DebugWriteLine("ATA Device", Localization.READ_DMA_EXT_took_0_ms, duration);
return sense;
}
@@ -142,7 +142,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("ATA Device", "READ LOG EXT took {0} ms.", duration);
AaruConsole.DebugWriteLine("ATA Device", Localization.READ_LOG_EXT_took_0_ms, duration);
return sense;
}
@@ -175,7 +175,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("ATA Device", "READ LOG DMA EXT took {0} ms.", duration);
AaruConsole.DebugWriteLine("ATA Device", Localization.READ_LOG_DMA_EXT_took_0_ms, duration);
return sense;
}
@@ -215,7 +215,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("ATA Device", "READ MULTIPLE EXT took {0} ms.", duration);
AaruConsole.DebugWriteLine("ATA Device", Localization.READ_MULTIPLE_EXT_took_0_ms, duration);
return sense;
}
@@ -255,7 +255,7 @@ public partial class Device
statusRegisters.LbaLowPrevious);
}
AaruConsole.DebugWriteLine("ATA Device", "READ NATIVE MAX ADDRESS EXT took {0} ms.", duration);
AaruConsole.DebugWriteLine("ATA Device", Localization.READ_NATIVE_MAX_ADDRESS_EXT_took_0_ms, duration);
return sense;
}
@@ -292,7 +292,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("ATA Device", "READ SECTORS EXT took {0} ms.", duration);
AaruConsole.DebugWriteLine("ATA Device", Localization.READ_SECTORS_EXT_took_0_ms, duration);
return sense;
}

View File

@@ -133,7 +133,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("ATA Device", "READ DMA took {0} ms.", duration);
AaruConsole.DebugWriteLine("ATA Device", Localization.READ_DMA_took_0_ms, duration);
return sense;
}
@@ -171,7 +171,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("ATA Device", "READ MULTIPLE took {0} ms.", duration);
AaruConsole.DebugWriteLine("ATA Device", Localization.READ_MULTIPLE_took_0_ms, duration);
return sense;
}
@@ -221,7 +221,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("ATA Device", "READ SECTORS took {0} ms.", duration);
AaruConsole.DebugWriteLine("ATA Device", Localization.READ_SECTORS_took_0_ms, duration);
return sense;
}
@@ -271,7 +271,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("ATA Device", "READ LONG took {0} ms.", duration);
AaruConsole.DebugWriteLine("ATA Device", Localization.READ_LONG_took_0_ms, duration);
return sense;
}
@@ -303,7 +303,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("ATA Device", "SEEK took {0} ms.", duration);
AaruConsole.DebugWriteLine("ATA Device", Localization.SEEK_took_0_ms, duration);
return sense;
}
@@ -349,7 +349,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("ATA Device", "SET FEATURES took {0} ms.", duration);
AaruConsole.DebugWriteLine("ATA Device", Localization.SET_FEATURES_took_0_ms, duration);
return sense;
}
@@ -373,7 +373,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("ATA Device", "DOOR LOCK took {0} ms.", duration);
AaruConsole.DebugWriteLine("ATA Device", Localization.DOOR_LOCK_took_0_ms, duration);
return sense;
}
@@ -397,7 +397,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("ATA Device", "DOOR UNLOCK took {0} ms.", duration);
AaruConsole.DebugWriteLine("ATA Device", Localization.DOOR_UNLOCK_took_0_ms, duration);
return sense;
}
@@ -421,7 +421,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("ATA Device", "MEDIA EJECT took {0} ms.", duration);
AaruConsole.DebugWriteLine("ATA Device", Localization.MEDIA_EJECT_took_0_ms, duration);
return sense;
}

View File

@@ -82,7 +82,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("ATA Device", "IDENTIFY PACKET DEVICE took {0} ms.", duration);
AaruConsole.DebugWriteLine("ATA Device", Localization.IDENTIFY_PACKET_DEVICE_took_0_ms, duration);
return sense;
}

View File

@@ -66,7 +66,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("ATA Device", "CFA TRANSLATE SECTOR took {0} ms.", duration);
AaruConsole.DebugWriteLine("ATA Device", Localization.CFA_TRANSLATE_SECTOR_took_0_ms, duration);
return sense;
}
@@ -99,7 +99,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("ATA Device", "CFA TRANSLATE SECTOR took {0} ms.", duration);
AaruConsole.DebugWriteLine("ATA Device", Localization.CFA_TRANSLATE_SECTOR_took_0_ms, duration);
return sense;
}
@@ -127,7 +127,7 @@ public partial class Device
errorCode = statusRegisters.Error;
AaruConsole.DebugWriteLine("ATA Device", "CFA REQUEST EXTENDED ERROR CODE took {0} ms.", duration);
AaruConsole.DebugWriteLine("ATA Device", Localization.CFA_REQUEST_EXTENDED_ERROR_CODE_took_0_ms, duration);
return sense;
}

View File

@@ -78,7 +78,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("ATA Device", "CHECK MEDIA CARD TYPE took {0} ms.", duration);
AaruConsole.DebugWriteLine("ATA Device", Localization.CHECK_MEDIA_CARD_TYPE_took_0_ms, duration);
return sense;
}

View File

@@ -60,7 +60,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("ATA Device", "SMART DISABLE OPERATIONS took {0} ms.", duration);
AaruConsole.DebugWriteLine("ATA Device", Localization.SMART_DISABLE_OPERATIONS_took_0_ms, duration);
return sense;
}
@@ -89,7 +89,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("ATA Device", "SMART ENABLE ATTRIBUTE AUTOSAVE took {0} ms.", duration);
AaruConsole.DebugWriteLine("ATA Device", Localization.SMART_ENABLE_ATTRIBUTE_AUTOSAVE_took_0_ms, duration);
return sense;
}
@@ -117,7 +117,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("ATA Device", "SMART DISABLE ATTRIBUTE AUTOSAVE took {0} ms.", duration);
AaruConsole.DebugWriteLine("ATA Device", Localization.SMART_DISABLE_ATTRIBUTE_AUTOSAVE_took_0_ms, duration);
return sense;
}
@@ -144,7 +144,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("ATA Device", "SMART ENABLE OPERATIONS took {0} ms.", duration);
AaruConsole.DebugWriteLine("ATA Device", Localization.SMART_ENABLE_OPERATIONS_took_0_ms, duration);
return sense;
}
@@ -174,7 +174,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("ATA Device", "SMART EXECUTE OFF-LINE IMMEDIATE took {0} ms.", duration);
AaruConsole.DebugWriteLine("ATA Device", Localization.SMART_EXECUTE_OFF_LINE_IMMEDIATE_took_0_ms, duration);
return sense;
}
@@ -203,7 +203,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("ATA Device", "SMART READ DATA took {0} ms.", duration);
AaruConsole.DebugWriteLine("ATA Device", Localization.SMART_READ_DATA_took_0_ms, duration);
return sense;
}
@@ -234,7 +234,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("ATA Device", "SMART READ LOG took {0} ms.", duration);
AaruConsole.DebugWriteLine("ATA Device", Localization.SMART_READ_LOG_took_0_ms, duration);
return sense;
}
@@ -261,7 +261,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("ATA Device", "SMART RETURN STATUS took {0} ms.", duration);
AaruConsole.DebugWriteLine("ATA Device", Localization.SMART_RETURN_STATUS_took_0_ms, duration);
return sense;
}

View File

@@ -108,7 +108,8 @@ public partial class Device
if(OperatingSystem.IsLinux())
return Linux.ListDevices.GetList();
throw new InvalidOperationException($"Platform {DetectOS.GetRealPlatformID()} not yet supported.");
throw new InvalidOperationException(string.Format(Localization.Platform_0_not_yet_supported,
DetectOS.GetRealPlatformID()));
}
try
@@ -118,7 +119,7 @@ public partial class Device
if(aaruUri.Scheme != "aaru" &&
aaruUri.Scheme != "dic")
{
AaruConsole.ErrorWriteLine("Invalid remote URI.");
AaruConsole.ErrorWriteLine(Localization.Invalid_remote_URI);
return Array.Empty<DeviceInfo>();
}
@@ -136,7 +137,7 @@ public partial class Device
}
catch(Exception)
{
AaruConsole.ErrorWriteLine("Error connecting to host.");
AaruConsole.ErrorWriteLine(Localization.Error_connecting_to_host);
return Array.Empty<DeviceInfo>();
}

View File

@@ -53,7 +53,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("MMC Device", "SEND_CSD took {0} ms.", duration);
AaruConsole.DebugWriteLine("MMC Device", Localization.SEND_CSD_took_0_ms, duration);
return sense;
}
@@ -74,7 +74,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("MMC Device", "SEND_CID took {0} ms.", duration);
AaruConsole.DebugWriteLine("MMC Device", Localization.SEND_CID_took_0_ms, duration);
return sense;
}
@@ -95,7 +95,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SecureDigital Device", "SEND_OP_COND took {0} ms.", duration);
AaruConsole.DebugWriteLine("MMC Device", Localization.SEND_OP_COND_took_0_ms, duration);
return sense;
}
@@ -116,7 +116,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("MMC Device", "SEND_EXT_CSD took {0} ms.", duration);
AaruConsole.DebugWriteLine("MMC Device", Localization.SEND_EXT_CSD_took_0_ms, duration);
return sense;
}
@@ -137,7 +137,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("MMC Device", "SET_BLOCKLEN took {0} ms.", duration);
AaruConsole.DebugWriteLine("MMC Device", Localization.SET_BLOCKLEN_took_0_ms, duration);
return sense;
}
@@ -201,7 +201,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("MMC Device", "READ_SINGLE_BLOCK took {0} ms.", duration);
AaruConsole.DebugWriteLine("MMC Device", Localization.READ_SINGLE_BLOCK_took_0_ms, duration);
return sense;
}
@@ -238,8 +238,8 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("MMC Device",
transferLength > 1 ? "READ_MULTIPLE_BLOCK took {0} ms."
: "READ_SINGLE_BLOCK took {0} ms.", duration);
transferLength > 1 ? Localization.READ_MULTIPLE_BLOCK_took_0_ms
: Localization.READ_SINGLE_BLOCK_took_0_ms, duration);
return sense;
}
@@ -287,7 +287,7 @@ public partial class Device
Array.Copy(blockBuffer, 0, buffer, i * blockSize, blockSize);
}
AaruConsole.DebugWriteLine("MMC Device", "Multiple READ_SINGLE_BLOCKs took {0} ms.", duration);
AaruConsole.DebugWriteLine("MMC Device", Localization.Multiple_READ_SINGLE_BLOCKs_took_0_ms, duration);
return sense;
}
@@ -308,7 +308,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SecureDigital Device", "SEND_STATUS took {0} ms.", duration);
AaruConsole.DebugWriteLine("SecureDigital Device", Localization.SEND_STATUS_took_0_ms, duration);
return sense;
}
@@ -373,7 +373,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SecureDigital Device", "READ_MULTIPLE_BLOCK took {0} ms.", duration);
AaruConsole.DebugWriteLine("SecureDigital Device", Localization.READ_MULTIPLE_BLOCK_took_0_ms, duration);
buffer = commands[1].buffer;
response = commands[1].response;

View File

@@ -52,7 +52,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SecureDigital Device", "SD_STATUS took {0} ms.", duration);
AaruConsole.DebugWriteLine("SecureDigital Device", Localization.SD_STATUS_took_0_ms, duration);
return sense;
}
@@ -73,7 +73,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SecureDigital Device", "SD_SEND_OP_COND took {0} ms.", duration);
AaruConsole.DebugWriteLine("SecureDigital Device", Localization.SD_SEND_OP_COND_took_0_ms, duration);
return sense;
}
@@ -94,7 +94,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SecureDigital Device", "SEND_SCR took {0} ms.", duration);
AaruConsole.DebugWriteLine("SecureDigital Device", Localization.SEND_SCR_took_0_ms, duration);
return sense;
}

View File

@@ -75,7 +75,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "ADAPTEC TRANSLATE took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.ADAPTEC_TRANSLATE_took_0_ms, duration);
return sense;
}
@@ -116,7 +116,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "ADAPTEC SET ERROR THRESHOLD took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.ADAPTEC_SET_ERROR_THRESHOLD_took_0_ms, duration);
return sense;
}
@@ -154,7 +154,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "ADAPTEC READ/RESET USAGE COUNTER took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.ADAPTEC_READ_RESET_USAGE_COUNTER_took_0_ms, duration);
return sense;
}
@@ -179,7 +179,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "ADAPTEC WRITE DATA BUFFER took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.ADAPTEC_WRITE_DATA_BUFFER_took_0_ms, duration);
return sense;
}
@@ -202,7 +202,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "ADAPTEC READ DATA BUFFER took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.ADAPTEC_READ_DATA_BUFFER_took_0_ms, duration);
return sense;
}

View File

@@ -61,7 +61,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "ARCHIVE CORP. REQUEST BLOCK ADDRESS took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.ARCHIVE_CORP_REQUEST_BLOCK_ADDRESS_took_0_ms, duration);
return sense;
}
@@ -100,7 +100,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "ARCHIVE CORP. SEEK BLOCK took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.ARCHIVE_CORP_SEEK_BLOCK_took_0_ms, duration);
return sense;
}

View File

@@ -74,7 +74,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "CERTANCE PARK UNPARK took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.CERTANCE_PARK_UNPARK_took_0_ms, duration);
return sense;
}

View File

@@ -103,7 +103,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "FUJITSU DISPLAY took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.FUJITSU_DISPLAY_took_0_ms, duration);
return sense;
}

View File

@@ -68,7 +68,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "HL-DT-ST READ DVD (RAW) took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.HL_DT_ST_READ_DVD_RAW_took_0_ms, duration);
return sense;
}

View File

@@ -96,7 +96,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "HP READ LONG took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.HP_READ_LONG_took_0_ms, duration);
return sense;
}

View File

@@ -58,7 +58,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "KREON DEPRECATED UNLOCK took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.KREON_DEPRECATED_UNLOCK_took_0_ms, duration);
return sense;
}
@@ -110,7 +110,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "KREON SET LOCK STATE took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.KREON_SET_LOCK_STATE_took_0_ms, duration);
return sense || Error;
}
@@ -139,7 +139,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "KREON GET FEATURE LIST took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.KREON_GET_FEATURE_LIST_took_0_ms, duration);
if(sense)
return true;
@@ -237,7 +237,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "KREON EXTRACT SS took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.KREON_EXTRACT_SS_took_0_ms, duration);
return sense || Error;
}

View File

@@ -103,7 +103,8 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device",
"GET CONFIGURATION (Starting Feature Number: {1}, Return Type: {2}, Sense: {3}, Last Error: {4}) took {0} ms.",
Localization.
GET_CONFIGURATION_Starting_Feature_Number_1_Return_Type_2_Sense_3_Last_Error_4_took_0_ms,
duration, startingFeatureNumber, rt, sense, LastError);
return sense;
@@ -174,7 +175,8 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device",
"READ DISC STRUCTURE (Media Type: {1}, Address: {2}, Layer Number: {3}, Format: {4}, AGID: {5}, Sense: {6}, Last Error: {7}) took {0} ms.",
Localization.
READ_DISC_STRUCTURE_Media_Type_1_Address_2_Layer_Number_3_Format_4_AGID_5_Sense_6_Last_Error_7_took_0_ms,
duration, mediaType, address, layerNumber, format, agid, sense, LastError);
return sense;
@@ -300,7 +302,8 @@ public partial class Device
Array.Copy(tmpBuffer, 0, buffer, 0, buffer.Length);
AaruConsole.DebugWriteLine("SCSI Device",
"READ TOC/PMA/ATIP took (MSF: {1}, Format: {2}, Track/Session Number: {3}, Sense: {4}, LastError: {5}) {0} ms.",
Localization.
READ_TOC_PMA_ATIP_took_MSF_1_Format_2_Track_Session_Number_3_Sense_4_LastError_5_0_ms,
duration, msf, format, trackSessionNumber, sense, LastError);
return sense;
@@ -316,7 +319,8 @@ public partial class Device
duration += tmpDuration;
AaruConsole.DebugWriteLine("SCSI Device",
"READ TOC/PMA/ATIP took (MSF: {1}, Format: {2}, Track/Session Number: {3}, Sense: {4}, LastError: {5}) {0} ms.",
Localization.
READ_TOC_PMA_ATIP_took_MSF_1_Format_2_Track_Session_Number_3_Sense_4_LastError_5_0_ms,
duration, msf, format, trackSessionNumber, sense, LastError);
return sense;
@@ -365,7 +369,7 @@ public partial class Device
Array.Copy(tmpBuffer, 0, buffer, 0, buffer.Length);
AaruConsole.DebugWriteLine("SCSI Device",
"READ DISC INFORMATION (Data Type: {1}, Sense: {2}, Last Error: {3}) took {0} ms.",
Localization.READ_DISC_INFORMATION_Data_Type_1_Sense_2_Last_Error_3_took_0_ms,
duration, dataType, sense, LastError);
return sense;
@@ -435,7 +439,8 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device",
"READ CD (LBA: {1}, Block Size: {2}, Transfer Length: {3}, Expected Sector Type: {4}, DAP: {5}, Relative Address: {6}, Sync: {7}, Headers: {8}, User Data: {9}, ECC/EDC: {10}, C2: {11}, Subchannel: {12}, Sense: {13}, Last Error: {14}) took {0} ms.",
Localization.
READ_CD_LBA_1_Block_Size_2_Transfer_Length_3_Expected_Sector_Type_4_DAP_5_Relative_Address_6_Sync_7_Headers_8_User_Data_9_ECC_EDC_10_C2_11_Subchannel_12_Sense_13_Last_Error_14_took_0_ms,
duration, lba, blockSize, transferLength, expectedSectorType, dap, relAddr, sync,
headerCodes, userData, edcEcc, c2Error, subchannel, sense, LastError);
@@ -503,7 +508,8 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device",
"READ CD MSF (Start MSF: {1}, End MSF: {2}, Block Size: {3}, Expected Sector Type: {4}, DAP: {5}, Sync: {6}, Headers: {7}, User Data: {8}, ECC/EDC: {9}, C2: {10}, Subchannel: {11}, Sense: {12}, LastError: {13}) took {0} ms.",
Localization.
READ_CD_MSF_Start_MSF_1_End_MSF_2_Block_Size_3_Expected_Sector_Type_4_DAP_5_Sync_6_Headers_7_User_Data_8_ECC_EDC_9_C2_10_Subchannel_11_Sense_12_LastError_13_took_0_ms,
duration, startMsf, endMsf, blockSize, expectedSectorType, dap, sync, headerCodes,
userData, edcEcc, c2Error, subchannel, sense, LastError);
@@ -554,7 +560,8 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device",
"PREVENT ALLOW MEDIUM REMOVAL (Persistent: {1}, Prevent: {2}, Sense: {3}, LastError: {4}) took {0} ms.",
Localization.
PREVENT_ALLOW_MEDIUM_REMOVAL_Persistent_1_Prevent_2_Sense_3_LastError_4_took_0_ms,
duration, persistent, prevent, sense, LastError);
return sense;
@@ -637,7 +644,8 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device",
"START STOP UNIT (Immediate: {1}, FormatLayer: {2}, Power Conditions: {3}, Change Format Layer: {4}, Load/Eject: {5}, Start: {6}, Sense: {7}, Last Error: {8}) took {0} ms.",
Localization.
START_STOP_UNIT_Immediate_1_FormatLayer_2_Power_Conditions_3_Change_Format_Layer_4_Load_Eject_5_Start_6_Sense_7_Last_Error_8_took_0_ms,
duration, immediate, formatLayer, powerConditions, changeFormatLayer, loadEject,
start, sense, LastError);
@@ -672,7 +680,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "READ READ SUB-CHANNEL (MCN, Sense {1}, Last Error {2}) took {0} ms.",
AaruConsole.DebugWriteLine("SCSI Device", Localization.READ_READ_SUB_CHANNEL_MCN_Sense_1_Last_Error_2_took_0_ms,
duration, sense, LastError);
if(!sense &&
@@ -714,7 +722,8 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device",
"READ READ SUB-CHANNEL (ISRC, Track Number: {1}, Sense: {2}, Last Error: {3}) took {0} ms.",
Localization.
READ_READ_SUB_CHANNEL_ISRC_Track_Number_1_Sense_2_Last_Error_3_took_0_ms,
duration, trackNumber, sense, LastError);
if(!sense &&
@@ -752,7 +761,8 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device",
"SET CD SPEED (Rotational Control: {1}, Read Speed: {2}, Write Speed: {3}, Sense: {4}, Last Error: {5}) took {0} ms.",
Localization.
SET_CD_SPEED_Rotational_Control_1_Read_Speed_2_Write_Speed_3_Sense_4_Last_Error_5_took_0_ms,
duration, rotationalControl, readSpeed, writeSpeed, sense, LastError);
return sense;
@@ -792,7 +802,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device",
"READ TRACK INFORMATION (Data Type: {1}, Sense: {2}, Last Error: {3}) took {0} ms.",
Localization.READ_TRACK_INFORMATION_Data_Type_1_Sense_2_Last_Error_3_took_0_ms,
duration, type, sense, LastError);
return sense;

View File

@@ -67,7 +67,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "MediaTek READ DRAM took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.MediaTek_READ_DRAM_took_0_ms, duration);
return sense;
}

View File

@@ -63,7 +63,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "MINIDISC READ DTOC took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.MINIDISC_READ_DTOC_took_0_ms, duration);
return sense;
}
@@ -98,7 +98,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "MINIDISC READ UTOC took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.MINIDISC_READ_UTOC_took_0_ms, duration);
return sense;
}
@@ -127,7 +127,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "MINIDISC command D5h took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.MINIDISC_command_D5h_took_0_ms, duration);
return sense;
}
@@ -152,7 +152,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "MINIDISC STOP PLAY took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.MINIDISC_STOP_PLAY_took_0_ms, duration);
return sense;
}
@@ -181,7 +181,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "MINIDISC READ POSITION took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.MINIDISC_READ_POSITION_took_0_ms, duration);
return sense;
}
@@ -210,7 +210,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "MINIDISC GET TYPE took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.MINIDISC_GET_TYPE_took_0_ms, duration);
return sense;
}

View File

@@ -65,7 +65,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "READ CD-DA took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.NEC_READ_CD_DA_took_0_ms, duration);
return sense;
}

View File

@@ -111,7 +111,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "MEDIUM SCAN took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.MEDIUM_SCAN_took_0_ms, duration);
if(Error)
return sense;

View File

@@ -69,7 +69,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "PIONEER READ CD-DA took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.PIONEER_READ_CD_DA_took_0_ms, duration);
return sense;
}
@@ -107,7 +107,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "PIONEER READ CD-DA MSF took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.PIONEER_READ_CD_DA_MSF_took_0_ms, duration);
return sense;
}
@@ -161,7 +161,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "PIONEER READ CD-XA took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.PIONEER_READ_CD_XA_took_0_ms, duration);
return sense;
}

View File

@@ -101,7 +101,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "PLASMON READ SECTOR LOCATION took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.PLASMON_READ_SECTOR_LOCATION_took_0_ms, duration);
return sense;
}

View File

@@ -72,7 +72,8 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device",
"Plextor READ CD-DA (LBA: {1}, Block Size: {2}, Transfer Length: {3}, Subchannel: {4}, Sense: {5}, Last Error: {6}) took {0} ms.",
Localization.
Plextor_READ_CD_DA_LBA_1_Block_Size_2_Transfer_Length_3_Subchannel_4_Sense_5_Last_Error_6_took_0_ms,
duration, lba, blockSize, transferLength, subchannel, sense, LastError);
return sense;
@@ -107,7 +108,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "Plextor READ DVD (RAW) took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.Plextor_READ_DVD_RAW_took_0_ms, duration);
return sense;
}
@@ -132,7 +133,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "PLEXTOR READ EEPROM took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.PLEXTOR_READ_EEPROM_took_0_ms, duration);
return sense;
}
@@ -157,7 +158,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "PLEXTOR READ EEPROM took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.PLEXTOR_READ_EEPROM_took_0_ms, duration);
return sense;
}
@@ -188,7 +189,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "PLEXTOR READ EEPROM took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.PLEXTOR_READ_EEPROM_took_0_ms, duration);
return sense;
}
@@ -220,7 +221,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "PLEXTOR POWEREC GET SPEEDS took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.PLEXTOR_POWEREC_GET_SPEEDS_took_0_ms, duration);
if(sense || Error)
return sense;
@@ -258,7 +259,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "PLEXTOR POWEREC GET SPEEDS took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.PLEXTOR_POWEREC_GET_SPEEDS_took_0_ms, duration);
if(sense || Error)
return sense;
@@ -292,7 +293,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "PLEXTOR GET SILENT MODE took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.PLEXTOR_GET_SILENT_MODE_took_0_ms, duration);
return sense;
}
@@ -319,7 +320,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "PLEXTOR GET GIGAREC took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.PLEXTOR_GET_GIGAREC_took_0_ms, duration);
return sense;
}
@@ -353,7 +354,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "PLEXTOR GET VARIREC took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.PLEXTOR_GET_VARIREC_took_0_ms, duration);
return sense;
}
@@ -379,7 +380,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "PLEXTOR GET SECUREC took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.PLEXTOR_GET_SECUREC_took_0_ms, duration);
return sense;
}
@@ -406,7 +407,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "PLEXTOR GET SPEEDREAD took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.PLEXTOR_GET_SPEEDREAD_took_0_ms, duration);
return sense;
}
@@ -433,7 +434,8 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "PLEXTOR GET SINGLE-SESSION / HIDE CD-R took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.PLEXTOR_GET_SINGLE_SESSION_HIDE_CD_R_took_0_ms,
duration);
return sense;
}
@@ -467,7 +469,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "PLEXTOR GET BOOK BITSETTING took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.PLEXTOR_GET_BOOK_BITSETTING_took_0_ms, duration);
return sense;
}
@@ -494,7 +496,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "PLEXTOR GET TEST WRITE DVD+ took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.PLEXTOR_GET_TEST_WRITE_DVD_took_0_ms, duration);
return sense;
}

View File

@@ -77,7 +77,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "READ (6) took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.READ_6_took_0_ms, duration);
return sense;
}
@@ -140,7 +140,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "READ (10) took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.READ_10_took_0_ms, duration);
return sense;
}
@@ -209,7 +209,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "READ (12) took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.READ_12_took_0_ms, duration);
return sense;
}
@@ -279,7 +279,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "READ (16) took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.READ_16_took_0_ms, duration);
return sense;
}
@@ -325,7 +325,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "READ LONG (10) took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.READ_LONG_10_took_0_ms, duration);
return sense;
}
@@ -372,7 +372,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "READ LONG (16) took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.READ_LONG_16_took_0_ms, duration);
return sense;
}
@@ -398,7 +398,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "SEEK (6) took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.SEEK_6_took_0_ms, duration);
return sense;
}
@@ -425,7 +425,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "SEEK (10) took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.SEEK_10_took_0_ms, duration);
return sense;
}

View File

@@ -94,7 +94,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "READ ATTRIBUTE took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.READ_ATTRIBUTE_took_0_ms, duration);
return sense;
}

View File

@@ -102,7 +102,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "INQUIRY took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.INQUIRY_took_0_ms, duration);
return sense;
}
@@ -183,7 +183,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "INQUIRY took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.INQUIRY_took_0_ms, duration);
return sense;
}
@@ -209,7 +209,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "TEST UNIT READY took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.TEST_UNIT_READY_took_0_ms, duration);
return sense;
}
@@ -282,7 +282,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "MODE SENSE(6) took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.MODE_SENSE_6_took_0_ms, duration);
return sense;
}
@@ -367,7 +367,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "MODE SENSE(10) took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.MODE_SENSE_10_took_0_ms, duration);
return sense;
}
@@ -419,7 +419,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "PREVENT ALLOW MEDIUM REMOVAL took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.PREVENT_ALLOW_MEDIUM_REMOVAL_took_0_ms, duration);
return sense;
}
@@ -469,7 +469,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "READ CAPACITY took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.READ_CAPACITY_took_0_ms, duration);
return sense;
}
@@ -525,7 +525,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "READ CAPACITY(16) took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.READ_CAPACITY_16_took_0_ms, duration);
return sense;
}
@@ -570,7 +570,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "READ MEDIA SERIAL NUMBER took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.READ_MEDIA_SERIAL_NUMBER_took_0_ms, duration);
return sense;
}
@@ -703,7 +703,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "MODE SELECT(6) took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.MODE_SELECT_6_took_0_ms, duration);
return sense;
}
@@ -758,7 +758,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "MODE SELECT(10) took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.MODE_SELECT_10_took_0_ms, duration);
return sense;
}
@@ -796,7 +796,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "REQUEST SENSE took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.REQUEST_SENSE_took_0_ms, duration);
return sense;
}

View File

@@ -95,7 +95,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "LOAD UNLOAD (6) took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.LOAD_UNLOAD_6_took_0_ms, duration);
return sense;
}
@@ -175,7 +175,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "LOCATE (10) took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.LOCATE_10_took_0_ms, duration);
return sense;
}
@@ -264,7 +264,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "LOCATE (16) took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.LOCATE_16_took_0_ms, duration);
return sense;
}
@@ -334,7 +334,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "READ (6) took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.READ_6_took_0_ms, duration);
return sense;
}
@@ -442,7 +442,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "READ (16) took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.READ_16_took_0_ms, duration);
return sense;
}
@@ -465,7 +465,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "READ BLOCK LIMITS took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.READ_BLOCK_LIMITS_took_0_ms, duration);
return sense;
}
@@ -560,7 +560,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "READ POSITION took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.READ_POSITION_took_0_ms, duration);
return sense;
}
@@ -631,7 +631,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "READ REVERSE (6) took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.READ_REVERSE_6_took_0_ms, duration);
return sense;
}
@@ -748,7 +748,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "READ REVERSE (16) took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.READ_REVERSE_16_took_0_ms, duration);
return sense;
}
@@ -815,7 +815,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "RECOVER BUFFERED DATA took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.RECOVER_BUFFERED_DATA_took_0_ms, duration);
return sense;
}
@@ -882,7 +882,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "REPORT DENSITY SUPPORT took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.REPORT_DENSITY_SUPPORT_took_0_ms, duration);
return sense;
}
@@ -915,7 +915,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "REWIND took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.REWIND_took_0_ms, duration);
return sense;
}
@@ -940,7 +940,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "TRACK SELECT took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.TRACK_SELECT_took_0_ms, duration);
return sense;
}
@@ -970,7 +970,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "SPACE took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.SPACE_took_0_ms, duration);
return sense;
}

View File

@@ -111,7 +111,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "SYQUEST READ (6) took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.SYQUEST_READ_6_took_0_ms, duration);
return sense;
}
@@ -188,7 +188,7 @@ public partial class Device
Error = LastError != 0;
AaruConsole.DebugWriteLine("SCSI Device", "SYQUEST READ (10) took {0} ms.", duration);
AaruConsole.DebugWriteLine("SCSI Device", Localization.SYQUEST_READ_10_took_0_ms, duration);
return sense;
}

View File

@@ -48,7 +48,7 @@ static class ListDevices
{
string[] sysdevs = Directory.GetFileSystemEntries(PATH_SYS_DEVBLOCK, "*", SearchOption.TopDirectoryOnly);
var devices = new DeviceInfo[sysdevs.Length];
DeviceInfo[] devices = new DeviceInfo[sysdevs.Length];
bool hasUdev;
IntPtr udev = IntPtr.Zero;
@@ -63,7 +63,7 @@ static class ListDevices
hasUdev = false;
}
for(var i = 0; i < sysdevs.Length; i++)
for(int i = 0; i < sysdevs.Length; i++)
{
devices[i] = new DeviceInfo
{

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,509 @@
<?xml version="1.0" encoding="utf-8" ?>
<root>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="root"
xmlns="">
<xsd:element name="root" msdata:IsDataSet="true"></xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>1.3</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089
</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089
</value>
</resheader>
<data name="READ_BUFFER_took_0_ms" xml:space="preserve">
<value>READ BUFFER took {0} ms.</value>
</data>
<data name="READ_BUFFER_DMA_took_0_ms" xml:space="preserve">
<value>READ BUFFER DMA took {0} ms.</value>
</data>
<data name="READ_DMA_took_0_ms" xml:space="preserve">
<value>READ DMA took {0} ms.</value>
</data>
<data name="READ_MULTIPLE_took_0_ms" xml:space="preserve">
<value>READ MULTIPLE took {0} ms.</value>
</data>
<data name="READ_NATIVE_MAX_ADDRESS_took_0_ms" xml:space="preserve">
<value>READ NATIVE MAX ADDRESS took {0} ms.</value>
</data>
<data name="READ_SECTORS_took_0_ms" xml:space="preserve">
<value>READ SECTORS took {0} ms.</value>
</data>
<data name="READ_LONG_took_0_ms" xml:space="preserve">
<value>READ LONG took {0} ms.</value>
</data>
<data name="SEEK_took_0_ms" xml:space="preserve">
<value>SEEK took {0} ms.</value>
</data>
<data name="GET_NATIVE_MAX_ADDRESS_EXT_took_0_ms" xml:space="preserve">
<value>GET NATIVE MAX ADDRESS EXT took {0} ms.</value>
</data>
<data name="READ_DMA_EXT_took_0_ms" xml:space="preserve">
<value>READ DMA EXT took {0} ms.</value>
</data>
<data name="READ_LOG_EXT_took_0_ms" xml:space="preserve">
<value>READ LOG EXT took {0} ms.</value>
</data>
<data name="READ_LOG_DMA_EXT_took_0_ms" xml:space="preserve">
<value>READ LOG DMA EXT took {0} ms.</value>
</data>
<data name="READ_MULTIPLE_EXT_took_0_ms" xml:space="preserve">
<value>READ MULTIPLE EXT took {0} ms.</value>
</data>
<data name="READ_NATIVE_MAX_ADDRESS_EXT_took_0_ms" xml:space="preserve">
<value>READ NATIVE MAX ADDRESS EXT took {0} ms.</value>
</data>
<data name="READ_SECTORS_EXT_took_0_ms" xml:space="preserve">
<value>READ SECTORS EXT took {0} ms.</value>
</data>
<data name="SET_FEATURES_took_0_ms" xml:space="preserve">
<value>SET FEATURES took {0} ms.</value>
</data>
<data name="DOOR_LOCK_took_0_ms" xml:space="preserve">
<value>DOOR LOCK took {0} ms.</value>
</data>
<data name="DOOR_UNLOCK_took_0_ms" xml:space="preserve">
<value>DOOR UNLOCK took {0} ms.</value>
</data>
<data name="MEDIA_EJECT_took_0_ms" xml:space="preserve">
<value>MEDIA EJECT took {0} ms.</value>
</data>
<data name="IDENTIFY_PACKET_DEVICE_took_0_ms" xml:space="preserve">
<value>IDENTIFY PACKET DEVICE took {0} ms.</value>
</data>
<data name="CFA_TRANSLATE_SECTOR_took_0_ms" xml:space="preserve">
<value>CFA TRANSLATE SECTOR took {0} ms.</value>
</data>
<data name="CFA_REQUEST_EXTENDED_ERROR_CODE_took_0_ms" xml:space="preserve">
<value>CFA REQUEST EXTENDED ERROR CODE took {0} ms.</value>
</data>
<data name="CHECK_MEDIA_CARD_TYPE_took_0_ms" xml:space="preserve">
<value>CHECK MEDIA CARD TYPE took {0} ms.</value>
</data>
<data name="SMART_DISABLE_OPERATIONS_took_0_ms" xml:space="preserve">
<value>SMART DISABLE OPERATIONS took {0} ms.</value>
</data>
<data name="SMART_ENABLE_ATTRIBUTE_AUTOSAVE_took_0_ms" xml:space="preserve">
<value>SMART ENABLE ATTRIBUTE AUTOSAVE took {0} ms.</value>
</data>
<data name="SMART_DISABLE_ATTRIBUTE_AUTOSAVE_took_0_ms" xml:space="preserve">
<value>SMART DISABLE ATTRIBUTE AUTOSAVE took {0} ms.</value>
</data>
<data name="SMART_ENABLE_OPERATIONS_took_0_ms" xml:space="preserve">
<value>SMART ENABLE OPERATIONS took {0} ms.</value>
</data>
<data name="SMART_EXECUTE_OFF_LINE_IMMEDIATE_took_0_ms" xml:space="preserve">
<value>SMART EXECUTE OFF-LINE IMMEDIATE took {0} ms.</value>
</data>
<data name="SMART_READ_DATA_took_0_ms" xml:space="preserve">
<value>SMART READ DATA took {0} ms.</value>
</data>
<data name="SMART_READ_LOG_took_0_ms" xml:space="preserve">
<value>SMART READ LOG took {0} ms.</value>
</data>
<data name="SMART_RETURN_STATUS_took_0_ms" xml:space="preserve">
<value>SMART RETURN STATUS took {0} ms.</value>
</data>
<data name="SEND_CSD_took_0_ms" xml:space="preserve">
<value>SEND_CSD took {0} ms.</value>
</data>
<data name="SEND_CID_took_0_ms" xml:space="preserve">
<value>SEND_CID took {0} ms.</value>
</data>
<data name="SEND_OP_COND_took_0_ms" xml:space="preserve">
<value>SEND_OP_COND took {0} ms.</value>
</data>
<data name="SEND_EXT_CSD_took_0_ms" xml:space="preserve">
<value>SEND_EXT_CSD took {0} ms.</value>
</data>
<data name="SET_BLOCKLEN_took_0_ms" xml:space="preserve">
<value>SET_BLOCKLEN took {0} ms.</value>
</data>
<data name="READ_SINGLE_BLOCK_took_0_ms" xml:space="preserve">
<value>READ_SINGLE_BLOCK took {0} ms.</value>
</data>
<data name="READ_MULTIPLE_BLOCK_took_0_ms" xml:space="preserve">
<value>READ_MULTIPLE_BLOCK took {0} ms.</value>
</data>
<data name="Multiple_READ_SINGLE_BLOCKs_took_0_ms" xml:space="preserve">
<value>Multiple READ_SINGLE_BLOCKs took {0} ms.</value>
</data>
<data name="SEND_STATUS_took_0_ms" xml:space="preserve">
<value>SEND_STATUS took {0} ms.</value>
</data>
<data name="SD_STATUS_took_0_ms" xml:space="preserve">
<value>SD_STATUS took {0} ms.</value>
</data>
<data name="SD_SEND_OP_COND_took_0_ms" xml:space="preserve">
<value>SD_SEND_OP_COND took {0} ms.</value>
</data>
<data name="SEND_SCR_took_0_ms" xml:space="preserve">
<value>SEND_SCR took {0} ms.</value>
</data>
<data name="ADAPTEC_TRANSLATE_took_0_ms" xml:space="preserve">
<value>ADAPTEC TRANSLATE took {0} ms.</value>
</data>
<data name="ADAPTEC_SET_ERROR_THRESHOLD_took_0_ms" xml:space="preserve">
<value>ADAPTEC SET ERROR THRESHOLD took {0} ms.</value>
</data>
<data name="ADAPTEC_READ_RESET_USAGE_COUNTER_took_0_ms" xml:space="preserve">
<value>ADAPTEC READ/RESET USAGE COUNTER took {0} ms.</value>
</data>
<data name="ADAPTEC_WRITE_DATA_BUFFER_took_0_ms" xml:space="preserve">
<value>ADAPTEC WRITE DATA BUFFER took {0} ms.</value>
</data>
<data name="ADAPTEC_READ_DATA_BUFFER_took_0_ms" xml:space="preserve">
<value>ADAPTEC READ DATA BUFFER took {0} ms.</value>
</data>
<data name="ARCHIVE_CORP_REQUEST_BLOCK_ADDRESS_took_0_ms" xml:space="preserve">
<value>ARCHIVE CORP. REQUEST BLOCK ADDRESS took {0} ms.</value>
</data>
<data name="ARCHIVE_CORP_SEEK_BLOCK_took_0_ms" xml:space="preserve">
<value>ARCHIVE CORP. SEEK BLOCK took {0} ms.</value>
</data>
<data name="CERTANCE_PARK_UNPARK_took_0_ms" xml:space="preserve">
<value>CERTANCE PARK UNPARK took {0} ms.</value>
</data>
<data name="FUJITSU_DISPLAY_took_0_ms" xml:space="preserve">
<value>FUJITSU DISPLAY took {0} ms.</value>
</data>
<data name="HL_DT_ST_READ_DVD_RAW_took_0_ms" xml:space="preserve">
<value>HL-DT-ST READ DVD (RAW) took {0} ms.</value>
</data>
<data name="HP_READ_LONG_took_0_ms" xml:space="preserve">
<value>HP READ LONG took {0} ms.</value>
</data>
<data name="KREON_DEPRECATED_UNLOCK_took_0_ms" xml:space="preserve">
<value>KREON DEPRECATED UNLOCK took {0} ms.</value>
</data>
<data name="KREON_SET_LOCK_STATE_took_0_ms" xml:space="preserve">
<value>KREON SET LOCK STATE took {0} ms.</value>
</data>
<data name="KREON_GET_FEATURE_LIST_took_0_ms" xml:space="preserve">
<value>KREON GET FEATURE LIST took {0} ms.</value>
</data>
<data name="KREON_EXTRACT_SS_took_0_ms" xml:space="preserve">
<value>KREON EXTRACT SS took {0} ms.</value>
</data>
<data name="MediaTek_READ_DRAM_took_0_ms" xml:space="preserve">
<value>MediaTek READ DRAM took {0} ms.</value>
</data>
<data name="MINIDISC_READ_DTOC_took_0_ms" xml:space="preserve">
<value>MINIDISC READ DTOC took {0} ms.</value>
</data>
<data name="MINIDISC_READ_UTOC_took_0_ms" xml:space="preserve">
<value>MINIDISC READ UTOC took {0} ms.</value>
</data>
<data name="MINIDISC_command_D5h_took_0_ms" xml:space="preserve">
<value>MINIDISC command D5h took {0} ms.</value>
</data>
<data name="MINIDISC_STOP_PLAY_took_0_ms" xml:space="preserve">
<value>MINIDISC STOP PLAY took {0} ms.</value>
</data>
<data name="MINIDISC_READ_POSITION_took_0_ms" xml:space="preserve">
<value>MINIDISC READ POSITION took {0} ms.</value>
</data>
<data name="MINIDISC_GET_TYPE_took_0_ms" xml:space="preserve">
<value>MINIDISC GET TYPE took {0} ms.</value>
</data>
<data name="GET_CONFIGURATION_Starting_Feature_Number_1_Return_Type_2_Sense_3_Last_Error_4_took_0_ms"
xml:space="preserve">
<value>GET CONFIGURATION (Starting Feature Number: {1}, Return Type: {2}, Sense: {3}, Last Error: {4}) took {0} ms.</value>
</data>
<data name="READ_DISC_STRUCTURE_Media_Type_1_Address_2_Layer_Number_3_Format_4_AGID_5_Sense_6_Last_Error_7_took_0_ms"
xml:space="preserve">
<value>READ DISC STRUCTURE (Media Type: {1}, Address: {2}, Layer Number: {3}, Format: {4}, AGID: {5}, Sense: {6}, Last Error: {7}) took {0} ms.</value>
</data>
<data name="READ_TOC_PMA_ATIP_took_MSF_1_Format_2_Track_Session_Number_3_Sense_4_LastError_5_0_ms"
xml:space="preserve">
<value>READ TOC/PMA/ATIP took (MSF: {1}, Format: {2}, Track/Session Number: {3}, Sense: {4}, LastError: {5}) {0} ms.</value>
</data>
<data name="READ_DISC_INFORMATION_Data_Type_1_Sense_2_Last_Error_3_took_0_ms" xml:space="preserve">
<value>READ DISC INFORMATION (Data Type: {1}, Sense: {2}, Last Error: {3}) took {0} ms.</value>
</data>
<data
name="READ_CD_LBA_1_Block_Size_2_Transfer_Length_3_Expected_Sector_Type_4_DAP_5_Relative_Address_6_Sync_7_Headers_8_User_Data_9_ECC_EDC_10_C2_11_Subchannel_12_Sense_13_Last_Error_14_took_0_ms"
xml:space="preserve">
<value>READ CD (LBA: {1}, Block Size: {2}, Transfer Length: {3}, Expected Sector Type: {4}, DAP: {5}, Relative Address: {6}, Sync: {7}, Headers: {8}, User Data: {9}, ECC/EDC: {10}, C2: {11}, Subchannel: {12}, Sense: {13}, Last Error: {14}) took {0} ms.</value>
</data>
<data
name="READ_CD_MSF_Start_MSF_1_End_MSF_2_Block_Size_3_Expected_Sector_Type_4_DAP_5_Sync_6_Headers_7_User_Data_8_ECC_EDC_9_C2_10_Subchannel_11_Sense_12_LastError_13_took_0_ms"
xml:space="preserve">
<value>READ CD MSF (Start MSF: {1}, End MSF: {2}, Block Size: {3}, Expected Sector Type: {4}, DAP: {5}, Sync: {6}, Headers: {7}, User Data: {8}, ECC/EDC: {9}, C2: {10}, Subchannel: {11}, Sense: {12}, LastError: {13}) took {0} ms.</value>
</data>
<data name="PREVENT_ALLOW_MEDIUM_REMOVAL_Persistent_1_Prevent_2_Sense_3_LastError_4_took_0_ms" xml:space="preserve">
<value>PREVENT ALLOW MEDIUM REMOVAL (Persistent: {1}, Prevent: {2}, Sense: {3}, LastError: {4}) took {0} ms.</value>
</data>
<data
name="START_STOP_UNIT_Immediate_1_FormatLayer_2_Power_Conditions_3_Change_Format_Layer_4_Load_Eject_5_Start_6_Sense_7_Last_Error_8_took_0_ms"
xml:space="preserve">
<value>START STOP UNIT (Immediate: {1}, FormatLayer: {2}, Power Conditions: {3}, Change Format Layer: {4}, Load/Eject: {5}, Start: {6}, Sense: {7}, Last Error: {8}) took {0} ms.</value>
</data>
<data name="READ_READ_SUB_CHANNEL_MCN_Sense_1_Last_Error_2_took_0_ms" xml:space="preserve">
<value>READ READ SUB-CHANNEL (MCN, Sense {1}, Last Error {2}) took {0} ms.</value>
</data>
<data name="READ_READ_SUB_CHANNEL_ISRC_Track_Number_1_Sense_2_Last_Error_3_took_0_ms" xml:space="preserve">
<value>READ READ SUB-CHANNEL (ISRC, Track Number: {1}, Sense: {2}, Last Error: {3}) took {0} ms.</value>
</data>
<data name="SET_CD_SPEED_Rotational_Control_1_Read_Speed_2_Write_Speed_3_Sense_4_Last_Error_5_took_0_ms"
xml:space="preserve">
<value>SET CD SPEED (Rotational Control: {1}, Read Speed: {2}, Write Speed: {3}, Sense: {4}, Last Error: {5}) took {0} ms.</value>
</data>
<data name="READ_TRACK_INFORMATION_Data_Type_1_Sense_2_Last_Error_3_took_0_ms" xml:space="preserve">
<value>READ TRACK INFORMATION (Data Type: {1}, Sense: {2}, Last Error: {3}) took {0} ms.</value>
</data>
<data name="NEC_READ_CD_DA_took_0_ms" xml:space="preserve">
<value>NEC READ CD-DA took {0} ms.</value>
</data>
<data name="MEDIUM_SCAN_took_0_ms" xml:space="preserve">
<value>MEDIUM SCAN took {0} ms.</value>
</data>
<data name="PIONEER_READ_CD_DA_took_0_ms" xml:space="preserve">
<value>PIONEER READ CD-DA took {0} ms.</value>
</data>
<data name="PIONEER_READ_CD_DA_MSF_took_0_ms" xml:space="preserve">
<value>PIONEER READ CD-DA MSF took {0} ms.</value>
</data>
<data name="PIONEER_READ_CD_XA_took_0_ms" xml:space="preserve">
<value>PIONEER READ CD-XA took {0} ms.</value>
</data>
<data name="PLASMON_READ_SECTOR_LOCATION_took_0_ms" xml:space="preserve">
<value>PLASMON READ SECTOR LOCATION took {0} ms.</value>
</data>
<data name="Plextor_READ_CD_DA_LBA_1_Block_Size_2_Transfer_Length_3_Subchannel_4_Sense_5_Last_Error_6_took_0_ms"
xml:space="preserve">
<value>Plextor READ CD-DA (LBA: {1}, Block Size: {2}, Transfer Length: {3}, Subchannel: {4}, Sense: {5}, Last Error: {6}) took {0} ms.</value>
</data>
<data name="Plextor_READ_DVD_RAW_took_0_ms" xml:space="preserve">
<value>Plextor READ DVD (RAW) took {0} ms.</value>
</data>
<data name="PLEXTOR_READ_EEPROM_took_0_ms" xml:space="preserve">
<value>PLEXTOR READ EEPROM took {0} ms.</value>
</data>
<data name="PLEXTOR_POWEREC_GET_SPEEDS_took_0_ms" xml:space="preserve">
<value>PLEXTOR POWEREC GET SPEEDS took {0} ms.</value>
</data>
<data name="PLEXTOR_GET_SILENT_MODE_took_0_ms" xml:space="preserve">
<value>PLEXTOR GET SILENT MODE took {0} ms.</value>
</data>
<data name="PLEXTOR_GET_GIGAREC_took_0_ms" xml:space="preserve">
<value>PLEXTOR GET GIGAREC took {0} ms.</value>
</data>
<data name="PLEXTOR_GET_VARIREC_took_0_ms" xml:space="preserve">
<value>PLEXTOR GET VARIREC took {0} ms.</value>
</data>
<data name="PLEXTOR_GET_SECUREC_took_0_ms" xml:space="preserve">
<value>PLEXTOR GET SECUREC took {0} ms.</value>
</data>
<data name="PLEXTOR_GET_SPEEDREAD_took_0_ms" xml:space="preserve">
<value>PLEXTOR GET SPEEDREAD took {0} ms.</value>
</data>
<data name="PLEXTOR_GET_SINGLE_SESSION_HIDE_CD_R_took_0_ms" xml:space="preserve">
<value>PLEXTOR GET SINGLE-SESSION / HIDE CD-R took {0} ms.</value>
</data>
<data name="PLEXTOR_GET_BOOK_BITSETTING_took_0_ms" xml:space="preserve">
<value>PLEXTOR GET BOOK BITSETTING took {0} ms.</value>
</data>
<data name="PLEXTOR_GET_TEST_WRITE_DVD_took_0_ms" xml:space="preserve">
<value>PLEXTOR GET TEST WRITE DVD+ took {0} ms.</value>
</data>
<data name="READ_6_took_0_ms" xml:space="preserve">
<value>READ (6) took {0} ms.</value>
</data>
<data name="READ_10_took_0_ms" xml:space="preserve">
<value>READ (10) took {0} ms.</value>
</data>
<data name="READ_12_took_0_ms" xml:space="preserve">
<value>READ (12) took {0} ms.</value>
</data>
<data name="READ_16_took_0_ms" xml:space="preserve">
<value>READ (16) took {0} ms.</value>
</data>
<data name="READ_LONG_10_took_0_ms" xml:space="preserve">
<value>READ LONG (10) took {0} ms.</value>
</data>
<data name="READ_LONG_16_took_0_ms" xml:space="preserve">
<value>READ LONG (16) took {0} ms.</value>
</data>
<data name="SEEK_6_took_0_ms" xml:space="preserve">
<value>SEEK (6) took {0} ms.</value>
</data>
<data name="SEEK_10_took_0_ms" xml:space="preserve">
<value>SEEK (10) took {0} ms.</value>
</data>
<data name="READ_ATTRIBUTE_took_0_ms" xml:space="preserve">
<value>READ ATTRIBUTE took {0} ms.</value>
</data>
<data name="INQUIRY_took_0_ms" xml:space="preserve">
<value>INQUIRY took {0} ms.</value>
</data>
<data name="TEST_UNIT_READY_took_0_ms" xml:space="preserve">
<value>TEST UNIT READY took {0} ms.</value>
</data>
<data name="MODE_SENSE_6_took_0_ms" xml:space="preserve">
<value>MODE SENSE(6) took {0} ms.</value>
</data>
<data name="MODE_SENSE_10_took_0_ms" xml:space="preserve">
<value>MODE SENSE(10) took {0} ms.</value>
</data>
<data name="PREVENT_ALLOW_MEDIUM_REMOVAL_took_0_ms" xml:space="preserve">
<value>PREVENT ALLOW MEDIUM REMOVAL took {0} ms.</value>
</data>
<data name="READ_CAPACITY_took_0_ms" xml:space="preserve">
<value>READ CAPACITY took {0} ms.</value>
</data>
<data name="READ_CAPACITY_16_took_0_ms" xml:space="preserve">
<value>READ CAPACITY(16) took {0} ms.</value>
</data>
<data name="READ_MEDIA_SERIAL_NUMBER_took_0_ms" xml:space="preserve">
<value>READ MEDIA SERIAL NUMBER took {0} ms.</value>
</data>
<data name="MODE_SELECT_6_took_0_ms" xml:space="preserve">
<value>MODE SELECT(6) took {0} ms.</value>
</data>
<data name="MODE_SELECT_10_took_0_ms" xml:space="preserve">
<value>MODE SELECT(10) took {0} ms.</value>
</data>
<data name="REQUEST_SENSE_took_0_ms" xml:space="preserve">
<value>REQUEST SENSE took {0} ms.</value>
</data>
<data name="LOAD_UNLOAD_6_took_0_ms" xml:space="preserve">
<value>LOAD UNLOAD (6) took {0} ms.</value>
</data>
<data name="LOCATE_10_took_0_ms" xml:space="preserve">
<value>LOCATE (10) took {0} ms.</value>
</data>
<data name="LOCATE_16_took_0_ms" xml:space="preserve">
<value>LOCATE (16) took {0} ms.</value>
</data>
<data name="READ_BLOCK_LIMITS_took_0_ms" xml:space="preserve">
<value>READ BLOCK LIMITS took {0} ms.</value>
</data>
<data name="READ_POSITION_took_0_ms" xml:space="preserve">
<value>READ POSITION took {0} ms.</value>
</data>
<data name="READ_REVERSE_6_took_0_ms" xml:space="preserve">
<value>READ REVERSE (6) took {0} ms.</value>
</data>
<data name="READ_REVERSE_16_took_0_ms" xml:space="preserve">
<value>READ REVERSE (16) took {0} ms.</value>
</data>
<data name="RECOVER_BUFFERED_DATA_took_0_ms" xml:space="preserve">
<value>RECOVER BUFFERED DATA took {0} ms.</value>
</data>
<data name="REPORT_DENSITY_SUPPORT_took_0_ms" xml:space="preserve">
<value>REPORT DENSITY SUPPORT took {0} ms.</value>
</data>
<data name="REWIND_took_0_ms" xml:space="preserve">
<value>REWIND took {0} ms.</value>
</data>
<data name="TRACK_SELECT_took_0_ms" xml:space="preserve">
<value>TRACK SELECT took {0} ms.</value>
</data>
<data name="SPACE_took_0_ms" xml:space="preserve">
<value>SPACE took {0} ms.</value>
</data>
<data name="SYQUEST_READ_6_took_0_ms" xml:space="preserve">
<value>SYQUEST READ (6) took {0} ms.</value>
</data>
<data name="SYQUEST_READ_10_took_0_ms" xml:space="preserve">
<value>SYQUEST READ (10) took {0} ms.</value>
</data>
<data name="Platform_0_not_yet_supported" xml:space="preserve">
<value>Platform {0} not yet supported.</value>
</data>
<data name="Invalid_remote_URI" xml:space="preserve">
<value>Invalid remote URI.</value>
</data>
<data name="Error_connecting_to_host" xml:space="preserve">
<value>Error connecting to host.</value>
</data>
<data name="Invalid_remote_protocol" xml:space="preserve">
<value>Invalid remote protocol.</value>
</data>
<data name="Host_not_found" xml:space="preserve">
<value>Host not found</value>
</data>
<data name="Connected_to_0" xml:space="preserve">
<value>Connected to {0}</value>
</data>
<data name="Could_not_read_from_the_network" xml:space="preserve">
<value>Could not read from the network...</value>
</data>
<data name="Received_data_is_not_an_Aaru_Remote_Packet" xml:space="preserve">
<value>Received data is not an Aaru Remote Packet...</value>
</data>
<data name="Expected_Hello_Packet_got_packet_type_0" xml:space="preserve">
<value>Expected Hello Packet, got packet type {0}...</value>
</data>
<data name="Unrecognized_packet_version" xml:space="preserve">
<value>Unrecognized packet version...</value>
</data>
<data name="Could_not_write_to_the_network" xml:space="preserve">
<value>Could not write to the network...</value>
</data>
<data name="Remote_IsRoot_Expected_Am_I_Root_Response_Packet_got_packet_type_0" xml:space="preserve">
<value>Expected Am I Root? Response Packet, got packet type {0}...</value>
</data>
<data name="Remote_ListDevices_Expected_List_Devices_Response_Packet_got_packet_type_0" xml:space="preserve">
<value>Expected List Devices Response Packet, got packet type {0}...</value>
</data>
<data name="Expected_SCSI_Response_Packet_got_packet_type_0" xml:space="preserve">
<value>Expected SCSI Response Packet, got packet type {0}...</value>
</data>
<data name="Expected_ATA_CHS_Response_Packet_got_packet_type_0" xml:space="preserve">
<value>Expected ATA CHS Response Packet, got packet type {0}...</value>
</data>
<data name="Expected_ATA_LBA28_Response_Packet_got_packet_type_0" xml:space="preserve">
<value>Expected ATA LBA28 Response Packet, got packet type {0}...</value>
</data>
<data name="Expected_ATA_LBA48_Response_Packet_got_packet_type_0" xml:space="preserve">
<value>Expected ATA LBA48 Response Packet, got packet type {0}...</value>
</data>
<data name="Expected_SDHCI_Response_Packet_got_packet_type_0" xml:space="preserve">
<value>Expected SDHCI Response Packet, got packet type {0}...</value>
</data>
<data name="Expected_Device_Type_Response_Packet_got_packet_type_0" xml:space="preserve">
<value>Expected Device Type Response Packet, got packet type {0}...</value>
</data>
<data name="Expected_USB_Data_Response_Packet_got_packet_type_0" xml:space="preserve">
<value>Expected USB Data Response Packet, got packet type {0}...</value>
</data>
<data name="Expected_FireWire_Data_Response_Packet_got_packet_type_0" xml:space="preserve">
<value>Expected FireWire Data Response Packet, got packet type {0}...</value>
</data>
<data name="Expected_PCMCIA_Data_Response_Packet_got_packet_type_0" xml:space="preserve">
<value>Expected PCMCIA Data Response Packet, got packet type {0}...</value>
</data>
<data name="Expected_multi_MMC_SD_command_Response_Packet_got_packet_type_0" xml:space="preserve">
<value>Expected multi MMC/SD command Response Packet, got packet type {0}...</value>
</data>
<data name="Expected_the_response_to_0_SD_MMC_commands_but_got_1_responses" xml:space="preserve">
<value>Expected the response to {0} SD/MMC commands, but got {1} responses...</value>
</data>
<data name="Expected_NOP_Packet_got_packet_type_0" xml:space="preserve">
<value>Expected NOP Packet, got packet type {0}...</value>
</data>
<data name="ReOpen_error_closing_device" xml:space="preserve">
<value>ReOpen error closing device...</value>
</data>
<data name="ReOpen_error_0_with_reason_1" xml:space="preserve">
<value>ReOpen error {0} with reason: {1}...</value>
</data>
<data name="Expected_OS_Read_Response_Packet_got_packet_type_0" xml:space="preserve">
<value>Expected OS Read Response Packet, got packet type {0}...</value>
</data>
<data name="Remote_error_0_in_OS_Read" xml:space="preserve">
<value>Remote error {0} in OS Read...</value>
</data>
</root>

View File

@@ -64,7 +64,7 @@ public class Remote : IDisposable
{
if(uri.Scheme != "aaru" &&
uri.Scheme != "dic")
throw new ArgumentException("Invalid remote protocol.", nameof(uri.Scheme));
throw new ArgumentException(Localization.Invalid_remote_protocol, nameof(uri.Scheme));
_host = uri.DnsSafeHost;
@@ -77,7 +77,7 @@ public class Remote : IDisposable
if(ipAddress is null)
{
AaruConsole.ErrorWriteLine("Host not found");
AaruConsole.ErrorWriteLine(Localization.Host_not_found);
throw new SocketException(11001);
}
@@ -87,7 +87,7 @@ public class Remote : IDisposable
_socket.Connect(ipEndPoint);
AaruConsole.WriteLine("Connected to {0}", uri.Host);
AaruConsole.WriteLine(Localization.Connected_to_0, uri.Host);
byte[] hdrBuf = new byte[Marshal.SizeOf<AaruPacketHeader>()];
@@ -95,7 +95,7 @@ public class Remote : IDisposable
if(len < hdrBuf.Length)
{
AaruConsole.ErrorWriteLine("Could not read from the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_read_from_the_network);
throw new IOException();
}
@@ -105,7 +105,7 @@ public class Remote : IDisposable
if(hdr.remote_id != Consts.REMOTE_ID ||
hdr.packet_id != Consts.PACKET_ID)
{
AaruConsole.ErrorWriteLine("Received data is not an Aaru Remote Packet...");
AaruConsole.ErrorWriteLine(Localization.Received_data_is_not_an_Aaru_Remote_Packet);
throw new ArgumentException();
}
@@ -116,7 +116,7 @@ public class Remote : IDisposable
{
if(hdr.packetType != AaruPacketType.Nop)
{
AaruConsole.ErrorWriteLine("Expected Hello Packet, got packet type {0}...", hdr.packetType);
AaruConsole.ErrorWriteLine(Localization.Expected_Hello_Packet_got_packet_type_0, hdr.packetType);
throw new ArgumentException();
}
@@ -126,7 +126,7 @@ public class Remote : IDisposable
if(len < buf.Length)
{
AaruConsole.ErrorWriteLine("Could not read from the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_read_from_the_network);
throw new IOException();
}
@@ -140,7 +140,7 @@ public class Remote : IDisposable
if(hdr.version != Consts.PACKET_VERSION)
{
AaruConsole.ErrorWriteLine("Unrecognized packet version...");
AaruConsole.ErrorWriteLine(Localization.Unrecognized_packet_version);
throw new ArgumentException();
}
@@ -150,7 +150,7 @@ public class Remote : IDisposable
if(len < buf.Length)
{
AaruConsole.ErrorWriteLine("Could not read from the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_read_from_the_network);
throw new IOException();
}
@@ -189,7 +189,7 @@ public class Remote : IDisposable
if(len >= buf.Length)
return;
AaruConsole.ErrorWriteLine("Could not write to the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_write_to_the_network);
throw new IOException();
}
@@ -230,7 +230,7 @@ public class Remote : IDisposable
if(len != buf.Length)
{
AaruConsole.ErrorWriteLine("Could not write to the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_write_to_the_network);
return false;
}
@@ -241,7 +241,7 @@ public class Remote : IDisposable
if(len < hdrBuf.Length)
{
AaruConsole.ErrorWriteLine("Could not read from the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_read_from_the_network);
return false;
}
@@ -251,14 +251,15 @@ public class Remote : IDisposable
if(hdr.remote_id != Consts.REMOTE_ID ||
hdr.packet_id != Consts.PACKET_ID)
{
AaruConsole.ErrorWriteLine("Received data is not an Aaru Remote Packet...");
AaruConsole.ErrorWriteLine(Localization.Received_data_is_not_an_Aaru_Remote_Packet);
return false;
}
if(hdr.packetType != AaruPacketType.ResponseAmIRoot)
{
AaruConsole.ErrorWriteLine("Expected Am I Root? Response Packet, got packet type {0}...",
AaruConsole.
ErrorWriteLine(Localization.Remote_IsRoot_Expected_Am_I_Root_Response_Packet_got_packet_type_0,
hdr.packetType);
return false;
@@ -269,7 +270,7 @@ public class Remote : IDisposable
if(len < buf.Length)
{
AaruConsole.ErrorWriteLine("Could not read from the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_read_from_the_network);
return false;
}
@@ -319,7 +320,7 @@ public class Remote : IDisposable
if(len != buf.Length)
{
AaruConsole.ErrorWriteLine("Could not write to the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_write_to_the_network);
return Array.Empty<DeviceInfo>();
}
@@ -330,7 +331,7 @@ public class Remote : IDisposable
if(len < hdrBuf.Length)
{
AaruConsole.ErrorWriteLine("Could not read from the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_read_from_the_network);
return Array.Empty<DeviceInfo>();
}
@@ -340,7 +341,7 @@ public class Remote : IDisposable
if(hdr.remote_id != Consts.REMOTE_ID ||
hdr.packet_id != Consts.PACKET_ID)
{
AaruConsole.ErrorWriteLine("Received data is not an Aaru Remote Packet...");
AaruConsole.ErrorWriteLine(Localization.Received_data_is_not_an_Aaru_Remote_Packet);
return Array.Empty<DeviceInfo>();
}
@@ -349,7 +350,8 @@ public class Remote : IDisposable
{
if(hdr.packetType != AaruPacketType.Nop)
{
AaruConsole.ErrorWriteLine("Expected List Devices Response Packet, got packet type {0}...",
AaruConsole.
ErrorWriteLine(Localization.Remote_ListDevices_Expected_List_Devices_Response_Packet_got_packet_type_0,
hdr.packetType);
return Array.Empty<DeviceInfo>();
@@ -360,7 +362,7 @@ public class Remote : IDisposable
if(len < buf.Length)
{
AaruConsole.ErrorWriteLine("Could not read from the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_read_from_the_network);
return Array.Empty<DeviceInfo>();
}
@@ -374,7 +376,7 @@ public class Remote : IDisposable
if(hdr.version != Consts.PACKET_VERSION)
{
AaruConsole.ErrorWriteLine("Unrecognized packet version...");
AaruConsole.ErrorWriteLine(Localization.Unrecognized_packet_version);
return Array.Empty<DeviceInfo>();
}
@@ -384,7 +386,7 @@ public class Remote : IDisposable
if(len < buf.Length)
{
AaruConsole.ErrorWriteLine("Could not read from the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_read_from_the_network);
return Array.Empty<DeviceInfo>();
}
@@ -392,7 +394,7 @@ public class Remote : IDisposable
AaruPacketResponseListDevices response =
Marshal.ByteArrayToStructureLittleEndian<AaruPacketResponseListDevices>(buf);
List<DeviceInfo> devices = new List<DeviceInfo>();
List<DeviceInfo> devices = new();
int offset = Marshal.SizeOf<AaruPacketResponseListDevices>();
int devInfoLen = Marshal.SizeOf<DeviceInfo>();
@@ -438,7 +440,7 @@ public class Remote : IDisposable
if(len != buf.Length)
{
AaruConsole.ErrorWriteLine("Could not write to the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_write_to_the_network);
lastError = -1;
return false;
@@ -450,7 +452,7 @@ public class Remote : IDisposable
if(len < hdrBuf.Length)
{
AaruConsole.ErrorWriteLine("Could not read from the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_read_from_the_network);
lastError = -1;
return false;
@@ -461,7 +463,7 @@ public class Remote : IDisposable
if(hdr.remote_id != Consts.REMOTE_ID ||
hdr.packet_id != Consts.PACKET_ID)
{
AaruConsole.ErrorWriteLine("Received data is not an Aaru Remote Packet...");
AaruConsole.ErrorWriteLine(Localization.Received_data_is_not_an_Aaru_Remote_Packet);
lastError = -1;
return false;
@@ -469,7 +471,9 @@ public class Remote : IDisposable
if(hdr.packetType != AaruPacketType.Nop)
{
AaruConsole.ErrorWriteLine("Expected List Devices Response Packet, got packet type {0}...", hdr.packetType);
AaruConsole.
ErrorWriteLine(Localization.Remote_ListDevices_Expected_List_Devices_Response_Packet_got_packet_type_0,
hdr.packetType);
lastError = -1;
@@ -481,7 +485,7 @@ public class Remote : IDisposable
if(len < buf.Length)
{
AaruConsole.ErrorWriteLine("Could not read from the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_read_from_the_network);
lastError = -1;
return false;
@@ -556,7 +560,7 @@ public class Remote : IDisposable
if(len != buf.Length)
{
AaruConsole.ErrorWriteLine("Could not write to the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_write_to_the_network);
return -1;
}
@@ -567,7 +571,7 @@ public class Remote : IDisposable
if(len < hdrBuf.Length)
{
AaruConsole.ErrorWriteLine("Could not read from the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_read_from_the_network);
return -1;
}
@@ -577,14 +581,14 @@ public class Remote : IDisposable
if(hdr.remote_id != Consts.REMOTE_ID ||
hdr.packet_id != Consts.PACKET_ID)
{
AaruConsole.ErrorWriteLine("Received data is not an Aaru Remote Packet...");
AaruConsole.ErrorWriteLine(Localization.Received_data_is_not_an_Aaru_Remote_Packet);
return -1;
}
if(hdr.packetType != AaruPacketType.ResponseScsi)
{
AaruConsole.ErrorWriteLine("Expected SCSI Response Packet, got packet type {0}...", hdr.packetType);
AaruConsole.ErrorWriteLine(Localization.Expected_SCSI_Response_Packet_got_packet_type_0, hdr.packetType);
return -1;
}
@@ -594,7 +598,7 @@ public class Remote : IDisposable
if(len < buf.Length)
{
AaruConsole.ErrorWriteLine("Could not read from the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_read_from_the_network);
return -1;
}
@@ -666,7 +670,7 @@ public class Remote : IDisposable
if(len != buf.Length)
{
AaruConsole.ErrorWriteLine("Could not write to the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_write_to_the_network);
return -1;
}
@@ -677,7 +681,7 @@ public class Remote : IDisposable
if(len < hdrBuf.Length)
{
AaruConsole.ErrorWriteLine("Could not read from the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_read_from_the_network);
return -1;
}
@@ -687,14 +691,14 @@ public class Remote : IDisposable
if(hdr.remote_id != Consts.REMOTE_ID ||
hdr.packet_id != Consts.PACKET_ID)
{
AaruConsole.ErrorWriteLine("Received data is not an Aaru Remote Packet...");
AaruConsole.ErrorWriteLine(Localization.Received_data_is_not_an_Aaru_Remote_Packet);
return -1;
}
if(hdr.packetType != AaruPacketType.ResponseAtaChs)
{
AaruConsole.ErrorWriteLine("Expected ATA CHS Response Packet, got packet type {0}...", hdr.packetType);
AaruConsole.ErrorWriteLine(Localization.Expected_ATA_CHS_Response_Packet_got_packet_type_0, hdr.packetType);
return -1;
}
@@ -704,7 +708,7 @@ public class Remote : IDisposable
if(len < buf.Length)
{
AaruConsole.ErrorWriteLine("Could not read from the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_read_from_the_network);
return -1;
}
@@ -775,7 +779,7 @@ public class Remote : IDisposable
if(len != buf.Length)
{
AaruConsole.ErrorWriteLine("Could not write to the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_write_to_the_network);
return -1;
}
@@ -786,7 +790,7 @@ public class Remote : IDisposable
if(len < hdrBuf.Length)
{
AaruConsole.ErrorWriteLine("Could not read from the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_read_from_the_network);
return -1;
}
@@ -796,14 +800,15 @@ public class Remote : IDisposable
if(hdr.remote_id != Consts.REMOTE_ID ||
hdr.packet_id != Consts.PACKET_ID)
{
AaruConsole.ErrorWriteLine("Received data is not an Aaru Remote Packet...");
AaruConsole.ErrorWriteLine(Localization.Received_data_is_not_an_Aaru_Remote_Packet);
return -1;
}
if(hdr.packetType != AaruPacketType.ResponseAtaLba28)
{
AaruConsole.ErrorWriteLine("Expected ATA LBA28 Response Packet, got packet type {0}...", hdr.packetType);
AaruConsole.ErrorWriteLine(Localization.Expected_ATA_LBA28_Response_Packet_got_packet_type_0,
hdr.packetType);
return -1;
}
@@ -813,7 +818,7 @@ public class Remote : IDisposable
if(len < buf.Length)
{
AaruConsole.ErrorWriteLine("Could not read from the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_read_from_the_network);
return -1;
}
@@ -884,7 +889,7 @@ public class Remote : IDisposable
if(len != buf.Length)
{
AaruConsole.ErrorWriteLine("Could not write to the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_write_to_the_network);
return -1;
}
@@ -895,7 +900,7 @@ public class Remote : IDisposable
if(len < hdrBuf.Length)
{
AaruConsole.ErrorWriteLine("Could not read from the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_read_from_the_network);
return -1;
}
@@ -905,14 +910,15 @@ public class Remote : IDisposable
if(hdr.remote_id != Consts.REMOTE_ID ||
hdr.packet_id != Consts.PACKET_ID)
{
AaruConsole.ErrorWriteLine("Received data is not an Aaru Remote Packet...");
AaruConsole.ErrorWriteLine(Localization.Received_data_is_not_an_Aaru_Remote_Packet);
return -1;
}
if(hdr.packetType != AaruPacketType.ResponseAtaLba48)
{
AaruConsole.ErrorWriteLine("Expected ATA LBA48 Response Packet, got packet type {0}...", hdr.packetType);
AaruConsole.ErrorWriteLine(Localization.Expected_ATA_LBA48_Response_Packet_got_packet_type_0,
hdr.packetType);
return -1;
}
@@ -922,7 +928,7 @@ public class Remote : IDisposable
if(len < buf.Length)
{
AaruConsole.ErrorWriteLine("Could not read from the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_read_from_the_network);
return -1;
}
@@ -999,7 +1005,7 @@ public class Remote : IDisposable
if(len != buf.Length)
{
AaruConsole.ErrorWriteLine("Could not write to the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_write_to_the_network);
return -1;
}
@@ -1010,7 +1016,7 @@ public class Remote : IDisposable
if(len < hdrBuf.Length)
{
AaruConsole.ErrorWriteLine("Could not read from the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_read_from_the_network);
return -1;
}
@@ -1020,14 +1026,14 @@ public class Remote : IDisposable
if(hdr.remote_id != Consts.REMOTE_ID ||
hdr.packet_id != Consts.PACKET_ID)
{
AaruConsole.ErrorWriteLine("Received data is not an Aaru Remote Packet...");
AaruConsole.ErrorWriteLine(Localization.Received_data_is_not_an_Aaru_Remote_Packet);
return -1;
}
if(hdr.packetType != AaruPacketType.ResponseSdhci)
{
AaruConsole.ErrorWriteLine("Expected SDHCI Response Packet, got packet type {0}...", hdr.packetType);
AaruConsole.ErrorWriteLine(Localization.Expected_SDHCI_Response_Packet_got_packet_type_0, hdr.packetType);
return -1;
}
@@ -1037,7 +1043,7 @@ public class Remote : IDisposable
if(len < buf.Length)
{
AaruConsole.ErrorWriteLine("Could not read from the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_read_from_the_network);
return -1;
}
@@ -1081,7 +1087,7 @@ public class Remote : IDisposable
if(len != buf.Length)
{
AaruConsole.ErrorWriteLine("Could not write to the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_write_to_the_network);
return DeviceType.Unknown;
}
@@ -1092,7 +1098,7 @@ public class Remote : IDisposable
if(len < hdrBuf.Length)
{
AaruConsole.ErrorWriteLine("Could not read from the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_read_from_the_network);
return DeviceType.Unknown;
}
@@ -1102,14 +1108,15 @@ public class Remote : IDisposable
if(hdr.remote_id != Consts.REMOTE_ID ||
hdr.packet_id != Consts.PACKET_ID)
{
AaruConsole.ErrorWriteLine("Received data is not an Aaru Remote Packet...");
AaruConsole.ErrorWriteLine(Localization.Received_data_is_not_an_Aaru_Remote_Packet);
return DeviceType.Unknown;
}
if(hdr.packetType != AaruPacketType.ResponseGetType)
{
AaruConsole.ErrorWriteLine("Expected Device Type Response Packet, got packet type {0}...", hdr.packetType);
AaruConsole.ErrorWriteLine(Localization.Expected_Device_Type_Response_Packet_got_packet_type_0,
hdr.packetType);
return DeviceType.Unknown;
}
@@ -1119,7 +1126,7 @@ public class Remote : IDisposable
if(len < buf.Length)
{
AaruConsole.ErrorWriteLine("Could not read from the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_read_from_the_network);
return DeviceType.Unknown;
}
@@ -1160,7 +1167,7 @@ public class Remote : IDisposable
if(len != buf.Length)
{
AaruConsole.ErrorWriteLine("Could not write to the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_write_to_the_network);
return false;
}
@@ -1171,7 +1178,7 @@ public class Remote : IDisposable
if(len < hdrBuf.Length)
{
AaruConsole.ErrorWriteLine("Could not read from the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_read_from_the_network);
return false;
}
@@ -1181,14 +1188,15 @@ public class Remote : IDisposable
if(hdr.remote_id != Consts.REMOTE_ID ||
hdr.packet_id != Consts.PACKET_ID)
{
AaruConsole.ErrorWriteLine("Received data is not an Aaru Remote Packet...");
AaruConsole.ErrorWriteLine(Localization.Received_data_is_not_an_Aaru_Remote_Packet);
return false;
}
if(hdr.packetType != AaruPacketType.ResponseGetSdhciRegisters)
{
AaruConsole.ErrorWriteLine("Expected Device Type Response Packet, got packet type {0}...", hdr.packetType);
AaruConsole.ErrorWriteLine(Localization.Expected_Device_Type_Response_Packet_got_packet_type_0,
hdr.packetType);
return false;
}
@@ -1198,7 +1206,7 @@ public class Remote : IDisposable
if(len < buf.Length)
{
AaruConsole.ErrorWriteLine("Could not read from the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_read_from_the_network);
return false;
}
@@ -1288,7 +1296,7 @@ public class Remote : IDisposable
if(len != buf.Length)
{
AaruConsole.ErrorWriteLine("Could not write to the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_write_to_the_network);
return false;
}
@@ -1299,7 +1307,7 @@ public class Remote : IDisposable
if(len < hdrBuf.Length)
{
AaruConsole.ErrorWriteLine("Could not read from the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_read_from_the_network);
return false;
}
@@ -1309,14 +1317,15 @@ public class Remote : IDisposable
if(hdr.remote_id != Consts.REMOTE_ID ||
hdr.packet_id != Consts.PACKET_ID)
{
AaruConsole.ErrorWriteLine("Received data is not an Aaru Remote Packet...");
AaruConsole.ErrorWriteLine(Localization.Received_data_is_not_an_Aaru_Remote_Packet);
return false;
}
if(hdr.packetType != AaruPacketType.ResponseGetUsbData)
{
AaruConsole.ErrorWriteLine("Expected USB Data Response Packet, got packet type {0}...", hdr.packetType);
AaruConsole.ErrorWriteLine(Localization.Expected_USB_Data_Response_Packet_got_packet_type_0,
hdr.packetType);
return false;
}
@@ -1326,7 +1335,7 @@ public class Remote : IDisposable
if(len < buf.Length)
{
AaruConsole.ErrorWriteLine("Could not read from the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_read_from_the_network);
return false;
}
@@ -1381,7 +1390,7 @@ public class Remote : IDisposable
if(len != buf.Length)
{
AaruConsole.ErrorWriteLine("Could not write to the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_write_to_the_network);
return false;
}
@@ -1392,7 +1401,7 @@ public class Remote : IDisposable
if(len < hdrBuf.Length)
{
AaruConsole.ErrorWriteLine("Could not read from the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_read_from_the_network);
return false;
}
@@ -1402,14 +1411,14 @@ public class Remote : IDisposable
if(hdr.remote_id != Consts.REMOTE_ID ||
hdr.packet_id != Consts.PACKET_ID)
{
AaruConsole.ErrorWriteLine("Received data is not an Aaru Remote Packet...");
AaruConsole.ErrorWriteLine(Localization.Received_data_is_not_an_Aaru_Remote_Packet);
return false;
}
if(hdr.packetType != AaruPacketType.ResponseGetFireWireData)
{
AaruConsole.ErrorWriteLine("Expected FireWire Data Response Packet, got packet type {0}...",
AaruConsole.ErrorWriteLine(Localization.Expected_FireWire_Data_Response_Packet_got_packet_type_0,
hdr.packetType);
return false;
@@ -1420,7 +1429,7 @@ public class Remote : IDisposable
if(len < buf.Length)
{
AaruConsole.ErrorWriteLine("Could not read from the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_read_from_the_network);
return false;
}
@@ -1464,7 +1473,7 @@ public class Remote : IDisposable
if(len != buf.Length)
{
AaruConsole.ErrorWriteLine("Could not write to the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_write_to_the_network);
return false;
}
@@ -1475,7 +1484,7 @@ public class Remote : IDisposable
if(len < hdrBuf.Length)
{
AaruConsole.ErrorWriteLine("Could not read from the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_read_from_the_network);
return false;
}
@@ -1485,14 +1494,15 @@ public class Remote : IDisposable
if(hdr.remote_id != Consts.REMOTE_ID ||
hdr.packet_id != Consts.PACKET_ID)
{
AaruConsole.ErrorWriteLine("Received data is not an Aaru Remote Packet...");
AaruConsole.ErrorWriteLine(Localization.Received_data_is_not_an_Aaru_Remote_Packet);
return false;
}
if(hdr.packetType != AaruPacketType.ResponseGetPcmciaData)
{
AaruConsole.ErrorWriteLine("Expected PCMCIA Data Response Packet, got packet type {0}...", hdr.packetType);
AaruConsole.ErrorWriteLine(Localization.Expected_PCMCIA_Data_Response_Packet_got_packet_type_0,
hdr.packetType);
return false;
}
@@ -1502,7 +1512,7 @@ public class Remote : IDisposable
if(len < buf.Length)
{
AaruConsole.ErrorWriteLine("Could not read from the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_read_from_the_network);
return false;
}
@@ -1642,7 +1652,7 @@ public class Remote : IDisposable
if(len != buf.Length)
{
AaruConsole.ErrorWriteLine("Could not write to the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_write_to_the_network);
return -1;
}
@@ -1653,7 +1663,7 @@ public class Remote : IDisposable
if(len < hdrBuf.Length)
{
AaruConsole.ErrorWriteLine("Could not read from the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_read_from_the_network);
return -1;
}
@@ -1663,14 +1673,14 @@ public class Remote : IDisposable
if(hdr.remote_id != Consts.REMOTE_ID ||
hdr.packet_id != Consts.PACKET_ID)
{
AaruConsole.ErrorWriteLine("Received data is not an Aaru Remote Packet...");
AaruConsole.ErrorWriteLine(Localization.Received_data_is_not_an_Aaru_Remote_Packet);
return -1;
}
if(hdr.packetType != AaruPacketType.ResponseMultiSdhci)
{
AaruConsole.ErrorWriteLine("Expected multi MMC/SD command Response Packet, got packet type {0}...",
AaruConsole.ErrorWriteLine(Localization.Expected_multi_MMC_SD_command_Response_Packet_got_packet_type_0,
hdr.packetType);
return -1;
@@ -1681,7 +1691,7 @@ public class Remote : IDisposable
if(len < buf.Length)
{
AaruConsole.ErrorWriteLine("Could not read from the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_read_from_the_network);
return -1;
}
@@ -1690,7 +1700,7 @@ public class Remote : IDisposable
if(res.cmd_count != (ulong)commands.Length)
{
AaruConsole.ErrorWriteLine("Expected the response to {0} SD/MMC commands, but got {1} responses...",
AaruConsole.ErrorWriteLine(Localization.Expected_the_response_to_0_SD_MMC_commands_but_got_1_responses,
commands.Length, res.cmd_count);
return -1;
@@ -1786,7 +1796,7 @@ public class Remote : IDisposable
if(len != buf.Length)
{
AaruConsole.ErrorWriteLine("Could not write to the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_write_to_the_network);
return false;
}
@@ -1797,7 +1807,7 @@ public class Remote : IDisposable
if(len < hdrBuf.Length)
{
AaruConsole.ErrorWriteLine("Could not read from the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_read_from_the_network);
return false;
}
@@ -1807,21 +1817,21 @@ public class Remote : IDisposable
if(hdr.remote_id != Consts.REMOTE_ID ||
hdr.packet_id != Consts.PACKET_ID)
{
AaruConsole.ErrorWriteLine("Received data is not an Aaru Remote Packet...");
AaruConsole.ErrorWriteLine(Localization.Received_data_is_not_an_Aaru_Remote_Packet);
return false;
}
if(hdr.packetType != AaruPacketType.Nop)
{
AaruConsole.ErrorWriteLine("Expected NOP Packet, got packet type {0}...", hdr.packetType);
AaruConsole.ErrorWriteLine(Localization.Expected_NOP_Packet_got_packet_type_0, hdr.packetType);
return false;
}
if(hdr.version != Consts.PACKET_VERSION)
{
AaruConsole.ErrorWriteLine("Unrecognized packet version...");
AaruConsole.ErrorWriteLine(Localization.Unrecognized_packet_version);
return false;
}
@@ -1831,7 +1841,7 @@ public class Remote : IDisposable
if(len < buf.Length)
{
AaruConsole.ErrorWriteLine("Could not read from the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_read_from_the_network);
return false;
}
@@ -1843,11 +1853,11 @@ public class Remote : IDisposable
case AaruNopReason.ReOpenOk: return true;
case AaruNopReason.CloseError:
case AaruNopReason.OpenError:
AaruConsole.ErrorWriteLine("ReOpen error closing device...");
AaruConsole.ErrorWriteLine(Localization.ReOpen_error_closing_device);
break;
default:
AaruConsole.ErrorWriteLine("ReOpen error {0} with reason: {1}...", nop.errno, nop.reason);
AaruConsole.ErrorWriteLine(Localization.ReOpen_error_0_with_reason_1, nop.errno, nop.reason);
break;
}
@@ -1889,7 +1899,7 @@ public class Remote : IDisposable
if(len != buf.Length)
{
AaruConsole.ErrorWriteLine("Could not write to the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_write_to_the_network);
return false;
}
@@ -1900,7 +1910,7 @@ public class Remote : IDisposable
if(len < hdrBuf.Length)
{
AaruConsole.ErrorWriteLine("Could not read from the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_read_from_the_network);
return false;
}
@@ -1910,21 +1920,21 @@ public class Remote : IDisposable
if(hdr.remote_id != Consts.REMOTE_ID ||
hdr.packet_id != Consts.PACKET_ID)
{
AaruConsole.ErrorWriteLine("Received data is not an Aaru Remote Packet...");
AaruConsole.ErrorWriteLine(Localization.Received_data_is_not_an_Aaru_Remote_Packet);
return false;
}
if(hdr.packetType != AaruPacketType.ResponseOsRead)
{
AaruConsole.ErrorWriteLine("Expected OS Read Response Packet, got packet type {0}...", hdr.packetType);
AaruConsole.ErrorWriteLine(Localization.Expected_OS_Read_Response_Packet_got_packet_type_0, hdr.packetType);
return false;
}
if(hdr.version != Consts.PACKET_VERSION)
{
AaruConsole.ErrorWriteLine("Unrecognized packet version...");
AaruConsole.ErrorWriteLine(Localization.Unrecognized_packet_version);
return false;
}
@@ -1934,7 +1944,7 @@ public class Remote : IDisposable
if(len < buf.Length)
{
AaruConsole.ErrorWriteLine("Could not read from the network...");
AaruConsole.ErrorWriteLine(Localization.Could_not_read_from_the_network);
return false;
}
@@ -1945,7 +1955,7 @@ public class Remote : IDisposable
if(osRead.errno != 0)
{
AaruConsole.ErrorWriteLine("Remote error {0} in OS Read...", osRead.errno);
AaruConsole.ErrorWriteLine(Localization.Remote_error_0_in_OS_Read, osRead.errno);
return false;
}

View File

@@ -84,7 +84,7 @@ partial class Device
Array.Copy(cdb, sptdSb.sptd.Cdb, cdb.Length);
uint k = 0;
var error = 0;
int error = 0;
Marshal.Copy(buffer, 0, sptdSb.sptd.DataBuffer, buffer.Length);
@@ -179,7 +179,7 @@ partial class Device
aptd.AtaFlags |= AtaFlags.DrdyRequired;
uint k = 0;
var error = 0;
int error = 0;
Marshal.Copy(buffer, 0, aptd.DataBuffer, buffer.Length);
@@ -279,7 +279,7 @@ partial class Device
aptd.AtaFlags |= AtaFlags.DrdyRequired;
uint k = 0;
var error = 0;
int error = 0;
Marshal.Copy(buffer, 0, aptd.DataBuffer, buffer.Length);
@@ -388,7 +388,7 @@ partial class Device
aptd.AtaFlags |= AtaFlags.DrdyRequired;
uint k = 0;
var error = 0;
int error = 0;
Marshal.Copy(buffer, 0, aptd.DataBuffer, buffer.Length);
@@ -547,7 +547,8 @@ partial class Device
if(flags.HasFlag(MmcFlags.ResponseR6))
commandDescriptor.responseType = SdResponseType.R6;
var commandB = new byte[commandData.size + commandData.protocolArgumentSize + commandData.deviceDataBufferSize];
byte[] commandB =
new byte[commandData.size + commandData.protocolArgumentSize + commandData.deviceDataBufferSize];
Array.Copy(buffer, 0, commandB, commandData.size + commandData.protocolArgumentSize, buffer.Length);
IntPtr hBuf = Marshal.AllocHGlobal(commandB.Length);
@@ -557,7 +558,7 @@ partial class Device
Marshal.Copy(hBuf, commandB, 0, commandB.Length);
Marshal.FreeHGlobal(hBuf);
var error = 0;
int error = 0;
start = DateTime.Now;
sense = !Extern.DeviceIoControl(_fileHandle, WindowsIoctl.IoctlSffdiskDeviceCommand, commandB,
@@ -585,7 +586,7 @@ partial class Device
if(timeout == 0)
timeout = Timeout > 0 ? Timeout : 15;
var error = 0;
int error = 0;
duration = 0;
sense = false;

View File

@@ -98,10 +98,10 @@ partial class Device : Devices.Device
};
IntPtr descriptorPtr = Marshal.AllocHGlobal(1000);
var descriptorB = new byte[1000];
byte[] descriptorB = new byte[1000];
uint returned = 0;
var error = 0;
int error = 0;
bool hasError = !Extern.DeviceIoControlStorageQuery(dev._fileHandle, WindowsIoctl.IoctlStorageQueryProperty,
ref query, (uint)Marshal.SizeOf(query), descriptorPtr, 1000,
@@ -196,7 +196,7 @@ partial class Device : Devices.Device
if(IsSdhci(dev._fileHandle))
{
var sdBuffer = new byte[16];
byte[] sdBuffer = new byte[16];
dev.LastError = dev.SendMmcCommand(MmcCommands.SendCsd, false, false,
MmcFlags.ResponseSpiR2 | MmcFlags.ResponseR2 | MmcFlags.CommandAc, 0, 16,

View File

@@ -54,8 +54,8 @@ static class ListDevices
var result = new StringBuilder();
const string hexTable = "0123456789abcdef";
for(var i = 0; i < hex.Length / 2; i++)
result.Append((char)(16 * hexTable.IndexOf(hex[2 * i]) + hexTable.IndexOf(hex[2 * i + 1])));
for(int i = 0; i < hex.Length / 2; i++)
result.Append((char)((16 * hexTable.IndexOf(hex[2 * i])) + hexTable.IndexOf(hex[(2 * i) + 1])));
return result.ToString();
}
@@ -65,7 +65,7 @@ static class ListDevices
[SuppressMessage("ReSharper", "RedundantCatchClause")]
internal static DeviceInfo[] GetList()
{
var deviceIDs = new List<string>();
List<string> deviceIDs = new List<string>();
try
{
@@ -94,7 +94,7 @@ static class ListDevices
#endif
}
var devList = new List<DeviceInfo>();
List<DeviceInfo> devList = new List<DeviceInfo>();
foreach(string devId in deviceIDs)
{
@@ -125,10 +125,10 @@ static class ListDevices
//descriptor.RawDeviceProperties = new byte[16384];
IntPtr descriptorPtr = Marshal.AllocHGlobal(1000);
var descriptorB = new byte[1000];
byte[] descriptorB = new byte[1000];
uint returned = 0;
var error = 0;
int error = 0;
bool hasError = !Extern.DeviceIoControlStorageQuery(fd, WindowsIoctl.IoctlStorageQueryProperty, ref query,
(uint)Marshal.SizeOf(query), descriptorPtr, 1000,

View File

@@ -49,7 +49,7 @@ static partial class Usb
/// <returns>List of USB Host Controllers</returns>
static IEnumerable<UsbController> GetHostControllers()
{
var hostList = new List<UsbController>();
List<UsbController> hostList = new List<UsbController>();
var hostGuid = new Guid(GUID_DEVINTERFACE_HUBCONTROLLER);
// We start at the "root" of the device tree and look for all
@@ -61,7 +61,7 @@ static partial class Usb
IntPtr ptrBuf = Marshal.AllocHGlobal(BUFFER_SIZE);
bool success;
var i = 0;
int i = 0;
do
{
@@ -92,14 +92,14 @@ static partial class Usb
// trust me :)
// now we can get some more detailed information
var nRequiredSize = 0;
int nRequiredSize = 0;
if(SetupDiGetDeviceInterfaceDetail(h, ref dia, ref didd, BUFFER_SIZE, ref nRequiredSize, ref da))
{
host._controllerDevicePath = didd.DevicePath;
// get the Device Description and DriverKeyName
var requiredSize = 0;
int requiredSize = 0;
int regType = REG_SZ;
if(SetupDiGetDeviceRegistryProperty(h, ref da, SPDRP_DEVICEDESC, ref regType, ptrBuf, BUFFER_SIZE,
@@ -129,7 +129,7 @@ static partial class Usb
/// <returns>USB device description</returns>
static string GetDescriptionByKeyName(string driverKeyName)
{
var ans = "";
string ans = "";
// Use the "enumerator form" of the SetupDiGetClassDevs API
// to generate a list of all USB devices
@@ -141,7 +141,7 @@ static partial class Usb
IntPtr ptrBuf = Marshal.AllocHGlobal(BUFFER_SIZE);
bool success;
var i = 0;
int i = 0;
do
{
@@ -154,9 +154,9 @@ static partial class Usb
if(success)
{
var requiredSize = 0;
int requiredSize = 0;
int regType = REG_SZ;
var keyName = "";
string keyName = "";
if(SetupDiGetDeviceRegistryProperty(h, ref da, SPDRP_DRIVER, ref regType, ptrBuf, BUFFER_SIZE,
ref requiredSize))
@@ -187,7 +187,7 @@ static partial class Usb
/// <returns>Device instance ID</returns>
static string GetInstanceIdByKeyName(string driverKeyName)
{
var ans = "";
string ans = "";
// Use the "enumerator form" of the SetupDiGetClassDevs API
// to generate a list of all USB devices
@@ -199,7 +199,7 @@ static partial class Usb
IntPtr ptrBuf = Marshal.AllocHGlobal(BUFFER_SIZE);
bool success;
var i = 0;
int i = 0;
do
{
@@ -212,10 +212,10 @@ static partial class Usb
if(success)
{
var requiredSize = 0;
int requiredSize = 0;
int regType = REG_SZ;
var keyName = "";
string keyName = "";
if(SetupDiGetDeviceRegistryProperty(h, ref da, SPDRP_DRIVER, ref regType, ptrBuf, BUFFER_SIZE,
ref requiredSize))
@@ -396,7 +396,7 @@ static partial class Usb
/// <returns>List of downstream ports</returns>
internal IEnumerable<UsbPort> GetPorts()
{
var portList = new List<UsbPort>();
List<UsbPort> portList = new List<UsbPort>();
// Open a handle to the Hub device
IntPtr h = CreateFile(_hubDevicePath, GENERIC_WRITE, FILE_SHARE_WRITE, IntPtr.Zero, OPEN_EXISTING, 0,
@@ -410,7 +410,7 @@ static partial class Usb
// loop thru all of the ports on the hub
// BTW: Ports are numbered starting at 1
for(var i = 1; i <= _hubPortCount; i++)
for(int i = 1; i <= _hubPortCount; i++)
{
var nodeConnection = new UsbNodeConnectionInformationEx
{
@@ -517,7 +517,7 @@ static partial class Usb
int nBytes = BUFFER_SIZE;
// We use this to zero fill a buffer
var nullString = new string((char)0, BUFFER_SIZE / Marshal.SystemDefaultCharSize);
string nullString = new string((char)0, BUFFER_SIZE / Marshal.SystemDefaultCharSize);
// The iManufacturer, iProduct and iSerialNumber entries in the
// Device Descriptor are really just indexes. So, we have to

View File

@@ -55,7 +55,7 @@ static partial class Usb
/// <returns>List of usb devices</returns>
internal static List<UsbDevice> GetConnectedDevices()
{
var devList = new List<UsbDevice>();
List<UsbDevice> devList = new List<UsbDevice>();
foreach(UsbController controller in GetHostControllers())
ListHub(controller.GetRootHub(), devList);
@@ -205,7 +205,7 @@ static partial class Usb
static UsbDevice FindDeviceNumber(int devNum, string deviceGuid)
{
UsbDevice foundDevice = null;
var instanceId = "";
string instanceId = "";
var diskGuid = new Guid(deviceGuid);
@@ -216,7 +216,7 @@ static partial class Usb
if(h != _invalidHandleValue)
{
bool success;
var i = 0;
int i = 0;
do
{
@@ -240,7 +240,7 @@ static partial class Usb
}; // trust me :)
// now we can get some more detailed information
var nRequiredSize = 0;
int nRequiredSize = 0;
if(SetupDiGetDeviceInterfaceDetail(h, ref dia, ref didd, BUFFER_SIZE, ref nRequiredSize, ref da))
if(GetDeviceNumber(didd.DevicePath) == devNum)