Add statfs(2) f_flags enumeration.

This commit is contained in:
2015-05-03 18:06:05 +01:00
parent 9812a0e6bd
commit ce14589a5d
3 changed files with 104 additions and 2 deletions

View File

@@ -1,3 +1,9 @@
2015-05-03 Natalia Portillo <claunia@claunia.com>
* Interop/Linux/Interop.Linux.types.cs:
* Interop/Linux/Interop.Linux.statfs.cs:
Add statfs(2) f_flags enumeration.
2015-05-03 Natalia Portillo <claunia@claunia.com>
* Claunia.IO.csproj:

View File

@@ -79,7 +79,7 @@ internal static partial class Interop
/// <summary>
/// Mount flags of filesystem (since Linux 2.6.36)
/// </summary>
Int64 f_flags;
f_flags64_t f_flags;
/// <summary>
/// Padding bytes reserved for future use
/// </summary>
@@ -137,7 +137,7 @@ internal static partial class Interop
/// <summary>
/// Mount flags of filesystem (since Linux 2.6.36)
/// </summary>
Int32 f_flags;
f_flags_t f_flags;
/// <summary>
/// Padding bytes reserved for future use
/// </summary>

View File

@@ -138,5 +138,101 @@ internal static partial class Interop
public Int32 val1;
public Int32 val2;
}
[Flags]
enum f_flags_t : Int32
{
/// <summary>
/// This filesystem is mounted read-only.
/// </summary>
ST_RDONLY = 0x0001,
/// <summary>
/// The set-user-ID and set-group-ID bits are ignored by exec(3) for executable files on this filesystem
/// </summary>
ST_NOSUID = 0x0002,
/// <summary>
/// Disallow access to device special files on this filesystem.
/// </summary>
ST_NODEV = 0x0004,
/// <summary>
/// Execution of programs is disallowed on this filesystem.
/// </summary>
ST_NOEXEC = 0x0008,
/// <summary>
/// Writes are synched to the filesystem immediately (see the description of O_SYNC in open(2)).
/// </summary>
ST_SYNCHRONOUS = 0x0010,
/// <summary>
/// f_flags support is implemented
/// </summary>
ST_VALID = 0x0020,
/// <summary>
/// Mandatory locking is permitted on the filesystem (see fcntl(2)).
/// </summary>
ST_MANDLOCK = 0x0040,
ST_WRITE = 0x0080,
ST_APPEND = 0x0100,
ST_IMMUTABLE = 0x0200,
/// <summary>
/// Do not update access times; see mount(2).
/// </summary>
ST_NOATIME = 0x0400,
/// <summary>
/// Do not update directory access times; see mount(2).
/// </summary>
ST_NODIRATIME = 0x0800,
/// <summary>
/// Update atime relative to mtime/ctime; see mount(2).
/// </summary>
ST_RELATIME = 0x1000
}
[Flags]
enum f_flags64_t : Int64
{
/// <summary>
/// This filesystem is mounted read-only.
/// </summary>
ST_RDONLY = 0x0001,
/// <summary>
/// The set-user-ID and set-group-ID bits are ignored by exec(3) for executable files on this filesystem
/// </summary>
ST_NOSUID = 0x0002,
/// <summary>
/// Disallow access to device special files on this filesystem.
/// </summary>
ST_NODEV = 0x0004,
/// <summary>
/// Execution of programs is disallowed on this filesystem.
/// </summary>
ST_NOEXEC = 0x0008,
/// <summary>
/// Writes are synched to the filesystem immediately (see the description of O_SYNC in open(2)).
/// </summary>
ST_SYNCHRONOUS = 0x0010,
/// <summary>
/// f_flags support is implemented
/// </summary>
ST_VALID = 0x0020,
/// <summary>
/// Mandatory locking is permitted on the filesystem (see fcntl(2)).
/// </summary>
ST_MANDLOCK = 0x0040,
ST_WRITE = 0x0080,
ST_APPEND = 0x0100,
ST_IMMUTABLE = 0x0200,
/// <summary>
/// Do not update access times; see mount(2).
/// </summary>
ST_NOATIME = 0x0400,
/// <summary>
/// Do not update directory access times; see mount(2).
/// </summary>
ST_NODIRATIME = 0x0800,
/// <summary>
/// Update atime relative to mtime/ctime; see mount(2).
/// </summary>
ST_RELATIME = 0x1000
}
}
}