diff --git a/Enums/ErrorNumber.cs b/Enums/ErrorNumber.cs
index 12e9ef7..9760fc1 100644
--- a/Enums/ErrorNumber.cs
+++ b/Enums/ErrorNumber.cs
@@ -36,141 +36,139 @@
// Copyright © 2011-2021 Natalia Portillo
// ****************************************************************************/
-namespace Aaru.CommonTypes.Enums
+namespace Aaru.CommonTypes.Enums;
+
+/// Enumerates error codes. Negative for UNIX error number equivalents, positive for Aaru error numbers.
+public enum ErrorNumber
{
- /// Enumerates error codes. Negative for UNIX error number equivalents, positive for Aaru error numbers.
- public enum ErrorNumber
- {
- NotPermitted = -1,
- /// No such file or directory
- NoSuchFile = -2, NoSuchProcess = -3, InterruptedSyscall = -4,
- /// I/O error
- InOutError = -5, NoSuchDeviceOrAddress = -6, ArgumentListTooLong = -7, ExecutableFormatError = -8,
- BadFileNumber = -9, NoChildProcess = -10, TryAgain = -11,
- OutOfMemory = -12,
- /// Access denied
- AccessDenied = -13, BadAddress = -14, NotABlockDevice = -15,
- /// Busy, cannot complete
- Busy = -16, FileExists = -17, CrossDeviceLink = -18,
- /// No such device
- NoSuchDevice = -19,
- /// Is not a directory (e.g.: trying to ReadDir() a file)
- NotDirectory = -20,
- /// Is a directory (e.g.: trying to Read() a dir)
- IsDirectory = -21,
- /// Invalid argument
- InvalidArgument = -22, FileTableOverflow = -23, TooManyOpenFiles = -24, NotTypewriter = -25,
- TextFileBusy = -26,
- /// File is too large
- FileTooLarge = -27, NoSpaceLeft = -28, IllegalSeek = -29, ReadOnly = -30,
- TooManyLinks = -31, BrokenPipe = -32, OutOfDomain = -33,
- OutOfRange = -34, DeadlockWouldOccur = -35,
- /// Name is too long
- NameTooLong = -36, NoLocksAvailable = -37,
- /// Not implemented
- NotImplemented = -38,
- /// There is no data available
- NoData = -61,
- /// Link is severed
- SeveredLink = -67,
- /// There is no such attribute
- NoSuchExtendedAttribute = NoData,
- /// Not supported
- NotSupported = -252, EPERM = NotPermitted,
- /// No such file or directory
- ENOENT = NoSuchFile, ESRCH = NoSuchProcess, EINTR = InterruptedSyscall,
- /// I/O error
- EIO = InOutError, ENXIO = NoSuchDeviceOrAddress, E2BIG = ArgumentListTooLong, ENOEXEC = ExecutableFormatError,
- EBADF = BadFileNumber, ECHILD = NoChildProcess, EAGAIN = TryAgain,
- ENOMEM = OutOfMemory,
- /// Access denied
- EACCES = AccessDenied, EFAULT = BadAddress, ENOTBLK = NotABlockDevice,
- /// Busy, cannot complete
- EBUSY = Busy, EEXIST = FileExists, EXDEV = CrossDeviceLink,
- /// No such device
- ENODEV = NoSuchDevice,
- /// Is not a directory (e.g.: trying to ReadDir() a file)
- ENOTDIR = NotDirectory,
- /// Is a directory (e.g.: trying to Read() a dir)
- EISDIR = IsDirectory,
- /// Invalid argument
- EINVAL = InvalidArgument, ENFILE = FileTableOverflow, EMFILE = TooManyOpenFiles, ENOTTY = NotTypewriter,
- ETXTBSY = TextFileBusy,
- /// File is too large
- EFBIG = FileTooLarge, ENOSPC = NoSpaceLeft, ESPIPE = IllegalSeek, EROFS = ReadOnly,
- EMLINK = TooManyLinks, EPIPE = BrokenPipe, EDOM = OutOfDomain,
- ERANGE = OutOfRange, EDEADLK = DeadlockWouldOccur,
- /// Name is too long
- ENAMETOOLONG = NameTooLong, ENOLCK = NoLocksAvailable,
- /// Not implemented
- ENOSYS = NotImplemented,
- /// Link is severed
- ENOLINK = SeveredLink,
- /// Not supported
- ENOTSUP = NotSupported, DirectoryNotEmpty = -39, TooManySymbolicLinks = -40, ENOTEMPTY = DirectoryNotEmpty,
- ELOOP = TooManySymbolicLinks,
- /// There is no such attribute
- ENOATTR = NoSuchExtendedAttribute,
- /// There is no data available
- ENODATA = NoData,
- /// No error
- NoError = 0,
- /// User requested help to be shown
- HelpRequested = 1,
- /// Command found nothing
- NothingFound = 2,
- /// Media has been already dumped completely
- AlreadyDumped = 3,
- /// Image and its sectors cannot be verified
- NotVerifiable = 4,
- /// There are bad sectors and image cannot be verified
- BadSectorsImageNotVerified = 5,
- /// All sectors are good and image cannot be verified
- CorrectSectorsImageNotVerified = 6,
- /// Image is bad and sectors cannot be verified
- BadImageSectorsNotVerified = 7,
- /// Image is bad and there are bad sectors
- BadImageBadSectors = 8,
- /// All sectors are good and image is bad
- CorrectSectorsBadImage = 9,
- /// Image is good and sectors cannot be verified
- CorrectImageSectorsNotVerified = 10,
- /// Image is good and there are bad sectors
- CorrectImageBadSectors = 11,
- /// Exception has been raised
- UnexpectedException = 12,
- /// The number of arguments is not as expected
- UnexpectedArgumentCount = 13,
- /// A required argument is not present
- MissingArgument = 14,
- /// The specified file cannot be opened
- CannotOpenFile = 15,
- /// The specified encoding cannot be found
- EncodingUnknown = 16,
- /// The image format has not been recognized
- UnrecognizedFormat = 17,
- /// The image format failed to open
- CannotOpenFormat = 18,
- /// The specified metadata sidecar does not have the correct format
- InvalidSidecar = 19,
- /// The specified resume map does not have the correct format
- InvalidResume = 20,
- /// The specified image format cannot be found
- FormatNotFound = 21,
- /// More than one format found for the specified search criteria
- TooManyFormats = 22,
- /// The specified format does not support the specified media
- UnsupportedMedia = 23,
- /// Data will be lost writing the specified format
- DataWillBeLost = 24,
- /// Cannot create destination format
- CannotCreateFormat = 25,
- /// Error writing data
- WriteError = 26,
- /// Cannot open device
- CannotOpenDevice = 27,
- /// Cannot remove the existing database
- CannotRemoveDatabase = 28,
- SectorNotFound=29
- }
+ NotPermitted = -1,
+ /// No such file or directory
+ NoSuchFile = -2, NoSuchProcess = -3, InterruptedSyscall = -4,
+ /// I/O error
+ InOutError = -5, NoSuchDeviceOrAddress = -6, ArgumentListTooLong = -7, ExecutableFormatError = -8,
+ BadFileNumber = -9, NoChildProcess = -10, TryAgain = -11,
+ OutOfMemory = -12,
+ /// Access denied
+ AccessDenied = -13, BadAddress = -14, NotABlockDevice = -15,
+ /// Busy, cannot complete
+ Busy = -16, FileExists = -17, CrossDeviceLink = -18,
+ /// No such device
+ NoSuchDevice = -19,
+ /// Is not a directory (e.g.: trying to ReadDir() a file)
+ NotDirectory = -20,
+ /// Is a directory (e.g.: trying to Read() a dir)
+ IsDirectory = -21,
+ /// Invalid argument
+ InvalidArgument = -22, FileTableOverflow = -23, TooManyOpenFiles = -24, NotTypewriter = -25,
+ TextFileBusy = -26,
+ /// File is too large
+ FileTooLarge = -27, NoSpaceLeft = -28, IllegalSeek = -29, ReadOnly = -30,
+ TooManyLinks = -31, BrokenPipe = -32, OutOfDomain = -33,
+ OutOfRange = -34, DeadlockWouldOccur = -35,
+ /// Name is too long
+ NameTooLong = -36, NoLocksAvailable = -37,
+ /// Not implemented
+ NotImplemented = -38,
+ /// There is no data available
+ NoData = -61,
+ /// Link is severed
+ SeveredLink = -67,
+ /// There is no such attribute
+ NoSuchExtendedAttribute = NoData,
+ /// Not supported
+ NotSupported = -252, EPERM = NotPermitted,
+ /// No such file or directory
+ ENOENT = NoSuchFile, ESRCH = NoSuchProcess, EINTR = InterruptedSyscall,
+ /// I/O error
+ EIO = InOutError, ENXIO = NoSuchDeviceOrAddress, E2BIG = ArgumentListTooLong, ENOEXEC = ExecutableFormatError,
+ EBADF = BadFileNumber, ECHILD = NoChildProcess, EAGAIN = TryAgain,
+ ENOMEM = OutOfMemory,
+ /// Access denied
+ EACCES = AccessDenied, EFAULT = BadAddress, ENOTBLK = NotABlockDevice,
+ /// Busy, cannot complete
+ EBUSY = Busy, EEXIST = FileExists, EXDEV = CrossDeviceLink,
+ /// No such device
+ ENODEV = NoSuchDevice,
+ /// Is not a directory (e.g.: trying to ReadDir() a file)
+ ENOTDIR = NotDirectory,
+ /// Is a directory (e.g.: trying to Read() a dir)
+ EISDIR = IsDirectory,
+ /// Invalid argument
+ EINVAL = InvalidArgument, ENFILE = FileTableOverflow, EMFILE = TooManyOpenFiles, ENOTTY = NotTypewriter,
+ ETXTBSY = TextFileBusy,
+ /// File is too large
+ EFBIG = FileTooLarge, ENOSPC = NoSpaceLeft, ESPIPE = IllegalSeek, EROFS = ReadOnly,
+ EMLINK = TooManyLinks, EPIPE = BrokenPipe, EDOM = OutOfDomain,
+ ERANGE = OutOfRange, EDEADLK = DeadlockWouldOccur,
+ /// Name is too long
+ ENAMETOOLONG = NameTooLong, ENOLCK = NoLocksAvailable,
+ /// Not implemented
+ ENOSYS = NotImplemented,
+ /// Link is severed
+ ENOLINK = SeveredLink,
+ /// Not supported
+ ENOTSUP = NotSupported, DirectoryNotEmpty = -39, TooManySymbolicLinks = -40, ENOTEMPTY = DirectoryNotEmpty,
+ ELOOP = TooManySymbolicLinks,
+ /// There is no such attribute
+ ENOATTR = NoSuchExtendedAttribute,
+ /// There is no data available
+ ENODATA = NoData,
+ /// No error
+ NoError = 0,
+ /// User requested help to be shown
+ HelpRequested = 1,
+ /// Command found nothing
+ NothingFound = 2,
+ /// Media has been already dumped completely
+ AlreadyDumped = 3,
+ /// Image and its sectors cannot be verified
+ NotVerifiable = 4,
+ /// There are bad sectors and image cannot be verified
+ BadSectorsImageNotVerified = 5,
+ /// All sectors are good and image cannot be verified
+ CorrectSectorsImageNotVerified = 6,
+ /// Image is bad and sectors cannot be verified
+ BadImageSectorsNotVerified = 7,
+ /// Image is bad and there are bad sectors
+ BadImageBadSectors = 8,
+ /// All sectors are good and image is bad
+ CorrectSectorsBadImage = 9,
+ /// Image is good and sectors cannot be verified
+ CorrectImageSectorsNotVerified = 10,
+ /// Image is good and there are bad sectors
+ CorrectImageBadSectors = 11,
+ /// Exception has been raised
+ UnexpectedException = 12,
+ /// The number of arguments is not as expected
+ UnexpectedArgumentCount = 13,
+ /// A required argument is not present
+ MissingArgument = 14,
+ /// The specified file cannot be opened
+ CannotOpenFile = 15,
+ /// The specified encoding cannot be found
+ EncodingUnknown = 16,
+ /// The image format has not been recognized
+ UnrecognizedFormat = 17,
+ /// The image format failed to open
+ CannotOpenFormat = 18,
+ /// The specified metadata sidecar does not have the correct format
+ InvalidSidecar = 19,
+ /// The specified resume map does not have the correct format
+ InvalidResume = 20,
+ /// The specified image format cannot be found
+ FormatNotFound = 21,
+ /// More than one format found for the specified search criteria
+ TooManyFormats = 22,
+ /// The specified format does not support the specified media
+ UnsupportedMedia = 23,
+ /// Data will be lost writing the specified format
+ DataWillBeLost = 24,
+ /// Cannot create destination format
+ CannotCreateFormat = 25,
+ /// Error writing data
+ WriteError = 26,
+ /// Cannot open device
+ CannotOpenDevice = 27,
+ /// Cannot remove the existing database
+ CannotRemoveDatabase = 28, SectorNotFound = 29, NotOpened = 30
}
\ No newline at end of file