summaryrefslogtreecommitdiff
path: root/kit/status.h
blob: 88eb5e0320c3e3429fd97a72b82568945bab2126 (plain)
1
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
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef KIT_STATUS_H
#define KIT_STATUS_H

#ifndef _GNU_SOURCE
#  define _GNU_SOURCE
#endif

enum {
  KIT_OK                           = 0,
  KIT_PARSING_FAILED               = 1,
  KIT_ERROR_OUT_OF_MEMORY          = (1 << 1),
  KIT_ERROR_INVALID_ARGUMENT       = (1 << 2),
  KIT_ERROR_MKDIR_FAILED           = (1 << 3),
  KIT_ERROR_RMDIR_FAILED           = (1 << 4),
  KIT_ERROR_UNLINK_FAILED          = (1 << 5),
  KIT_ERROR_FILE_ALREADY_EXISTS    = (1 << 6),
  KIT_ERROR_FILE_DOES_NOT_EXIST    = (1 << 7),
  KIT_ERROR_PATH_TOO_LONG          = (1 << 8),
  KIT_ERROR_SOCKETS_STARTUP_FAILED = (1 << 9),
  KIT_ERROR_SOCKET_CONTROL_FAILED  = (1 << 10),
  KIT_ERROR_NAME_TOO_LONG          = (1 << 11),
  KIT_ERROR_INVALID_SIZE           = (1 << 12),
  KIT_ERROR_INVALID_NAME           = (1 << 13),
  KIT_ERROR_INVALID_PATH           = (1 << 14),
  KIT_ERROR_OPEN_FAILED            = (1 << 15),
  KIT_ERROR_TRUNCATE_FAILED        = (1 << 16),
  KIT_ERROR_MAP_FAILED             = (1 << 17),
  KIT_ERROR_UNMAP_FAILED           = (1 << 18),
  KIT_ERROR_SYNC_FAILED            = (1 << 19),
  KIT_ERROR_CLOSE_FAILED           = (1 << 20),
  KIT_ERROR_RESOURCE_UNAVAILABLE   = (1 << 21),
  KIT_ERROR_FORK_FAILED            = (1 << 22),
  KIT_ERROR_EXECVE_FAILED          = (1 << 23),
  KIT_ERROR_WAITPID_FAILED         = (1 << 24),
  KIT_ERROR_PIPE_FAILED            = (1 << 25),
  KIT_ERROR_DUP2_FAILED            = (1 << 26),
  KIT_ERROR_CHDIR_FAILED           = (1 << 27),
  KIT_ERROR_KILL_FAILED            = (1 << 28),
  KIT_ERROR_INTERNAL               = (1 << 30),
  KIT_ERROR_NOT_IMPLEMENTED        = -1,
};

#endif