Decode "PN" system area.

This commit is contained in:
2019-07-28 17:54:40 +01:00
parent 3c09d6873b
commit f6e09772e6
3 changed files with 14 additions and 0 deletions

View File

@@ -454,6 +454,15 @@ namespace DiscImageChef.Filesystems.ISO9660
systemAreaOff += pxLength;
break;
case RRIP_POSIX_DEV_NO:
byte pnLength = data[systemAreaOff + 2];
entry.PosixDeviceNumber =
Marshal.ByteArrayToStructureLittleEndian<PosixDeviceNumber>(data, systemAreaOff,
Marshal
.SizeOf<PosixDeviceNumber
>());
systemAreaOff += pnLength;
break;
case RRIP_SYMLINK:
case RRIP_NAME:
case RRIP_CHILDLINK:

View File

@@ -182,6 +182,10 @@ namespace DiscImageChef.Filesystems.ISO9660
stat.Attributes |= FileAttributes.Archive;
}
if(entry.PosixDeviceNumber != null)
stat.DeviceNo = (entry.PosixDeviceNumber.Value.dev_t_high << 32) +
entry.PosixDeviceNumber.Value.dev_t_low;
if(entry.AssociatedFile is null || entry.AssociatedFile.Extent == 0 || entry.AssociatedFile.Size == 0)
return Errno.NoError;

View File

@@ -71,6 +71,7 @@ namespace DiscImageChef.Filesystems.ISO9660
public byte Interleave;
public PosixAttributes? PosixAttributes;
public PosixAttributesOld? PosixAttributesOld;
public PosixDeviceNumber? PosixDeviceNumber;
public DecodedDirectoryEntry ResourceFork;
public uint Size;
public DateTime? Timestamp;