Merge branch 'sysexits-rust' into 'master'
move sysexits header from C to Rust See merge request redox-os/relibc!1359
This commit is contained in:
@@ -1,21 +0,0 @@
|
||||
#ifndef _SYSEXITS_H
|
||||
#define _SYSEXITS_H
|
||||
|
||||
#define EX_OK 0
|
||||
#define EX_USAGE 64
|
||||
#define EX_DATAERR 65
|
||||
#define EX_NOINPUT 66
|
||||
#define EX_NOUSER 67
|
||||
#define EX_NOHOST 68
|
||||
#define EX_UNAVAILABLE 69
|
||||
#define EX_SOFTWARE 70
|
||||
#define EX_OSERR 71
|
||||
#define EX_OSFILE 72
|
||||
#define EX_CANTCREAT 73
|
||||
#define EX_IOERR 74
|
||||
#define EX_TEMPFAIL 75
|
||||
#define EX_PROTOCOL 76
|
||||
#define EX_NOPERM 77
|
||||
#define EX_CONFIG 78
|
||||
|
||||
#endif /* _SYSEXITS_H */
|
||||
@@ -163,6 +163,7 @@ pub mod sys_uio;
|
||||
pub mod sys_un;
|
||||
pub mod sys_utsname;
|
||||
pub mod sys_wait;
|
||||
pub mod sysexits;
|
||||
pub mod tar;
|
||||
// TODO: term.h (deprecated)
|
||||
pub mod termios;
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
sys_includes = []
|
||||
include_guard = "_RELIBC_SYSEXITS_H"
|
||||
language = "C"
|
||||
style = "type"
|
||||
no_includes = true
|
||||
cpp_compat = true
|
||||
|
||||
[enum]
|
||||
prefix_with_name = true
|
||||
@@ -0,0 +1,38 @@
|
||||
//! `sysexits.h` implementation.
|
||||
//!
|
||||
//! Non-POSIX, see <https://www.man7.org/linux/man-pages/man3/sysexits.h.3head.html>.
|
||||
|
||||
use crate::platform::types::c_int;
|
||||
|
||||
/// Successful termination.
|
||||
pub const EX_OK: c_int = 0;
|
||||
/// Command line usage error.
|
||||
pub const EX_USAGE: c_int = 64;
|
||||
/// Data format error.
|
||||
pub const EX_DATAERR: c_int = 65;
|
||||
/// Cannot open input.
|
||||
pub const EX_NOINPUT: c_int = 66;
|
||||
/// Addressee unknown.
|
||||
pub const EX_NOUSER: c_int = 67;
|
||||
/// Host name unknown.
|
||||
pub const EX_NOHOST: c_int = 68;
|
||||
/// Service unavailable.
|
||||
pub const EX_UNAVAILABLE: c_int = 69;
|
||||
/// Internal software error.
|
||||
pub const EX_SOFTWARE: c_int = 70;
|
||||
/// System error (e.g., can't fork).
|
||||
pub const EX_OSERR: c_int = 71;
|
||||
/// Critical OS file missing.
|
||||
pub const EX_OSFILE: c_int = 72;
|
||||
/// Can't create (user) output file.
|
||||
pub const EX_CANTCREAT: c_int = 73;
|
||||
/// Input/Output error.
|
||||
pub const EX_IOERR: c_int = 74;
|
||||
/// Temp failure; user is invited to retry.
|
||||
pub const EX_TEMPFAIL: c_int = 75;
|
||||
/// Remote error in protocol.
|
||||
pub const EX_PROTOCOL: c_int = 76;
|
||||
/// Permission denied.
|
||||
pub const EX_NOPERM: c_int = 77;
|
||||
/// Configuration error.
|
||||
pub const EX_CONFIG: c_int = 78;
|
||||
Reference in New Issue
Block a user