X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=include%2Flttng%2Fust-error.h;fp=include%2Flttng%2Fust-error.h;h=49890a965db426b7488c6577b45e843c5c51ee5e;hb=7bc53e94a229963972aa78880b361b1510fdd268;hp=0000000000000000000000000000000000000000;hpb=824a00a7baa26b73d590d7ddae8c3e71fd0c9a66;p=lttng-ust.git diff --git a/include/lttng/ust-error.h b/include/lttng/ust-error.h new file mode 100644 index 00000000..49890a96 --- /dev/null +++ b/include/lttng/ust-error.h @@ -0,0 +1,51 @@ +#ifndef _LTTNG_UST_ERROR_H +#define _LTTNG_UST_ERROR_H + +/* + * Copyright (C) 2011 - David Goulet + * Julien Desfossez + * Mathieu Desnoyers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; only + * version 2.1 of the License. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + * This header is meant for liblttng and libust internal use ONLY. + * These declarations should NOT be considered stable API. + */ + +#include +#include +#include + +/* + * ustcomm error code. + */ +enum lttng_ust_error_code { + LTTNG_UST_OK = 0, /* Ok */ + LTTNG_UST_ERR = 1024, /* Unknown Error */ + LTTNG_UST_ERR_NOENT, /* No entry */ + + /* MUST be last element */ + LTTNG_UST_ERR_NR, /* Last element */ +}; + +/* + * Return a human-readable error message for an lttng-ust error code. + * code must be a positive value (or 0). + */ +extern const char *lttng_ust_strerror(int code); + +#endif /* _LTTNG_UST_ERROR_H */