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

@@ -49,7 +49,7 @@ namespace DiscImageChef.Filesystems.UCSDPascal
{
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;
PascalFileEntry entry;
@@ -67,7 +67,7 @@ namespace DiscImageChef.Filesystems.UCSDPascal
{
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;
byte[] file;
@@ -106,7 +106,7 @@ namespace DiscImageChef.Filesystems.UCSDPascal
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(debug)

View File

@@ -33,13 +33,15 @@
using System;
using System.Text;
using DiscImageChef.CommonTypes;
using DiscImageChef.DiscImages;
using Schemas;
namespace DiscImageChef.Filesystems.UCSDPascal
{
// Information from Call-A.P.P.L.E. Pascal Disk Directory Structure
public partial class PascalPlugin : Filesystem
{
public override bool Identify(DiscImages.ImagePlugin imagePlugin, Partition partition)
public override bool Identify(ImagePlugin imagePlugin, Partition partition)
{
if(partition.Length < 3) return false;
@@ -83,7 +85,7 @@ namespace DiscImageChef.Filesystems.UCSDPascal
return true;
}
public override void GetInformation(DiscImages.ImagePlugin imagePlugin, Partition partition,
public override void GetInformation(ImagePlugin imagePlugin, Partition partition,
out string information)
{
StringBuilder sbInformation = new StringBuilder();
@@ -141,7 +143,7 @@ namespace DiscImageChef.Filesystems.UCSDPascal
information = sbInformation.ToString();
xmlFSType = new Schemas.FileSystemType();
xmlFSType = new FileSystemType();
xmlFSType.Bootable = !ArrayHelpers.ArrayIsNullOrEmpty(imagePlugin.ReadSectors(partition.Start, 2));
xmlFSType.Clusters = volEntry.blocks;
xmlFSType.ClusterSize = (int)imagePlugin.GetSectorSize();
@@ -149,8 +151,6 @@ namespace DiscImageChef.Filesystems.UCSDPascal
xmlFSType.FilesSpecified = true;
xmlFSType.Type = "UCSD Pascal";
xmlFSType.VolumeName = StringHandlers.PascalToString(volEntry.volumeName, CurrentEncoding);
return;
}
}
}

View File

@@ -32,6 +32,7 @@
using System;
using System.Collections.Generic;
using Schemas;
namespace DiscImageChef.Filesystems.UCSDPascal
{
@@ -93,7 +94,7 @@ namespace DiscImageChef.Filesystems.UCSDPascal
bootBlocks = device.ReadSectors(0, 2);
xmlFSType = new Schemas.FileSystemType();
xmlFSType = new FileSystemType();
xmlFSType.Bootable = !ArrayHelpers.ArrayIsNullOrEmpty(bootBlocks);
xmlFSType.Clusters = mountedVolEntry.blocks;
xmlFSType.ClusterSize = (int)device.GetSectorSize();

View File

@@ -32,9 +32,10 @@
using System;
using System.Collections.Generic;
using System.Text;
using Claunia.Encoding;
using DiscImageChef.CommonTypes;
using DiscImageChef.DiscImages;
using Encoding = System.Text.Encoding;
namespace DiscImageChef.Filesystems.UCSDPascal
{
@@ -54,7 +55,7 @@ namespace DiscImageChef.Filesystems.UCSDPascal
{
Name = "U.C.S.D. Pascal filesystem";
PluginUUID = new Guid("B0AC2CB5-72AA-473A-9200-270B5A2C2D53");
CurrentEncoding = new Claunia.Encoding.LisaRoman();
CurrentEncoding = new LisaRoman();
}
public PascalPlugin(Encoding encoding)
@@ -62,7 +63,7 @@ namespace DiscImageChef.Filesystems.UCSDPascal
Name = "U.C.S.D. Pascal filesystem";
PluginUUID = new Guid("B0AC2CB5-72AA-473A-9200-270B5A2C2D53");
// TODO: Until Apple ][ encoding is implemented
CurrentEncoding = new Claunia.Encoding.LisaRoman();
CurrentEncoding = new LisaRoman();
}
public PascalPlugin(ImagePlugin imagePlugin, Partition partition, Encoding encoding)
@@ -71,7 +72,7 @@ namespace DiscImageChef.Filesystems.UCSDPascal
Name = "U.C.S.D. Pascal filesystem";
PluginUUID = new Guid("B0AC2CB5-72AA-473A-9200-270B5A2C2D53");
// TODO: Until Apple ][ encoding is implemented
CurrentEncoding = new Claunia.Encoding.LisaRoman();
CurrentEncoding = new LisaRoman();
}
public override Errno ListXAttr(string path, ref List<string> xattrs)