blob: 18fe9c34e0e27cfffd9ea2492dc22e7438bbc5e2 [file] [log] [blame]
Rich Salzb6cff312016-05-17 17:38:18 -04001/*
Rich Salz52df25c2017-06-07 15:12:03 -04002 * Generated by util/mkerr.pl DO NOT EDIT
3 * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved.
clucey7f458a42016-02-17 13:38:36 +00004 *
Rich Salzb6cff312016-05-17 17:38:18 -04005 * Licensed under the OpenSSL license (the "License"). You may not use
6 * this file except in compliance with the License. You can obtain a copy
7 * in the file LICENSE in the source distribution or at
8 * https://www.openssl.org/source/license.html
clucey7f458a42016-02-17 13:38:36 +00009 */
10
clucey7f458a42016-02-17 13:38:36 +000011#include <openssl/err.h>
12#include "e_afalg_err.h"
13
clucey7f458a42016-02-17 13:38:36 +000014#ifndef OPENSSL_NO_ERR
15
clucey7f458a42016-02-17 13:38:36 +000016static ERR_STRING_DATA AFALG_str_functs[] = {
Rich Salz52df25c2017-06-07 15:12:03 -040017 {ERR_PACK(0, AFALG_F_AFALG_CHK_PLATFORM, 0), "afalg_chk_platform"},
18 {ERR_PACK(0, AFALG_F_AFALG_CREATE_SK, 0), "afalg_create_sk"},
19 {ERR_PACK(0, AFALG_F_AFALG_INIT_AIO, 0), "afalg_init_aio"},
20 {ERR_PACK(0, AFALG_F_AFALG_SETUP_ASYNC_EVENT_NOTIFICATION, 0),
clucey7f458a42016-02-17 13:38:36 +000021 "afalg_setup_async_event_notification"},
Rich Salz52df25c2017-06-07 15:12:03 -040022 {ERR_PACK(0, AFALG_F_AFALG_SET_KEY, 0), "afalg_set_key"},
23 {ERR_PACK(0, AFALG_F_BIND_AFALG, 0), "bind_afalg"},
clucey7f458a42016-02-17 13:38:36 +000024 {0, NULL}
25};
26
27static ERR_STRING_DATA AFALG_str_reasons[] = {
Rich Salz52df25c2017-06-07 15:12:03 -040028 {ERR_PACK(0, 0, AFALG_R_EVENTFD_FAILED), "eventfd failed"},
29 {ERR_PACK(0, 0, AFALG_R_FAILED_TO_GET_PLATFORM_INFO),
30 "failed to get platform info"},
31 {ERR_PACK(0, 0, AFALG_R_INIT_FAILED), "init failed"},
32 {ERR_PACK(0, 0, AFALG_R_IO_SETUP_FAILED), "io setup failed"},
33 {ERR_PACK(0, 0, AFALG_R_KERNEL_DOES_NOT_SUPPORT_AFALG),
34 "kernel does not support afalg"},
35 {ERR_PACK(0, 0, AFALG_R_KERNEL_DOES_NOT_SUPPORT_ASYNC_AFALG),
36 "kernel does not support async afalg"},
37 {ERR_PACK(0, 0, AFALG_R_MEM_ALLOC_FAILED), "mem alloc failed"},
38 {ERR_PACK(0, 0, AFALG_R_SOCKET_ACCEPT_FAILED), "socket accept failed"},
39 {ERR_PACK(0, 0, AFALG_R_SOCKET_BIND_FAILED), "socket bind failed"},
40 {ERR_PACK(0, 0, AFALG_R_SOCKET_CREATE_FAILED), "socket create failed"},
41 {ERR_PACK(0, 0, AFALG_R_SOCKET_OPERATION_FAILED),
42 "socket operation failed"},
43 {ERR_PACK(0, 0, AFALG_R_SOCKET_SET_KEY_FAILED), "socket set key failed"},
clucey7f458a42016-02-17 13:38:36 +000044 {0, NULL}
45};
46
47#endif
48
Rich Salz52df25c2017-06-07 15:12:03 -040049static int lib_code = 0;
50static int error_loaded = 0;
clucey7f458a42016-02-17 13:38:36 +000051
Rich Salz52df25c2017-06-07 15:12:03 -040052static int ERR_load_AFALG_strings(void)
clucey7f458a42016-02-17 13:38:36 +000053{
Rich Salz52df25c2017-06-07 15:12:03 -040054 if (lib_code == 0)
55 lib_code = ERR_get_next_error_library();
clucey7f458a42016-02-17 13:38:36 +000056
Rich Salz52df25c2017-06-07 15:12:03 -040057 if (!error_loaded) {
clucey7f458a42016-02-17 13:38:36 +000058#ifndef OPENSSL_NO_ERR
Rich Salz52df25c2017-06-07 15:12:03 -040059 ERR_load_strings(lib_code, AFALG_str_functs);
60 ERR_load_strings(lib_code, AFALG_str_reasons);
clucey7f458a42016-02-17 13:38:36 +000061#endif
Rich Salz52df25c2017-06-07 15:12:03 -040062 error_loaded = 1;
63 }
64 return 1;
65}
clucey7f458a42016-02-17 13:38:36 +000066
Rich Salz52df25c2017-06-07 15:12:03 -040067static void ERR_unload_AFALG_strings(void)
68{
69 if (error_loaded) {
70#ifndef OPENSSL_NO_ERR
71 ERR_unload_strings(lib_code, AFALG_str_functs);
72 ERR_unload_strings(lib_code, AFALG_str_reasons);
clucey7f458a42016-02-17 13:38:36 +000073#endif
Rich Salz52df25c2017-06-07 15:12:03 -040074 error_loaded = 0;
clucey7f458a42016-02-17 13:38:36 +000075 }
76}
77
Rich Salz52df25c2017-06-07 15:12:03 -040078static void ERR_AFALG_error(int function, int reason, char *file, int line)
clucey7f458a42016-02-17 13:38:36 +000079{
Rich Salz52df25c2017-06-07 15:12:03 -040080 if (lib_code == 0)
81 lib_code = ERR_get_next_error_library();
82 ERR_PUT_error(lib_code, function, reason, file, line);
clucey7f458a42016-02-17 13:38:36 +000083}