From 9bff9e85b44ea7706eef499abbb44f0d58808d5f Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Mon, 22 Jul 2019 01:29:51 +0100 Subject: [PATCH] Implement listxattr for ISO9660. --- DiscImageChef.Filesystems/ISO9660/Xattr.cs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/DiscImageChef.Filesystems/ISO9660/Xattr.cs b/DiscImageChef.Filesystems/ISO9660/Xattr.cs index b0bffaece..f412a4b6c 100644 --- a/DiscImageChef.Filesystems/ISO9660/Xattr.cs +++ b/DiscImageChef.Filesystems/ISO9660/Xattr.cs @@ -6,7 +6,23 @@ namespace DiscImageChef.Filesystems.ISO9660 { public partial class ISO9660 { - public Errno ListXAttr(string path, out List xattrs) => throw new NotImplementedException(); + public Errno ListXAttr(string path, out List xattrs) + { + xattrs = null; + if(!mounted) return Errno.AccessDenied; + + Errno err = GetFileEntry(path, out DecodedDirectoryEntry entry); + if(err != Errno.NoError) return err; + + xattrs = new List(); + + 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(); }