diff --git a/Claunia.IO/ChangeLog b/Claunia.IO/ChangeLog index bfb6c80..408d20d 100644 --- a/Claunia.IO/ChangeLog +++ b/Claunia.IO/ChangeLog @@ -1,3 +1,9 @@ +2015-05-03 Natalia Portillo + + * Interop/Linux/Interop.Linux.types.cs: + * Interop/Linux/Interop.Linux.statfs.cs: + Add statfs(2) f_flags enumeration. + 2015-05-03 Natalia Portillo * Claunia.IO.csproj: diff --git a/Claunia.IO/Interop/Linux/Interop.Linux.statfs.cs b/Claunia.IO/Interop/Linux/Interop.Linux.statfs.cs index 7853934..26612d1 100644 --- a/Claunia.IO/Interop/Linux/Interop.Linux.statfs.cs +++ b/Claunia.IO/Interop/Linux/Interop.Linux.statfs.cs @@ -79,7 +79,7 @@ internal static partial class Interop /// /// Mount flags of filesystem (since Linux 2.6.36) /// - Int64 f_flags; + f_flags64_t f_flags; /// /// Padding bytes reserved for future use /// @@ -137,7 +137,7 @@ internal static partial class Interop /// /// Mount flags of filesystem (since Linux 2.6.36) /// - Int32 f_flags; + f_flags_t f_flags; /// /// Padding bytes reserved for future use /// diff --git a/Claunia.IO/Interop/Linux/Interop.Linux.types.cs b/Claunia.IO/Interop/Linux/Interop.Linux.types.cs index 7ad134d..1f34425 100644 --- a/Claunia.IO/Interop/Linux/Interop.Linux.types.cs +++ b/Claunia.IO/Interop/Linux/Interop.Linux.types.cs @@ -138,5 +138,101 @@ internal static partial class Interop public Int32 val1; public Int32 val2; } + + [Flags] + enum f_flags_t : Int32 + { + /// + /// This filesystem is mounted read-only. + /// + ST_RDONLY = 0x0001, + /// + /// The set-user-ID and set-group-ID bits are ignored by exec(3) for executable files on this filesystem + /// + ST_NOSUID = 0x0002, + /// + /// Disallow access to device special files on this filesystem. + /// + ST_NODEV = 0x0004, + /// + /// Execution of programs is disallowed on this filesystem. + /// + ST_NOEXEC = 0x0008, + /// + /// Writes are synched to the filesystem immediately (see the description of O_SYNC in open(2)). + /// + ST_SYNCHRONOUS = 0x0010, + /// + /// f_flags support is implemented + /// + ST_VALID = 0x0020, + /// + /// Mandatory locking is permitted on the filesystem (see fcntl(2)). + /// + ST_MANDLOCK = 0x0040, + ST_WRITE = 0x0080, + ST_APPEND = 0x0100, + ST_IMMUTABLE = 0x0200, + /// + /// Do not update access times; see mount(2). + /// + ST_NOATIME = 0x0400, + /// + /// Do not update directory access times; see mount(2). + /// + ST_NODIRATIME = 0x0800, + /// + /// Update atime relative to mtime/ctime; see mount(2). + /// + ST_RELATIME = 0x1000 + } + + [Flags] + enum f_flags64_t : Int64 + { + /// + /// This filesystem is mounted read-only. + /// + ST_RDONLY = 0x0001, + /// + /// The set-user-ID and set-group-ID bits are ignored by exec(3) for executable files on this filesystem + /// + ST_NOSUID = 0x0002, + /// + /// Disallow access to device special files on this filesystem. + /// + ST_NODEV = 0x0004, + /// + /// Execution of programs is disallowed on this filesystem. + /// + ST_NOEXEC = 0x0008, + /// + /// Writes are synched to the filesystem immediately (see the description of O_SYNC in open(2)). + /// + ST_SYNCHRONOUS = 0x0010, + /// + /// f_flags support is implemented + /// + ST_VALID = 0x0020, + /// + /// Mandatory locking is permitted on the filesystem (see fcntl(2)). + /// + ST_MANDLOCK = 0x0040, + ST_WRITE = 0x0080, + ST_APPEND = 0x0100, + ST_IMMUTABLE = 0x0200, + /// + /// Do not update access times; see mount(2). + /// + ST_NOATIME = 0x0400, + /// + /// Do not update directory access times; see mount(2). + /// + ST_NODIRATIME = 0x0800, + /// + /// Update atime relative to mtime/ctime; see mount(2). + /// + ST_RELATIME = 0x1000 + } } } \ No newline at end of file