libk  Diff

Differences From Artifact [1f7f63c3e2]:

To Artifact [a7232aabca]:


2
3
4
5
6
7
8



9
10
11
12
13
14
15
16




17
18
19
20
21
22
23
..
61
62
63
64
65
66
67


 * ~ lexi hale <lexi@hale.su>
 * one of libk's biggest goals is standardization across
 * software. for this reason, we define here a variety
 * of "magical numbers" used to signal or describe
 * various states, messages, and errors. suggestions are
 * welcome.
 */



#include <k/type.h>

typedef enum kbad {
	// values to be returned by an entry function
	kbad_ok = 0,
		/* the requested operation completed
		 * successfully */





	/* these are synchronized with freebsd's existing
	 * sysexit.h conventions. */
	kbad_usage = 64,
		/* # fbsd EX_USAGE
		 * a usage screen was displayed to the user
		 * on request or due to improperly formed call */
	kbad_data = 65,
................................................................................
		/* # fbsd EX_NOPERM
		 * you or the program do not have permissions
		 * to do the thing requested */
	kbad_conf = 78,
		/* # fbsd EX_CONFIG
		 * your configuration is fucked */
} kbad;









>
>
>








>
>
>
>







 







>
>
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
..
68
69
70
71
72
73
74
75
76
 * ~ lexi hale <lexi@hale.su>
 * one of libk's biggest goals is standardization across
 * software. for this reason, we define here a variety
 * of "magical numbers" used to signal or describe
 * various states, messages, and errors. suggestions are
 * welcome.
 */
#ifndef KImagic
#define KImagic

#include <k/type.h>

typedef enum kbad {
	// values to be returned by an entry function
	kbad_ok = 0,
		/* the requested operation completed
		 * successfully */

	kbad_mem = 1,
		/* the system does not have enough free
		 * memory to complete the requested operation */

	/* these are synchronized with freebsd's existing
	 * sysexit.h conventions. */
	kbad_usage = 64,
		/* # fbsd EX_USAGE
		 * a usage screen was displayed to the user
		 * on request or due to improperly formed call */
	kbad_data = 65,
................................................................................
		/* # fbsd EX_NOPERM
		 * you or the program do not have permissions
		 * to do the thing requested */
	kbad_conf = 78,
		/* # fbsd EX_CONFIG
		 * your configuration is fucked */
} kbad;

#endif