mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Naming fixes.
This commit is contained in:
@@ -54,14 +54,14 @@ namespace Aaru.Filesystems.LisaFS
|
||||
{
|
||||
try
|
||||
{
|
||||
device = imagePlugin;
|
||||
_device = imagePlugin;
|
||||
Encoding = new LisaRoman();
|
||||
|
||||
// Lisa OS is unable to work on disks without tags.
|
||||
// This code is designed like that.
|
||||
// However with some effort the code may be modified to ignore them.
|
||||
if(device.Info.ReadableSectorTags == null ||
|
||||
!device.Info.ReadableSectorTags.Contains(SectorTagType.AppleSectorTag))
|
||||
if(_device.Info.ReadableSectorTags == null ||
|
||||
!_device.Info.ReadableSectorTags.Contains(SectorTagType.AppleSectorTag))
|
||||
{
|
||||
AaruConsole.DebugWriteLine("LisaFS plugin", "Underlying device does not support Lisa tags");
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace Aaru.Filesystems.LisaFS
|
||||
}
|
||||
|
||||
// Minimal LisaOS disk is 3.5" single sided double density, 800 sectors
|
||||
if(device.Info.Sectors < 800)
|
||||
if(_device.Info.Sectors < 800)
|
||||
{
|
||||
AaruConsole.DebugWriteLine("LisaFS plugin", "Device is too small");
|
||||
|
||||
@@ -77,116 +77,116 @@ namespace Aaru.Filesystems.LisaFS
|
||||
}
|
||||
|
||||
// MDDF cannot be at end of device, of course
|
||||
volumePrefix = device.Info.Sectors;
|
||||
_volumePrefix = _device.Info.Sectors;
|
||||
|
||||
// LisaOS searches sectors until tag tells MDDF resides there, so we'll search 100 sectors
|
||||
for(ulong i = 0; i < 100; i++)
|
||||
{
|
||||
DecodeTag(device.ReadSectorTag(i, SectorTagType.AppleSectorTag), out LisaTag.PriamTag searchTag);
|
||||
DecodeTag(_device.ReadSectorTag(i, SectorTagType.AppleSectorTag), out LisaTag.PriamTag searchTag);
|
||||
|
||||
AaruConsole.DebugWriteLine("LisaFS plugin", "Sector {0}, file ID 0x{1:X4}", i, searchTag.FileId);
|
||||
|
||||
if(volumePrefix == device.Info.Sectors &&
|
||||
if(_volumePrefix == _device.Info.Sectors &&
|
||||
searchTag.FileId == FILEID_LOADER_SIGNED)
|
||||
volumePrefix = i - 1;
|
||||
_volumePrefix = i - 1;
|
||||
|
||||
if(searchTag.FileId != FILEID_MDDF)
|
||||
continue;
|
||||
|
||||
devTagSize = device.ReadSectorTag(i, SectorTagType.AppleSectorTag).Length;
|
||||
_devTagSize = _device.ReadSectorTag(i, SectorTagType.AppleSectorTag).Length;
|
||||
|
||||
byte[] sector = device.ReadSector(i);
|
||||
mddf = new MDDF();
|
||||
byte[] sector = _device.ReadSector(i);
|
||||
_mddf = new MDDF();
|
||||
byte[] pString = new byte[33];
|
||||
|
||||
mddf.fsversion = BigEndianBitConverter.ToUInt16(sector, 0x00);
|
||||
mddf.volid = BigEndianBitConverter.ToUInt64(sector, 0x02);
|
||||
mddf.volnum = BigEndianBitConverter.ToUInt16(sector, 0x0A);
|
||||
_mddf.fsversion = BigEndianBitConverter.ToUInt16(sector, 0x00);
|
||||
_mddf.volid = BigEndianBitConverter.ToUInt64(sector, 0x02);
|
||||
_mddf.volnum = BigEndianBitConverter.ToUInt16(sector, 0x0A);
|
||||
Array.Copy(sector, 0x0C, pString, 0, 33);
|
||||
mddf.volname = StringHandlers.PascalToString(pString, Encoding);
|
||||
mddf.unknown1 = sector[0x2D];
|
||||
_mddf.volname = StringHandlers.PascalToString(pString, Encoding);
|
||||
_mddf.unknown1 = sector[0x2D];
|
||||
Array.Copy(sector, 0x2E, pString, 0, 33);
|
||||
|
||||
// Prevent garbage
|
||||
mddf.password = pString[0] <= 32 ? StringHandlers.PascalToString(pString, Encoding) : "";
|
||||
mddf.unknown2 = sector[0x4F];
|
||||
mddf.machine_id = BigEndianBitConverter.ToUInt32(sector, 0x50);
|
||||
mddf.master_copy_id = BigEndianBitConverter.ToUInt32(sector, 0x54);
|
||||
_mddf.password = pString[0] <= 32 ? StringHandlers.PascalToString(pString, Encoding) : "";
|
||||
_mddf.unknown2 = sector[0x4F];
|
||||
_mddf.machine_id = BigEndianBitConverter.ToUInt32(sector, 0x50);
|
||||
_mddf.master_copy_id = BigEndianBitConverter.ToUInt32(sector, 0x54);
|
||||
uint lisaTime = BigEndianBitConverter.ToUInt32(sector, 0x58);
|
||||
mddf.dtvc = DateHandlers.LisaToDateTime(lisaTime);
|
||||
lisaTime = BigEndianBitConverter.ToUInt32(sector, 0x5C);
|
||||
mddf.dtcc = DateHandlers.LisaToDateTime(lisaTime);
|
||||
lisaTime = BigEndianBitConverter.ToUInt32(sector, 0x60);
|
||||
mddf.dtvb = DateHandlers.LisaToDateTime(lisaTime);
|
||||
lisaTime = BigEndianBitConverter.ToUInt32(sector, 0x64);
|
||||
mddf.dtvs = DateHandlers.LisaToDateTime(lisaTime);
|
||||
mddf.unknown3 = BigEndianBitConverter.ToUInt32(sector, 0x68);
|
||||
mddf.mddf_block = BigEndianBitConverter.ToUInt32(sector, 0x6C);
|
||||
mddf.volsize_minus_one = BigEndianBitConverter.ToUInt32(sector, 0x70);
|
||||
mddf.volsize_minus_mddf_minus_one = BigEndianBitConverter.ToUInt32(sector, 0x74);
|
||||
mddf.vol_size = BigEndianBitConverter.ToUInt32(sector, 0x78);
|
||||
mddf.blocksize = BigEndianBitConverter.ToUInt16(sector, 0x7C);
|
||||
mddf.datasize = BigEndianBitConverter.ToUInt16(sector, 0x7E);
|
||||
mddf.unknown4 = BigEndianBitConverter.ToUInt16(sector, 0x80);
|
||||
mddf.unknown5 = BigEndianBitConverter.ToUInt32(sector, 0x82);
|
||||
mddf.unknown6 = BigEndianBitConverter.ToUInt32(sector, 0x86);
|
||||
mddf.clustersize = BigEndianBitConverter.ToUInt16(sector, 0x8A);
|
||||
mddf.fs_size = BigEndianBitConverter.ToUInt32(sector, 0x8C);
|
||||
mddf.unknown7 = BigEndianBitConverter.ToUInt32(sector, 0x90);
|
||||
mddf.srec_ptr = BigEndianBitConverter.ToUInt32(sector, 0x94);
|
||||
mddf.unknown9 = BigEndianBitConverter.ToUInt16(sector, 0x98);
|
||||
mddf.srec_len = BigEndianBitConverter.ToUInt16(sector, 0x9A);
|
||||
mddf.unknown10 = BigEndianBitConverter.ToUInt32(sector, 0x9C);
|
||||
mddf.unknown11 = BigEndianBitConverter.ToUInt32(sector, 0xA0);
|
||||
mddf.unknown12 = BigEndianBitConverter.ToUInt32(sector, 0xA4);
|
||||
mddf.unknown13 = BigEndianBitConverter.ToUInt32(sector, 0xA8);
|
||||
mddf.unknown14 = BigEndianBitConverter.ToUInt32(sector, 0xAC);
|
||||
mddf.filecount = BigEndianBitConverter.ToUInt16(sector, 0xB0);
|
||||
mddf.unknown15 = BigEndianBitConverter.ToUInt32(sector, 0xB2);
|
||||
mddf.unknown16 = BigEndianBitConverter.ToUInt32(sector, 0xB6);
|
||||
mddf.freecount = BigEndianBitConverter.ToUInt32(sector, 0xBA);
|
||||
mddf.unknown17 = BigEndianBitConverter.ToUInt16(sector, 0xBE);
|
||||
mddf.unknown18 = BigEndianBitConverter.ToUInt32(sector, 0xC0);
|
||||
mddf.overmount_stamp = BigEndianBitConverter.ToUInt64(sector, 0xC4);
|
||||
mddf.serialization = BigEndianBitConverter.ToUInt32(sector, 0xCC);
|
||||
mddf.unknown19 = BigEndianBitConverter.ToUInt32(sector, 0xD0);
|
||||
mddf.unknown_timestamp = BigEndianBitConverter.ToUInt32(sector, 0xD4);
|
||||
mddf.unknown20 = BigEndianBitConverter.ToUInt32(sector, 0xD8);
|
||||
mddf.unknown21 = BigEndianBitConverter.ToUInt32(sector, 0xDC);
|
||||
mddf.unknown22 = BigEndianBitConverter.ToUInt32(sector, 0xE0);
|
||||
mddf.unknown23 = BigEndianBitConverter.ToUInt32(sector, 0xE4);
|
||||
mddf.unknown24 = BigEndianBitConverter.ToUInt32(sector, 0xE8);
|
||||
mddf.unknown25 = BigEndianBitConverter.ToUInt32(sector, 0xEC);
|
||||
mddf.unknown26 = BigEndianBitConverter.ToUInt32(sector, 0xF0);
|
||||
mddf.unknown27 = BigEndianBitConverter.ToUInt32(sector, 0xF4);
|
||||
mddf.unknown28 = BigEndianBitConverter.ToUInt32(sector, 0xF8);
|
||||
mddf.unknown29 = BigEndianBitConverter.ToUInt32(sector, 0xFC);
|
||||
mddf.unknown30 = BigEndianBitConverter.ToUInt32(sector, 0x100);
|
||||
mddf.unknown31 = BigEndianBitConverter.ToUInt32(sector, 0x104);
|
||||
mddf.unknown32 = BigEndianBitConverter.ToUInt32(sector, 0x108);
|
||||
mddf.unknown33 = BigEndianBitConverter.ToUInt32(sector, 0x10C);
|
||||
mddf.unknown34 = BigEndianBitConverter.ToUInt32(sector, 0x110);
|
||||
mddf.unknown35 = BigEndianBitConverter.ToUInt32(sector, 0x114);
|
||||
mddf.backup_volid = BigEndianBitConverter.ToUInt64(sector, 0x118);
|
||||
mddf.label_size = BigEndianBitConverter.ToUInt16(sector, 0x120);
|
||||
mddf.fs_overhead = BigEndianBitConverter.ToUInt16(sector, 0x122);
|
||||
mddf.result_scavenge = BigEndianBitConverter.ToUInt16(sector, 0x124);
|
||||
mddf.boot_code = BigEndianBitConverter.ToUInt16(sector, 0x126);
|
||||
mddf.boot_environ = BigEndianBitConverter.ToUInt16(sector, 0x6C);
|
||||
mddf.unknown36 = BigEndianBitConverter.ToUInt32(sector, 0x12A);
|
||||
mddf.unknown37 = BigEndianBitConverter.ToUInt32(sector, 0x12E);
|
||||
mddf.unknown38 = BigEndianBitConverter.ToUInt32(sector, 0x132);
|
||||
mddf.vol_sequence = BigEndianBitConverter.ToUInt16(sector, 0x136);
|
||||
mddf.vol_left_mounted = sector[0x138];
|
||||
_mddf.dtvc = DateHandlers.LisaToDateTime(lisaTime);
|
||||
lisaTime = BigEndianBitConverter.ToUInt32(sector, 0x5C);
|
||||
_mddf.dtcc = DateHandlers.LisaToDateTime(lisaTime);
|
||||
lisaTime = BigEndianBitConverter.ToUInt32(sector, 0x60);
|
||||
_mddf.dtvb = DateHandlers.LisaToDateTime(lisaTime);
|
||||
lisaTime = BigEndianBitConverter.ToUInt32(sector, 0x64);
|
||||
_mddf.dtvs = DateHandlers.LisaToDateTime(lisaTime);
|
||||
_mddf.unknown3 = BigEndianBitConverter.ToUInt32(sector, 0x68);
|
||||
_mddf.mddf_block = BigEndianBitConverter.ToUInt32(sector, 0x6C);
|
||||
_mddf.volsize_minus_one = BigEndianBitConverter.ToUInt32(sector, 0x70);
|
||||
_mddf.volsize_minus_mddf_minus_one = BigEndianBitConverter.ToUInt32(sector, 0x74);
|
||||
_mddf.vol_size = BigEndianBitConverter.ToUInt32(sector, 0x78);
|
||||
_mddf.blocksize = BigEndianBitConverter.ToUInt16(sector, 0x7C);
|
||||
_mddf.datasize = BigEndianBitConverter.ToUInt16(sector, 0x7E);
|
||||
_mddf.unknown4 = BigEndianBitConverter.ToUInt16(sector, 0x80);
|
||||
_mddf.unknown5 = BigEndianBitConverter.ToUInt32(sector, 0x82);
|
||||
_mddf.unknown6 = BigEndianBitConverter.ToUInt32(sector, 0x86);
|
||||
_mddf.clustersize = BigEndianBitConverter.ToUInt16(sector, 0x8A);
|
||||
_mddf.fs_size = BigEndianBitConverter.ToUInt32(sector, 0x8C);
|
||||
_mddf.unknown7 = BigEndianBitConverter.ToUInt32(sector, 0x90);
|
||||
_mddf.srec_ptr = BigEndianBitConverter.ToUInt32(sector, 0x94);
|
||||
_mddf.unknown9 = BigEndianBitConverter.ToUInt16(sector, 0x98);
|
||||
_mddf.srec_len = BigEndianBitConverter.ToUInt16(sector, 0x9A);
|
||||
_mddf.unknown10 = BigEndianBitConverter.ToUInt32(sector, 0x9C);
|
||||
_mddf.unknown11 = BigEndianBitConverter.ToUInt32(sector, 0xA0);
|
||||
_mddf.unknown12 = BigEndianBitConverter.ToUInt32(sector, 0xA4);
|
||||
_mddf.unknown13 = BigEndianBitConverter.ToUInt32(sector, 0xA8);
|
||||
_mddf.unknown14 = BigEndianBitConverter.ToUInt32(sector, 0xAC);
|
||||
_mddf.filecount = BigEndianBitConverter.ToUInt16(sector, 0xB0);
|
||||
_mddf.unknown15 = BigEndianBitConverter.ToUInt32(sector, 0xB2);
|
||||
_mddf.unknown16 = BigEndianBitConverter.ToUInt32(sector, 0xB6);
|
||||
_mddf.freecount = BigEndianBitConverter.ToUInt32(sector, 0xBA);
|
||||
_mddf.unknown17 = BigEndianBitConverter.ToUInt16(sector, 0xBE);
|
||||
_mddf.unknown18 = BigEndianBitConverter.ToUInt32(sector, 0xC0);
|
||||
_mddf.overmount_stamp = BigEndianBitConverter.ToUInt64(sector, 0xC4);
|
||||
_mddf.serialization = BigEndianBitConverter.ToUInt32(sector, 0xCC);
|
||||
_mddf.unknown19 = BigEndianBitConverter.ToUInt32(sector, 0xD0);
|
||||
_mddf.unknown_timestamp = BigEndianBitConverter.ToUInt32(sector, 0xD4);
|
||||
_mddf.unknown20 = BigEndianBitConverter.ToUInt32(sector, 0xD8);
|
||||
_mddf.unknown21 = BigEndianBitConverter.ToUInt32(sector, 0xDC);
|
||||
_mddf.unknown22 = BigEndianBitConverter.ToUInt32(sector, 0xE0);
|
||||
_mddf.unknown23 = BigEndianBitConverter.ToUInt32(sector, 0xE4);
|
||||
_mddf.unknown24 = BigEndianBitConverter.ToUInt32(sector, 0xE8);
|
||||
_mddf.unknown25 = BigEndianBitConverter.ToUInt32(sector, 0xEC);
|
||||
_mddf.unknown26 = BigEndianBitConverter.ToUInt32(sector, 0xF0);
|
||||
_mddf.unknown27 = BigEndianBitConverter.ToUInt32(sector, 0xF4);
|
||||
_mddf.unknown28 = BigEndianBitConverter.ToUInt32(sector, 0xF8);
|
||||
_mddf.unknown29 = BigEndianBitConverter.ToUInt32(sector, 0xFC);
|
||||
_mddf.unknown30 = BigEndianBitConverter.ToUInt32(sector, 0x100);
|
||||
_mddf.unknown31 = BigEndianBitConverter.ToUInt32(sector, 0x104);
|
||||
_mddf.unknown32 = BigEndianBitConverter.ToUInt32(sector, 0x108);
|
||||
_mddf.unknown33 = BigEndianBitConverter.ToUInt32(sector, 0x10C);
|
||||
_mddf.unknown34 = BigEndianBitConverter.ToUInt32(sector, 0x110);
|
||||
_mddf.unknown35 = BigEndianBitConverter.ToUInt32(sector, 0x114);
|
||||
_mddf.backup_volid = BigEndianBitConverter.ToUInt64(sector, 0x118);
|
||||
_mddf.label_size = BigEndianBitConverter.ToUInt16(sector, 0x120);
|
||||
_mddf.fs_overhead = BigEndianBitConverter.ToUInt16(sector, 0x122);
|
||||
_mddf.result_scavenge = BigEndianBitConverter.ToUInt16(sector, 0x124);
|
||||
_mddf.boot_code = BigEndianBitConverter.ToUInt16(sector, 0x126);
|
||||
_mddf.boot_environ = BigEndianBitConverter.ToUInt16(sector, 0x6C);
|
||||
_mddf.unknown36 = BigEndianBitConverter.ToUInt32(sector, 0x12A);
|
||||
_mddf.unknown37 = BigEndianBitConverter.ToUInt32(sector, 0x12E);
|
||||
_mddf.unknown38 = BigEndianBitConverter.ToUInt32(sector, 0x132);
|
||||
_mddf.vol_sequence = BigEndianBitConverter.ToUInt16(sector, 0x136);
|
||||
_mddf.vol_left_mounted = sector[0x138];
|
||||
|
||||
// Check that the MDDF is correct
|
||||
if(mddf.mddf_block != i - volumePrefix ||
|
||||
mddf.vol_size > device.Info.Sectors ||
|
||||
mddf.vol_size - 1 != mddf.volsize_minus_one ||
|
||||
mddf.vol_size - i - 1 != mddf.volsize_minus_mddf_minus_one - volumePrefix ||
|
||||
mddf.datasize > mddf.blocksize ||
|
||||
mddf.blocksize < device.Info.SectorSize ||
|
||||
mddf.datasize != device.Info.SectorSize)
|
||||
if(_mddf.mddf_block != i - _volumePrefix ||
|
||||
_mddf.vol_size > _device.Info.Sectors ||
|
||||
_mddf.vol_size - 1 != _mddf.volsize_minus_one ||
|
||||
_mddf.vol_size - i - 1 != _mddf.volsize_minus_mddf_minus_one - _volumePrefix ||
|
||||
_mddf.datasize > _mddf.blocksize ||
|
||||
_mddf.blocksize < _device.Info.SectorSize ||
|
||||
_mddf.datasize != _device.Info.SectorSize)
|
||||
{
|
||||
AaruConsole.DebugWriteLine("LisaFS plugin", "Incorrect MDDF found");
|
||||
|
||||
@@ -194,7 +194,7 @@ namespace Aaru.Filesystems.LisaFS
|
||||
}
|
||||
|
||||
// Check MDDF version
|
||||
switch(mddf.fsversion)
|
||||
switch(_mddf.fsversion)
|
||||
{
|
||||
case LISA_V1:
|
||||
AaruConsole.DebugWriteLine("LisaFS plugin", "Mounting LisaFS v1");
|
||||
@@ -209,29 +209,29 @@ namespace Aaru.Filesystems.LisaFS
|
||||
|
||||
break;
|
||||
default:
|
||||
AaruConsole.ErrorWriteLine("Cannot mount LisaFS version {0}", mddf.fsversion.ToString());
|
||||
AaruConsole.ErrorWriteLine("Cannot mount LisaFS version {0}", _mddf.fsversion.ToString());
|
||||
|
||||
return Errno.NotSupported;
|
||||
}
|
||||
|
||||
// Initialize caches
|
||||
extentCache = new Dictionary<short, ExtentFile>();
|
||||
systemFileCache = new Dictionary<short, byte[]>();
|
||||
fileCache = new Dictionary<short, byte[]>();
|
||||
_extentCache = new Dictionary<short, ExtentFile>();
|
||||
_systemFileCache = new Dictionary<short, byte[]>();
|
||||
_fileCache = new Dictionary<short, byte[]>();
|
||||
|
||||
//catalogCache = new Dictionary<short, List<CatalogEntry>>();
|
||||
fileSizeCache = new Dictionary<short, int>();
|
||||
_fileSizeCache = new Dictionary<short, int>();
|
||||
|
||||
mounted = true;
|
||||
_mounted = true;
|
||||
|
||||
if(options == null)
|
||||
options = GetDefaultOptions();
|
||||
|
||||
if(options.TryGetValue("debug", out string debugString))
|
||||
bool.TryParse(debugString, out debug);
|
||||
bool.TryParse(debugString, out _debug);
|
||||
|
||||
if(debug)
|
||||
printedExtents = new List<short>();
|
||||
if(_debug)
|
||||
_printedExtents = new List<short>();
|
||||
|
||||
// Read the S-Records file
|
||||
Errno error = ReadSRecords();
|
||||
@@ -243,10 +243,10 @@ namespace Aaru.Filesystems.LisaFS
|
||||
return error;
|
||||
}
|
||||
|
||||
directoryDtcCache = new Dictionary<short, DateTime>
|
||||
_directoryDtcCache = new Dictionary<short, DateTime>
|
||||
{
|
||||
{
|
||||
DIRID_ROOT, mddf.dtcc
|
||||
DIRID_ROOT, _mddf.dtcc
|
||||
}
|
||||
};
|
||||
|
||||
@@ -258,20 +258,20 @@ namespace Aaru.Filesystems.LisaFS
|
||||
AaruConsole.DebugWriteLine("LisaFS plugin", "Cannot read Catalog File, error {0}",
|
||||
error.ToString());
|
||||
|
||||
mounted = false;
|
||||
_mounted = false;
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
// If debug, cache system files
|
||||
if(debug)
|
||||
if(_debug)
|
||||
{
|
||||
error = ReadSystemFile(FILEID_BOOT_SIGNED, out _);
|
||||
|
||||
if(error != Errno.NoError)
|
||||
{
|
||||
AaruConsole.DebugWriteLine("LisaFS plugin", "Unable to read boot blocks");
|
||||
mounted = false;
|
||||
_mounted = false;
|
||||
|
||||
return error;
|
||||
}
|
||||
@@ -281,7 +281,7 @@ namespace Aaru.Filesystems.LisaFS
|
||||
if(error != Errno.NoError)
|
||||
{
|
||||
AaruConsole.DebugWriteLine("LisaFS plugin", "Unable to read boot loader");
|
||||
mounted = false;
|
||||
_mounted = false;
|
||||
|
||||
return error;
|
||||
}
|
||||
@@ -291,7 +291,7 @@ namespace Aaru.Filesystems.LisaFS
|
||||
if(error != Errno.NoError)
|
||||
{
|
||||
AaruConsole.DebugWriteLine("LisaFS plugin", "Unable to read MDDF");
|
||||
mounted = false;
|
||||
_mounted = false;
|
||||
|
||||
return error;
|
||||
}
|
||||
@@ -301,7 +301,7 @@ namespace Aaru.Filesystems.LisaFS
|
||||
if(error != Errno.NoError)
|
||||
{
|
||||
AaruConsole.DebugWriteLine("LisaFS plugin", "Unable to read volume bitmap");
|
||||
mounted = false;
|
||||
_mounted = false;
|
||||
|
||||
return error;
|
||||
}
|
||||
@@ -311,7 +311,7 @@ namespace Aaru.Filesystems.LisaFS
|
||||
if(error != Errno.NoError)
|
||||
{
|
||||
AaruConsole.DebugWriteLine("LisaFS plugin", "Unable to read S-Records file");
|
||||
mounted = false;
|
||||
_mounted = false;
|
||||
|
||||
return error;
|
||||
}
|
||||
@@ -320,29 +320,29 @@ namespace Aaru.Filesystems.LisaFS
|
||||
// Create XML metadata for mounted filesystem
|
||||
XmlFsType = new FileSystemType();
|
||||
|
||||
if(DateTime.Compare(mddf.dtvb, DateHandlers.LisaToDateTime(0)) > 0)
|
||||
if(DateTime.Compare(_mddf.dtvb, DateHandlers.LisaToDateTime(0)) > 0)
|
||||
{
|
||||
XmlFsType.BackupDate = mddf.dtvb;
|
||||
XmlFsType.BackupDate = _mddf.dtvb;
|
||||
XmlFsType.BackupDateSpecified = true;
|
||||
}
|
||||
|
||||
XmlFsType.Clusters = mddf.vol_size;
|
||||
XmlFsType.ClusterSize = (uint)(mddf.clustersize * mddf.datasize);
|
||||
XmlFsType.Clusters = _mddf.vol_size;
|
||||
XmlFsType.ClusterSize = (uint)(_mddf.clustersize * _mddf.datasize);
|
||||
|
||||
if(DateTime.Compare(mddf.dtvc, DateHandlers.LisaToDateTime(0)) > 0)
|
||||
if(DateTime.Compare(_mddf.dtvc, DateHandlers.LisaToDateTime(0)) > 0)
|
||||
{
|
||||
XmlFsType.CreationDate = mddf.dtvc;
|
||||
XmlFsType.CreationDate = _mddf.dtvc;
|
||||
XmlFsType.CreationDateSpecified = true;
|
||||
}
|
||||
|
||||
XmlFsType.Dirty = mddf.vol_left_mounted != 0;
|
||||
XmlFsType.Files = mddf.filecount;
|
||||
XmlFsType.Dirty = _mddf.vol_left_mounted != 0;
|
||||
XmlFsType.Files = _mddf.filecount;
|
||||
XmlFsType.FilesSpecified = true;
|
||||
XmlFsType.FreeClusters = mddf.freecount;
|
||||
XmlFsType.FreeClusters = _mddf.freecount;
|
||||
XmlFsType.FreeClustersSpecified = true;
|
||||
XmlFsType.Type = "LisaFS";
|
||||
XmlFsType.VolumeName = mddf.volname;
|
||||
XmlFsType.VolumeSerial = $"{mddf.volid:X16}";
|
||||
XmlFsType.VolumeName = _mddf.volname;
|
||||
XmlFsType.VolumeSerial = $"{_mddf.volid:X16}";
|
||||
|
||||
return Errno.NoError;
|
||||
}
|
||||
@@ -363,17 +363,17 @@ namespace Aaru.Filesystems.LisaFS
|
||||
/// <summary>Umounts this Lisa filesystem</summary>
|
||||
public Errno Unmount()
|
||||
{
|
||||
mounted = false;
|
||||
extentCache = null;
|
||||
systemFileCache = null;
|
||||
fileCache = null;
|
||||
catalogCache = null;
|
||||
fileSizeCache = null;
|
||||
printedExtents = null;
|
||||
mddf = new MDDF();
|
||||
volumePrefix = 0;
|
||||
devTagSize = 0;
|
||||
srecords = null;
|
||||
_mounted = false;
|
||||
_extentCache = null;
|
||||
_systemFileCache = null;
|
||||
_fileCache = null;
|
||||
_catalogCache = null;
|
||||
_fileSizeCache = null;
|
||||
_printedExtents = null;
|
||||
_mddf = new MDDF();
|
||||
_volumePrefix = 0;
|
||||
_devTagSize = 0;
|
||||
_srecords = null;
|
||||
|
||||
return Errno.NoError;
|
||||
}
|
||||
@@ -385,18 +385,18 @@ namespace Aaru.Filesystems.LisaFS
|
||||
{
|
||||
stat = null;
|
||||
|
||||
if(!mounted)
|
||||
if(!_mounted)
|
||||
return Errno.AccessDenied;
|
||||
|
||||
stat = new FileSystemInfo
|
||||
{
|
||||
Blocks = mddf.vol_size,
|
||||
Blocks = _mddf.vol_size,
|
||||
FilenameLength = (ushort)E_NAME,
|
||||
Files = mddf.filecount,
|
||||
FreeBlocks = mddf.freecount,
|
||||
Files = _mddf.filecount,
|
||||
FreeBlocks = _mddf.freecount,
|
||||
Id =
|
||||
{
|
||||
Serial64 = mddf.volid,
|
||||
Serial64 = _mddf.volid,
|
||||
IsLong = true
|
||||
},
|
||||
PluginId = Id
|
||||
@@ -404,7 +404,7 @@ namespace Aaru.Filesystems.LisaFS
|
||||
|
||||
stat.FreeFiles = FILEID_MAX - stat.Files;
|
||||
|
||||
switch(mddf.fsversion)
|
||||
switch(_mddf.fsversion)
|
||||
{
|
||||
case LISA_V1:
|
||||
stat.Type = "LisaFS v1";
|
||||
|
||||
Reference in New Issue
Block a user