From ea453d8bff57b28b1eaa5a80566ec39eab73c946 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Fri, 17 Apr 2026 00:00:11 -0400 Subject: [PATCH] head: sys: Add sys/status.h for error codes Signed-off-by: Ian Moffett --- usr/src/head/sys/status.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 usr/src/head/sys/status.h diff --git a/usr/src/head/sys/status.h b/usr/src/head/sys/status.h new file mode 100644 index 0000000..5623340 --- /dev/null +++ b/usr/src/head/sys/status.h @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2026, Mirocom Laboratories + * All rights reserved. + * + * The following sources are CONFIDENTIAL and PROPRIETARY + * property of Mirocom Laboratories. Unauthorized copying, + * use, distribution or modification of this file, in whole + * and in part, is strictly prohibited without the prior written + * consent from Mirocom Laboratories. + */ + +#ifndef _SYS_STATUS_H_ +#define _SYS_STATUS_H_ 1 + +#include + +/* Status return type */ +typedef uint16_t status_t; + +/* Valid status codes */ +#define STATUS_SUCCESS 0 /* Success! :3 */ +#define STATUS_FAILURE 1 /* Failure :( */ +#define STATUS_NOT_FOUND 2 /* Resource not found */ +#define STATUS_NO_MEMORY 3 /* Out of memory */ +#define STATUS_INVALID_PARAM 4 /* Invalid parameter */ +#define STATUS_IO_ERROR 5 /* I/O error */ +#define STATUS_NO_DEV 6 /* No such device */ + +#endif /* !_SYS_STATUS_H_ */