Clean-up: relayd index: change spaces to tabs
[lttng-tools.git] / src / bin / lttng-sessiond / ust-error-internal.h
1 /*
2 * Copyright (C) 2011 David Goulet <david.goulet@polymtl.ca>
3 * Copyright (C) 2011 Julien Desfossez <julien.desfossez@polymtl.ca>
4 * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
5 *
6 * SPDX-License-Identifier: LGPL-2.1-only
7 *
8 */
9
10 #ifndef _LTTNG_UST_ERROR_H
11 #define _LTTNG_UST_ERROR_H
12
13 /*
14 * This header is meant for liblttng and libust internal use ONLY.
15 * These declarations should NOT be considered stable API.
16 */
17
18 #include <limits.h>
19 #include <unistd.h>
20
21 #include "lttng-ust-abi.h"
22
23 /*
24 * ustcomm error code.
25 */
26 enum lttng_ust_error_code {
27 LTTNG_UST_OK = 0, /* Ok */
28 LTTNG_UST_ERR = 1024, /* Unknown Error */
29 LTTNG_UST_ERR_NOENT = 1025, /* No entry */
30 LTTNG_UST_ERR_EXIST = 1026, /* Object exists */
31 LTTNG_UST_ERR_INVAL = 1027, /* Invalid argument */
32 LTTNG_UST_ERR_PERM = 1028, /* Permission denied */
33 LTTNG_UST_ERR_NOSYS = 1029, /* Not implemented */
34 LTTNG_UST_ERR_EXITING = 1030, /* Process is exiting */
35
36 LTTNG_UST_ERR_INVAL_MAGIC = 1031, /* Invalid magic number */
37 LTTNG_UST_ERR_INVAL_SOCKET_TYPE = 1032, /* Invalid socket type */
38 LTTNG_UST_ERR_UNSUP_MAJOR = 1033, /* Unsupported major version */
39
40 /* MUST be last element */
41 LTTNG_UST_ERR_NR, /* Last element */
42 };
43
44 /*
45 * Return a human-readable error message for an lttng-ust error code.
46 * code must be a positive value (or 0).
47 */
48 extern const char *lttng_ust_strerror(int code);
49
50 #endif /* _LTTNG_UST_ERROR_H */
This page took 0.029594 seconds and 4 git commands to generate.