mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
🎨🎨🎨 Removed methods in images that only returned what's already in the ImageInfo structure.
This commit is contained in:
@@ -72,15 +72,15 @@ namespace DiscImageChef.Filesystems
|
||||
|
||||
public override bool Identify(ImagePlugin imagePlugin, Partition partition)
|
||||
{
|
||||
if(imagePlugin.GetSectorSize() < 512) return false;
|
||||
if(imagePlugin.ImageInfo.SectorSize < 512) return false;
|
||||
|
||||
uint sbAddr = REISER_SUPER_OFFSET / imagePlugin.GetSectorSize();
|
||||
uint sbAddr = REISER_SUPER_OFFSET / imagePlugin.ImageInfo.SectorSize;
|
||||
if(sbAddr == 0) sbAddr = 1;
|
||||
|
||||
Reiser_Superblock reiserSb = new Reiser_Superblock();
|
||||
|
||||
uint sbSize = (uint)(Marshal.SizeOf(reiserSb) / imagePlugin.GetSectorSize());
|
||||
if(Marshal.SizeOf(reiserSb) % imagePlugin.GetSectorSize() != 0) sbSize++;
|
||||
uint sbSize = (uint)(Marshal.SizeOf(reiserSb) / imagePlugin.ImageInfo.SectorSize);
|
||||
if(Marshal.SizeOf(reiserSb) % imagePlugin.ImageInfo.SectorSize != 0) sbSize++;
|
||||
|
||||
if(partition.Start + sbAddr + sbSize >= partition.End) return false;
|
||||
|
||||
@@ -99,15 +99,15 @@ namespace DiscImageChef.Filesystems
|
||||
public override void GetInformation(ImagePlugin imagePlugin, Partition partition, out string information)
|
||||
{
|
||||
information = "";
|
||||
if(imagePlugin.GetSectorSize() < 512) return;
|
||||
if(imagePlugin.ImageInfo.SectorSize < 512) return;
|
||||
|
||||
uint sbAddr = REISER_SUPER_OFFSET / imagePlugin.GetSectorSize();
|
||||
uint sbAddr = REISER_SUPER_OFFSET / imagePlugin.ImageInfo.SectorSize;
|
||||
if(sbAddr == 0) sbAddr = 1;
|
||||
|
||||
Reiser_Superblock reiserSb = new Reiser_Superblock();
|
||||
|
||||
uint sbSize = (uint)(Marshal.SizeOf(reiserSb) / imagePlugin.GetSectorSize());
|
||||
if(Marshal.SizeOf(reiserSb) % imagePlugin.GetSectorSize() != 0) sbSize++;
|
||||
uint sbSize = (uint)(Marshal.SizeOf(reiserSb) / imagePlugin.ImageInfo.SectorSize);
|
||||
if(Marshal.SizeOf(reiserSb) % imagePlugin.ImageInfo.SectorSize != 0) sbSize++;
|
||||
|
||||
byte[] sector = imagePlugin.ReadSectors(partition.Start + sbAddr, sbSize);
|
||||
if(sector.Length < Marshal.SizeOf(reiserSb)) return;
|
||||
|
||||
Reference in New Issue
Block a user