mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Implement ISO9660 statfs.
This commit is contained in:
@@ -42,7 +42,12 @@ namespace DiscImageChef.Filesystems.ISO9660
|
|||||||
// This is coded following ECMA-119.
|
// This is coded following ECMA-119.
|
||||||
public partial class ISO9660 : IReadOnlyFilesystem
|
public partial class ISO9660 : IReadOnlyFilesystem
|
||||||
{
|
{
|
||||||
|
bool debug;
|
||||||
|
IMediaImage image;
|
||||||
|
bool mounted;
|
||||||
Namespace @namespace;
|
Namespace @namespace;
|
||||||
|
List<DecodedDirectoryEntry> rootDirectory;
|
||||||
|
FileSystemInfo statfs;
|
||||||
|
|
||||||
public FileSystemType XmlFsType { get; private set; }
|
public FileSystemType XmlFsType { get; private set; }
|
||||||
public Encoding Encoding { get; private set; }
|
public Encoding Encoding { get; private set; }
|
||||||
|
|||||||
@@ -13,11 +13,6 @@ namespace DiscImageChef.Filesystems.ISO9660
|
|||||||
{
|
{
|
||||||
public partial class ISO9660
|
public partial class ISO9660
|
||||||
{
|
{
|
||||||
bool debug;
|
|
||||||
IMediaImage image;
|
|
||||||
bool mounted;
|
|
||||||
List<DecodedDirectoryEntry> rootDirectory;
|
|
||||||
|
|
||||||
public Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding,
|
public Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding,
|
||||||
Dictionary<string, string> options, string @namespace)
|
Dictionary<string, string> options, string @namespace)
|
||||||
{
|
{
|
||||||
@@ -326,6 +321,18 @@ namespace DiscImageChef.Filesystems.ISO9660
|
|||||||
XmlFsType.Clusters = decodedVd.Blocks;
|
XmlFsType.Clusters = decodedVd.Blocks;
|
||||||
XmlFsType.ClusterSize = decodedVd.BlockSize;
|
XmlFsType.ClusterSize = decodedVd.BlockSize;
|
||||||
|
|
||||||
|
statfs = new FileSystemInfo
|
||||||
|
{
|
||||||
|
Blocks = decodedVd.Blocks,
|
||||||
|
FilenameLength = (ushort)(jolietvd != null
|
||||||
|
? this.@namespace == Namespace.Joliet
|
||||||
|
? 110
|
||||||
|
: 255
|
||||||
|
: 255),
|
||||||
|
PluginId = Id,
|
||||||
|
Type = fsFormat
|
||||||
|
};
|
||||||
|
|
||||||
image = imagePlugin;
|
image = imagePlugin;
|
||||||
mounted = true;
|
mounted = true;
|
||||||
return Errno.NoError;
|
return Errno.NoError;
|
||||||
@@ -341,6 +348,13 @@ namespace DiscImageChef.Filesystems.ISO9660
|
|||||||
return Errno.NoError;
|
return Errno.NoError;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Errno StatFs(out FileSystemInfo stat) => throw new NotImplementedException();
|
public Errno StatFs(out FileSystemInfo stat)
|
||||||
|
{
|
||||||
|
stat = null;
|
||||||
|
if(!mounted) return Errno.AccessDenied;
|
||||||
|
|
||||||
|
stat = statfs.ShallowCopy();
|
||||||
|
return Errno.NoError;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user