mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
* DiscImageChef/Main.cs:
* DiscImageChef/Options.cs: * DiscImageChef/DiscImageChef.csproj: * DiscImageChef/Commands/ExtractFiles.cs: Added command to extract all files from a filesystem. * DiscImageChef.Filesystems/LisaFS/Consts.cs: Corrected comments. Added ftype known values. * DiscImageChef.Filesystems/LisaFS/Dir.cs: Changed field name. * DiscImageChef.Filesystems/LisaFS/Extent.cs: * DiscImageChef.Filesystems/LisaFS/Structs.cs: Reverse engineered new fields from ExtentsFile * DiscImageChef.Filesystems/LisaFS/File.cs: Added support for reading tags. Added flags and ftype fields from ExtentsFile. * DiscImageChef.Filesystems/LisaFS/Xattr.cs: Changed how serial number is returned. Allow to get tags in debug mode as an xattr. * DiscImageChef.Filesystems/Structs.cs: Added PIPE attribute.
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Configuration;
|
||||
|
||||
namespace DiscImageChef.Filesystems.LisaFS
|
||||
{
|
||||
@@ -79,29 +80,40 @@ namespace DiscImageChef.Filesystems.LisaFS
|
||||
|
||||
if(fileId == FILEID_MDDF)
|
||||
xattrs.Add("com.apple.lisa.password");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
return Errno.NoError;
|
||||
ExtentFile file;
|
||||
|
||||
Errno error = ReadExtentsFile(fileId, out file);
|
||||
|
||||
if(error != Errno.NoError)
|
||||
return error;
|
||||
|
||||
xattrs = new List<string>();
|
||||
if(file.password_valid > 0)
|
||||
xattrs.Add("com.apple.lisa.password");
|
||||
xattrs.Add("com.apple.lisa.serial");
|
||||
|
||||
if(!ArrayHelpers.ArrayIsNullOrEmpty(file.LisaInfo))
|
||||
xattrs.Add("com.apple.lisa.label");
|
||||
}
|
||||
|
||||
ExtentFile file;
|
||||
if(debug)
|
||||
xattrs.Add("com.apple.lisa.tags");
|
||||
|
||||
Errno error = ReadExtentsFile(fileId, out file);
|
||||
|
||||
if(error != Errno.NoError)
|
||||
return error;
|
||||
|
||||
xattrs = new List<string>();
|
||||
if((file.flags & 0x08) == 0x08)
|
||||
xattrs.Add("com.apple.lisa.password");
|
||||
xattrs.Add("com.apple.lisa.serial");
|
||||
|
||||
if(!ArrayHelpers.ArrayIsNullOrEmpty(file.LisaInfo))
|
||||
xattrs.Add("com.apple.lisa.label");
|
||||
xattrs.Sort();
|
||||
|
||||
return Errno.NoError;
|
||||
}
|
||||
|
||||
Errno GetXattr(Int16 fileId, string xattr, out byte[] buf)
|
||||
{
|
||||
return GetXattr(fileId, xattr, out buf, false);
|
||||
}
|
||||
|
||||
Errno GetXattr(Int16 fileId, string xattr, out byte[] buf, bool tags)
|
||||
{
|
||||
buf = null;
|
||||
|
||||
@@ -122,6 +134,9 @@ namespace DiscImageChef.Filesystems.LisaFS
|
||||
}
|
||||
}
|
||||
|
||||
if(debug && xattr == "com.apple.lisa.tags")
|
||||
return ReadSystemFile(fileId, out buf, true);
|
||||
|
||||
return Errno.NoSuchExtendedAttribute;
|
||||
}
|
||||
|
||||
@@ -132,7 +147,7 @@ namespace DiscImageChef.Filesystems.LisaFS
|
||||
if(error != Errno.NoError)
|
||||
return error;
|
||||
|
||||
if(xattr == "com.apple.lisa.password" && (file.flags & 0x08) == 0x08)
|
||||
if(xattr == "com.apple.lisa.password" && file.password_valid > 0)
|
||||
{
|
||||
buf = new byte[8];
|
||||
Array.Copy(file.password, 0, buf, 0, 8);
|
||||
@@ -141,8 +156,7 @@ namespace DiscImageChef.Filesystems.LisaFS
|
||||
|
||||
if(xattr == "com.apple.lisa.serial")
|
||||
{
|
||||
buf = new byte[3];
|
||||
Array.Copy(file.serial, 0, buf, 0, 3);
|
||||
buf = Encoding.ASCII.GetBytes(file.serial.ToString());
|
||||
return Errno.NoError;
|
||||
}
|
||||
|
||||
@@ -153,6 +167,9 @@ namespace DiscImageChef.Filesystems.LisaFS
|
||||
return Errno.NoError;
|
||||
}
|
||||
|
||||
if(debug && xattr == "com.apple.lisa.tags")
|
||||
return ReadFile(fileId, out buf, true);
|
||||
|
||||
return Errno.NoSuchExtendedAttribute;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user