REFACTOR: Remove unneeded code.

This commit is contained in:
2017-12-21 14:30:38 +00:00
parent 35ce7db892
commit dcd053b20d
343 changed files with 2842 additions and 2588 deletions

View File

@@ -40,7 +40,7 @@ namespace DiscImageChef.Filesystems.CPM
{
if(!mounted) return Errno.AccessDenied;
string[] pathElements = path.Split(new char[] {'/'}, StringSplitOptions.RemoveEmptyEntries);
string[] pathElements = path.Split(new[] {'/'}, StringSplitOptions.RemoveEmptyEntries);
if(pathElements.Length != 1) return Errno.NotSupported;
FileEntryInfo fInfo;
@@ -79,7 +79,7 @@ namespace DiscImageChef.Filesystems.CPM
if(offset < 0) return Errno.InvalidArgument;
string[] pathElements = path.Split(new char[] {'/'}, StringSplitOptions.RemoveEmptyEntries);
string[] pathElements = path.Split(new[] {'/'}, StringSplitOptions.RemoveEmptyEntries);
if(pathElements.Length != 1) return Errno.NotSupported;
byte[] file;
@@ -106,7 +106,7 @@ namespace DiscImageChef.Filesystems.CPM
{
if(!mounted) return Errno.AccessDenied;
string[] pathElements = path.Split(new char[] {'/'}, StringSplitOptions.RemoveEmptyEntries);
string[] pathElements = path.Split(new[] {'/'}, StringSplitOptions.RemoveEmptyEntries);
if(pathElements.Length != 1) return Errno.NotSupported;
if(string.IsNullOrEmpty(path) || string.Compare(path, "/", StringComparison.OrdinalIgnoreCase) == 0)

View File

@@ -38,6 +38,7 @@ using System.Text;
using DiscImageChef.CommonTypes;
using DiscImageChef.Console;
using DiscImageChef.DiscImages;
using Schemas;
namespace DiscImageChef.Filesystems.CPM
{
@@ -1045,7 +1046,7 @@ namespace DiscImageChef.Filesystems.CPM
if(labelUpdateDate != null)
sb.AppendFormat("Volume updated on {0}", DateHandlers.CPMToDateTime(labelUpdateDate)).AppendLine();
xmlFSType = new Schemas.FileSystemType();
xmlFSType = new FileSystemType();
xmlFSType.Bootable |= workingDefinition.sofs > 0 || workingDefinition.ofs > 0;
xmlFSType.ClusterSize = 128 << dpb.bsh;
if(dpb.dsm > 0) xmlFSType.Clusters = dpb.dsm;

View File

@@ -39,6 +39,7 @@ using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using DiscImageChef.Console;
using Schemas;
namespace DiscImageChef.Filesystems.CPM
{
@@ -671,7 +672,7 @@ namespace DiscImageChef.Filesystems.CPM
cpmStat.Type = "CP/M filesystem";
// Generate XML info
xmlFSType = new Schemas.FileSystemType();
xmlFSType = new FileSystemType();
xmlFSType.Clusters = cpmStat.Blocks;
xmlFSType.ClusterSize = blockSize;
if(labelCreationDate != null)

View File

@@ -48,7 +48,7 @@ namespace DiscImageChef.Filesystems.CPM
{
if(!mounted) return Errno.AccessDenied;
string[] pathElements = path.Split(new char[] {'/'}, StringSplitOptions.RemoveEmptyEntries);
string[] pathElements = path.Split(new[] {'/'}, StringSplitOptions.RemoveEmptyEntries);
if(pathElements.Length != 1) return Errno.NotSupported;
if(!fileCache.ContainsKey(pathElements[0].ToUpperInvariant())) return Errno.NoSuchFile;
@@ -73,7 +73,7 @@ namespace DiscImageChef.Filesystems.CPM
{
if(!mounted) return Errno.AccessDenied;
string[] pathElements = path.Split(new char[] {'/'}, StringSplitOptions.RemoveEmptyEntries);
string[] pathElements = path.Split(new[] {'/'}, StringSplitOptions.RemoveEmptyEntries);
if(pathElements.Length != 1) return Errno.NotSupported;
if(!fileCache.ContainsKey(pathElements[0].ToUpperInvariant())) return Errno.NoSuchFile;