Implement listxattr for ISO9660.

This commit is contained in:
2019-07-22 01:29:51 +01:00
parent 2c07e1ace2
commit 9bff9e85b4

View File

@@ -6,7 +6,23 @@ namespace DiscImageChef.Filesystems.ISO9660
{
public partial class ISO9660
{
public Errno ListXAttr(string path, out List<string> xattrs) => throw new NotImplementedException();
public Errno ListXAttr(string path, out List<string> xattrs)
{
xattrs = null;
if(!mounted) return Errno.AccessDenied;
Errno err = GetFileEntry(path, out DecodedDirectoryEntry entry);
if(err != Errno.NoError) return err;
xattrs = new List<string>();
if(entry.AssociatedFile != null)
{
xattrs.Add("org.iso.9660.ea");
}
return Errno.NoError;
}
public Errno GetXattr(string path, string xattr, ref byte[] buf) => throw new NotImplementedException();
}