From c6cfcbcd15e4092682857252955193923e954997 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Fri, 4 Dec 2015 18:52:23 +0000 Subject: [PATCH] Corrected root block search. --- DiscImageChef.Filesystems/AmigaDOS.cs | 9 ++- DiscImageChef.Filesystems/ChangeLog | 5 ++ .../DiscImageChef.Metadata.csproj | 40 ++++++++++++ .../Properties/AssemblyInfo.cs | 64 +++++++++++++++++++ 4 files changed, 116 insertions(+), 2 deletions(-) create mode 100644 DiscImageChef.Metadata/DiscImageChef.Metadata.csproj create mode 100644 DiscImageChef.Metadata/Properties/AssemblyInfo.cs diff --git a/DiscImageChef.Filesystems/AmigaDOS.cs b/DiscImageChef.Filesystems/AmigaDOS.cs index 225dfd34..034f9b70 100644 --- a/DiscImageChef.Filesystems/AmigaDOS.cs +++ b/DiscImageChef.Filesystems/AmigaDOS.cs @@ -202,7 +202,7 @@ namespace DiscImageChef.Plugins ulong root_ptr = BigEndianBitConverter.ToUInt32(sector, 0x08); DicConsole.DebugWriteLine("AmigaDOS plugin", "Bootblock points to {0} as Rootblock", root_ptr); - root_ptr = (partitionEnd - partitionStart) / 2 + partitionStart; + root_ptr = (partitionEnd - partitionStart) / 2 + partitionStart + 1; DicConsole.DebugWriteLine("AmigaDOS plugin", "Nonetheless, going to block {0} for Rootblock", root_ptr); @@ -227,7 +227,7 @@ namespace DiscImageChef.Plugins StringBuilder sbInformation = new StringBuilder(); byte[] BootBlockSectors = imagePlugin.ReadSectors(0 + partitionStart, 2); - byte[] RootBlockSector = imagePlugin.ReadSector((partitionEnd - partitionStart) / 2 + partitionStart); + byte[] RootBlockSector = imagePlugin.ReadSector((partitionEnd - partitionStart) / 2 + partitionStart + 1); byte[] diskName = new byte[32]; BootBlock bootBlk = new BootBlock(); @@ -341,6 +341,11 @@ namespace DiscImageChef.Plugins sbInformation.AppendFormat("Volume root directory last modified on on {0}", DateHandlers.AmigaToDateTime(rootBlk.rDays, rootBlk.rMins, rootBlk.rTicks)).AppendLine(); information = sbInformation.ToString(); + + /*xmlFSType = new Schemas.FileSystemType(); + xmlFSType.CreationDate = DateHandlers.AmigaToDateTime(rootBlk.cDays, rootBlk.cMins, rootBlk.cTicks); + xmlFSType.ModificationDate = DateHandlers.AmigaToDateTime(rootBlk.vDays, rootBlk.vMins, rootBlk.vTicks); +*/ } static UInt32 AmigaChecksum(byte[] data) diff --git a/DiscImageChef.Filesystems/ChangeLog b/DiscImageChef.Filesystems/ChangeLog index 3f6e2735..55f729cd 100644 --- a/DiscImageChef.Filesystems/ChangeLog +++ b/DiscImageChef.Filesystems/ChangeLog @@ -1,3 +1,8 @@ +2015-12-04 Natalia Portillo + + * AmigaDOS.cs: + Corrected root block search. + 2015-11-10 Natalia Portillo * BFS.cs: diff --git a/DiscImageChef.Metadata/DiscImageChef.Metadata.csproj b/DiscImageChef.Metadata/DiscImageChef.Metadata.csproj new file mode 100644 index 00000000..5250a19d --- /dev/null +++ b/DiscImageChef.Metadata/DiscImageChef.Metadata.csproj @@ -0,0 +1,40 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {9F213318-5CB8-4066-A757-074489C9F818} + Library + DiscImageChef.Metadata + DiscImageChef.Metadata + v4.5 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + false + + + full + true + bin\Release + prompt + 4 + false + + + + + + + + + + \ No newline at end of file diff --git a/DiscImageChef.Metadata/Properties/AssemblyInfo.cs b/DiscImageChef.Metadata/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..28d5b4d6 --- /dev/null +++ b/DiscImageChef.Metadata/Properties/AssemblyInfo.cs @@ -0,0 +1,64 @@ +// /*************************************************************************** +// The Disc Image Chef +// ---------------------------------------------------------------------------- +// +// Filename : AssemblyInfo.cs +// Version : 1.0 +// Author(s) : Natalia Portillo +// +// Component : Component +// +// Revision : $Revision$ +// Last change by : $Author$ +// Date : $Date$ +// +// --[ Description ] ---------------------------------------------------------- +// +// Description +// +// --[ License ] -------------------------------------------------------------- +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// ---------------------------------------------------------------------------- +// Copyright (C) 2011-2015 Claunia.com +// ****************************************************************************/ +// //$Id$ +using System.Reflection; +using System.Runtime.CompilerServices; + +// Information about this assembly is defined by the following attributes. +// Change them to the values specific to your project. + +[assembly: AssemblyTitle("DiscImageChef.Metadata")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Claunia.com")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("© Claunia.com")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". +// The form "{Major}.{Minor}.*" will automatically update the build and revision, +// and "{Major}.{Minor}.{Build}.*" will update just the revision. + +[assembly: AssemblyVersion("1.0.*")] + +// The following attributes are used to specify the signing key for the assembly, +// if desired. See the Mono documentation for more information about signing. + +//[assembly: AssemblyDelaySign(false)] +//[assembly: AssemblyKeyFile("")] +