feat: unify system status codes
This commit is contained in:
1 parent
93894b8fe5
commit
8a3ffb2be1
46 files changed
+1499
-489
No files matched your search
@@ -208,8 +208,38 @@ extern "C" {
|
||||
#define MTK_SYS_USB_BULK_IN_START 182
|
||||
#define MTK_SYS_USB_BULK_IN_STOP 183
|
||||
#define MTK_SYS_USB_BULK_IN_READ 184
|
||||
#define MTK_SYS_SPAWN_CAPS 185
|
||||
#define MTK_SYS_SPAWN_REDIR_CAPS 186
|
||||
#define MTK_SYS_ALLOC_EAGER 187
|
||||
#define MTK_SYS_BATTERYINFO 188
|
||||
#define MTK_SYS_GETCAPS 189
|
||||
#define MTK_SYS_VOLINFO 190
|
||||
#define MTK_SYS_CONSENT_REGISTER 191
|
||||
#define MTK_SYS_CONSENT_NEXT 192
|
||||
#define MTK_SYS_CONSENT_REPLY 193
|
||||
/* @SYSCALLS-END */
|
||||
|
||||
/* Syscall status codes (montauk/statuscodes.h for C++). */
|
||||
/* @STATUS-BEGIN
|
||||
Generated from Common/StatusCodes.hpp by scripts/montauk-syscalls.py.
|
||||
Do not edit by hand; run 'make gen-syscalls' to refresh. */
|
||||
#define MTK_STATUS_SUCCESS (0)
|
||||
#define MTK_STATUS_GENERIC_FAILURE (-1)
|
||||
#define MTK_STATUS_PERMISSION_DENIED (-2)
|
||||
#define MTK_STATUS_CAPABILITY_DENIED (-3)
|
||||
#define MTK_STATUS_SYSTEM_INTEGRITY_ERROR (-4)
|
||||
#define MTK_STATUS_BAD_POINTER (-5)
|
||||
#define MTK_STATUS_INVALID_ARGUMENT (-6)
|
||||
#define MTK_STATUS_UNSUPPORTED_OP (-7)
|
||||
#define MTK_STATUS_NO_DEVICE (-8)
|
||||
#define MTK_STATUS_IO_FAILURE (-9)
|
||||
#define MTK_STATUS_BAD_INVOCATION (-10)
|
||||
#define MTK_STATUS_NO_SUCH_PATH (-11)
|
||||
#define MTK_STATUS_BUSY (-12)
|
||||
#define MTK_STATUS_BUFFER_TOO_SMALL (-13)
|
||||
#define MTK_STATUS_OUT_OF_MEMORY (-14)
|
||||
/* @STATUS-END */
|
||||
|
||||
#define MTK_SOCK_TCP 1
|
||||
#define MTK_SOCK_UDP 2
|
||||
#define MTK_IPC_SIGNAL_READABLE (1u << 0)
|
||||
@@ -683,8 +713,8 @@ static inline int mtk_set_unix_time(int64_t unix_seconds) {
|
||||
return (int)_mtk_syscall1(MTK_SYS_SETUNIXTIME, (long)unix_seconds);
|
||||
}
|
||||
|
||||
static inline void mtk_settz(int offset_minutes) {
|
||||
_mtk_syscall1(MTK_SYS_SETTZ, (long)offset_minutes);
|
||||
static inline int mtk_settz(int offset_minutes) {
|
||||
return (int)_mtk_syscall1(MTK_SYS_SETTZ, (long)offset_minutes);
|
||||
}
|
||||
|
||||
static inline int mtk_gettz(void) {
|
||||
@@ -883,12 +913,12 @@ static inline int mtk_audio_ctl(int handle, int cmd, int value) {
|
||||
Power management
|
||||
==================================================================== */
|
||||
|
||||
static inline void mtk_reset(void) {
|
||||
_mtk_syscall0(MTK_SYS_RESET);
|
||||
static inline int mtk_reset(void) {
|
||||
return (int)_mtk_syscall0(MTK_SYS_RESET);
|
||||
}
|
||||
|
||||
static inline void mtk_shutdown(void) {
|
||||
_mtk_syscall0(MTK_SYS_SHUTDOWN);
|
||||
static inline int mtk_shutdown(void) {
|
||||
return (int)_mtk_syscall0(MTK_SYS_SHUTDOWN);
|
||||
}
|
||||
|
||||
/* ====================================================================
|
||||
|
||||
@@ -21,6 +21,7 @@ typedef struct {
|
||||
/* Byte-oriented C locale only: one byte, one character. */
|
||||
size_t mbstowcs(wchar_t *dst, const char *src, size_t n);
|
||||
int mblen(const char *s, size_t n);
|
||||
size_t mbrtowc(wchar_t *pwc, const char *s, size_t n, mbstate_t *ps);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user