xref: /freebsd/crypto/openssl/engines/e_afalg_err.c (revision b077aed33b7b6aefca7b17ddb250cf521f938613)
1e71b7053SJung-uk Kim /*
2e71b7053SJung-uk Kim  * Generated by util/mkerr.pl DO NOT EDIT
3*b077aed3SPierre Pronchery  * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
4e71b7053SJung-uk Kim  *
5*b077aed3SPierre Pronchery  * Licensed under the Apache License 2.0 (the "License").  You may not use
6e71b7053SJung-uk Kim  * this file except in compliance with the License.  You can obtain a copy
7e71b7053SJung-uk Kim  * in the file LICENSE in the source distribution or at
8e71b7053SJung-uk Kim  * https://www.openssl.org/source/license.html
9e71b7053SJung-uk Kim  */
10e71b7053SJung-uk Kim 
11e71b7053SJung-uk Kim #include <openssl/err.h>
12e71b7053SJung-uk Kim #include "e_afalg_err.h"
13e71b7053SJung-uk Kim 
14e71b7053SJung-uk Kim #ifndef OPENSSL_NO_ERR
15e71b7053SJung-uk Kim 
16e71b7053SJung-uk Kim static ERR_STRING_DATA AFALG_str_reasons[] = {
17e71b7053SJung-uk Kim     {ERR_PACK(0, 0, AFALG_R_EVENTFD_FAILED), "eventfd failed"},
18e71b7053SJung-uk Kim     {ERR_PACK(0, 0, AFALG_R_FAILED_TO_GET_PLATFORM_INFO),
19e71b7053SJung-uk Kim     "failed to get platform info"},
20e71b7053SJung-uk Kim     {ERR_PACK(0, 0, AFALG_R_INIT_FAILED), "init failed"},
21e71b7053SJung-uk Kim     {ERR_PACK(0, 0, AFALG_R_IO_SETUP_FAILED), "io setup failed"},
22e71b7053SJung-uk Kim     {ERR_PACK(0, 0, AFALG_R_KERNEL_DOES_NOT_SUPPORT_AFALG),
23e71b7053SJung-uk Kim     "kernel does not support afalg"},
24e71b7053SJung-uk Kim     {ERR_PACK(0, 0, AFALG_R_KERNEL_DOES_NOT_SUPPORT_ASYNC_AFALG),
25e71b7053SJung-uk Kim     "kernel does not support async afalg"},
26e71b7053SJung-uk Kim     {ERR_PACK(0, 0, AFALG_R_MEM_ALLOC_FAILED), "mem alloc failed"},
27e71b7053SJung-uk Kim     {ERR_PACK(0, 0, AFALG_R_SOCKET_ACCEPT_FAILED), "socket accept failed"},
28e71b7053SJung-uk Kim     {ERR_PACK(0, 0, AFALG_R_SOCKET_BIND_FAILED), "socket bind failed"},
29e71b7053SJung-uk Kim     {ERR_PACK(0, 0, AFALG_R_SOCKET_CREATE_FAILED), "socket create failed"},
30e71b7053SJung-uk Kim     {ERR_PACK(0, 0, AFALG_R_SOCKET_OPERATION_FAILED),
31e71b7053SJung-uk Kim     "socket operation failed"},
32e71b7053SJung-uk Kim     {ERR_PACK(0, 0, AFALG_R_SOCKET_SET_KEY_FAILED), "socket set key failed"},
33e71b7053SJung-uk Kim     {0, NULL}
34e71b7053SJung-uk Kim };
35e71b7053SJung-uk Kim 
36e71b7053SJung-uk Kim #endif
37e71b7053SJung-uk Kim 
38e71b7053SJung-uk Kim static int lib_code = 0;
39e71b7053SJung-uk Kim static int error_loaded = 0;
40e71b7053SJung-uk Kim 
ERR_load_AFALG_strings(void)41e71b7053SJung-uk Kim static int ERR_load_AFALG_strings(void)
42e71b7053SJung-uk Kim {
43e71b7053SJung-uk Kim     if (lib_code == 0)
44e71b7053SJung-uk Kim         lib_code = ERR_get_next_error_library();
45e71b7053SJung-uk Kim 
46e71b7053SJung-uk Kim     if (!error_loaded) {
47e71b7053SJung-uk Kim #ifndef OPENSSL_NO_ERR
48e71b7053SJung-uk Kim         ERR_load_strings(lib_code, AFALG_str_reasons);
49e71b7053SJung-uk Kim #endif
50e71b7053SJung-uk Kim         error_loaded = 1;
51e71b7053SJung-uk Kim     }
52e71b7053SJung-uk Kim     return 1;
53e71b7053SJung-uk Kim }
54e71b7053SJung-uk Kim 
ERR_unload_AFALG_strings(void)55e71b7053SJung-uk Kim static void ERR_unload_AFALG_strings(void)
56e71b7053SJung-uk Kim {
57e71b7053SJung-uk Kim     if (error_loaded) {
58e71b7053SJung-uk Kim #ifndef OPENSSL_NO_ERR
59e71b7053SJung-uk Kim         ERR_unload_strings(lib_code, AFALG_str_reasons);
60e71b7053SJung-uk Kim #endif
61e71b7053SJung-uk Kim         error_loaded = 0;
62e71b7053SJung-uk Kim     }
63e71b7053SJung-uk Kim }
64e71b7053SJung-uk Kim 
ERR_AFALG_error(int function,int reason,const char * file,int line)65*b077aed3SPierre Pronchery static void ERR_AFALG_error(int function, int reason, const char *file, int line)
66e71b7053SJung-uk Kim {
67e71b7053SJung-uk Kim     if (lib_code == 0)
68e71b7053SJung-uk Kim         lib_code = ERR_get_next_error_library();
69*b077aed3SPierre Pronchery     ERR_raise(lib_code, reason);
70*b077aed3SPierre Pronchery     ERR_set_debug(file, line, NULL);
71e71b7053SJung-uk Kim }
72