mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
Add interface to pass dump hardware list and CICM XML metadata to/from images.
This commit is contained in:
@@ -38,6 +38,7 @@ using System.Runtime.InteropServices;
|
||||
using DiscImageChef.CommonTypes;
|
||||
using DiscImageChef.Console;
|
||||
using DiscImageChef.Filters;
|
||||
using Schemas;
|
||||
using SharpCompress.Compressors;
|
||||
using SharpCompress.Compressors.Deflate;
|
||||
|
||||
@@ -332,13 +333,10 @@ namespace DiscImageChef.DiscImages
|
||||
{
|
||||
if((offset & QCOW_COMPRESSED) == QCOW_COMPRESSED)
|
||||
{
|
||||
ulong compSizeMask;
|
||||
ulong offMask;
|
||||
|
||||
compSizeMask = (ulong)(1 << (int)(qHdr.cluster_bits - 8)) - 1;
|
||||
byte countbits = (byte)(qHdr.cluster_bits - 8);
|
||||
compSizeMask <<= 62 - countbits;
|
||||
offMask = ~compSizeMask & QCOW_FLAGS_MASK;
|
||||
ulong compSizeMask = (ulong)(1 << (int)(qHdr.cluster_bits - 8)) - 1;
|
||||
byte countbits = (byte)(qHdr.cluster_bits - 8);
|
||||
compSizeMask <<= 62 - countbits;
|
||||
ulong offMask = ~compSizeMask & QCOW_FLAGS_MASK;
|
||||
|
||||
ulong realOff = offset & offMask;
|
||||
ulong compSize = (((offset & compSizeMask) >> (62 - countbits)) + 1) * 512;
|
||||
@@ -494,6 +492,9 @@ namespace DiscImageChef.DiscImages
|
||||
return null;
|
||||
}
|
||||
|
||||
public List<DumpHardwareType> DumpHardware => null;
|
||||
public CICMMetadataType CicmMetadata => null;
|
||||
|
||||
public IEnumerable<MediaTagType> SupportedMediaTags => new MediaTagType[] { };
|
||||
public IEnumerable<SectorTagType> SupportedSectorTags => new SectorTagType[] { };
|
||||
public IEnumerable<MediaType> SupportedMediaTypes =>
|
||||
@@ -824,6 +825,18 @@ namespace DiscImageChef.DiscImages
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool SetDumpHardware(List<DumpHardwareType> dumpHardware)
|
||||
{
|
||||
// Not supported
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool SetCicmMetadata(CICMMetadataType metadata)
|
||||
{
|
||||
// Not supported
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// QCOW header, big-endian
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user