* FileSystemIDandChk/Plugins/ODS.cs:

Use StringHandlers class to prevent garbage coming from
	  strings (even if they are not C strings, it does not hurt).

	* FileSystemIDandChk/Plugins/AppleHFS.cs:
	  Use constants.

	* FileSystemIDandChk/Plugins/BFS.cs:
	* FileSystemIDandChk/Plugins/AppleMFS.cs:
	* FileSystemIDandChk/Plugins/AppleHFSPlus.cs:
	  Use constants and EndianAwareBinaryReader class.

	* FileSystemIDandChk/Plugins/Opera.cs:
	  Use a superblock structure and EndianAwareBinaryReader
	  class, reduces lots of code.

git-svn-id: svn://claunia.com/FileSystemIDandChk@15 17725271-3d32-4980-a8cb-9ff532f270ba
This commit is contained in:
2012-08-05 00:43:49 +00:00
parent c50e117c8d
commit 9d446877b4
7 changed files with 265 additions and 468 deletions

View File

@@ -98,13 +98,13 @@ namespace FileSystemIDandChk.Plugins
homeblock.reserved1 = br.ReadBytes(302);
homeblock.serialnum = br.ReadUInt32();
temp_string = br.ReadBytes(12);
homeblock.strucname = Encoding.ASCII.GetString(temp_string);
homeblock.strucname = StringHandlers.CToString(temp_string);
temp_string = br.ReadBytes(12);
homeblock.volname = Encoding.ASCII.GetString(temp_string);
homeblock.volname = StringHandlers.CToString(temp_string);
temp_string = br.ReadBytes(12);
homeblock.ownername = Encoding.ASCII.GetString(temp_string);
homeblock.ownername = StringHandlers.CToString(temp_string);
temp_string = br.ReadBytes(12);
homeblock.format = Encoding.ASCII.GetString(temp_string);
homeblock.format = StringHandlers.CToString(temp_string);
homeblock.reserved2 = br.ReadUInt16();
homeblock.checksum2 = br.ReadUInt16();