Rich Salz | b6cff31 | 2016-05-17 17:38:18 -0400 | [diff] [blame] | 1 | /* |
Rich Salz | 52df25c | 2017-06-07 15:12:03 -0400 | [diff] [blame] | 2 | * Generated by util/mkerr.pl DO NOT EDIT |
| 3 | * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. |
clucey | 7f458a4 | 2016-02-17 13:38:36 +0000 | [diff] [blame] | 4 | * |
Rich Salz | b6cff31 | 2016-05-17 17:38:18 -0400 | [diff] [blame] | 5 | * 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 |
clucey | 7f458a4 | 2016-02-17 13:38:36 +0000 | [diff] [blame] | 9 | */ |
| 10 | |
clucey | 7f458a4 | 2016-02-17 13:38:36 +0000 | [diff] [blame] | 11 | #include <openssl/err.h> |
| 12 | #include "e_afalg_err.h" |
| 13 | |
clucey | 7f458a4 | 2016-02-17 13:38:36 +0000 | [diff] [blame] | 14 | #ifndef OPENSSL_NO_ERR |
| 15 | |
clucey | 7f458a4 | 2016-02-17 13:38:36 +0000 | [diff] [blame] | 16 | static ERR_STRING_DATA AFALG_str_functs[] = { |
Rich Salz | 52df25c | 2017-06-07 15:12:03 -0400 | [diff] [blame] | 17 | {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), |
clucey | 7f458a4 | 2016-02-17 13:38:36 +0000 | [diff] [blame] | 21 | "afalg_setup_async_event_notification"}, |
Rich Salz | 52df25c | 2017-06-07 15:12:03 -0400 | [diff] [blame] | 22 | {ERR_PACK(0, AFALG_F_AFALG_SET_KEY, 0), "afalg_set_key"}, |
| 23 | {ERR_PACK(0, AFALG_F_BIND_AFALG, 0), "bind_afalg"}, |
clucey | 7f458a4 | 2016-02-17 13:38:36 +0000 | [diff] [blame] | 24 | {0, NULL} |
| 25 | }; |
| 26 | |
| 27 | static ERR_STRING_DATA AFALG_str_reasons[] = { |
Rich Salz | 52df25c | 2017-06-07 15:12:03 -0400 | [diff] [blame] | 28 | {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"}, |
clucey | 7f458a4 | 2016-02-17 13:38:36 +0000 | [diff] [blame] | 44 | {0, NULL} |
| 45 | }; |
| 46 | |
| 47 | #endif |
| 48 | |
Rich Salz | 52df25c | 2017-06-07 15:12:03 -0400 | [diff] [blame] | 49 | static int lib_code = 0; |
| 50 | static int error_loaded = 0; |
clucey | 7f458a4 | 2016-02-17 13:38:36 +0000 | [diff] [blame] | 51 | |
Rich Salz | 52df25c | 2017-06-07 15:12:03 -0400 | [diff] [blame] | 52 | static int ERR_load_AFALG_strings(void) |
clucey | 7f458a4 | 2016-02-17 13:38:36 +0000 | [diff] [blame] | 53 | { |
Rich Salz | 52df25c | 2017-06-07 15:12:03 -0400 | [diff] [blame] | 54 | if (lib_code == 0) |
| 55 | lib_code = ERR_get_next_error_library(); |
clucey | 7f458a4 | 2016-02-17 13:38:36 +0000 | [diff] [blame] | 56 | |
Rich Salz | 52df25c | 2017-06-07 15:12:03 -0400 | [diff] [blame] | 57 | if (!error_loaded) { |
clucey | 7f458a4 | 2016-02-17 13:38:36 +0000 | [diff] [blame] | 58 | #ifndef OPENSSL_NO_ERR |
Rich Salz | 52df25c | 2017-06-07 15:12:03 -0400 | [diff] [blame] | 59 | ERR_load_strings(lib_code, AFALG_str_functs); |
| 60 | ERR_load_strings(lib_code, AFALG_str_reasons); |
clucey | 7f458a4 | 2016-02-17 13:38:36 +0000 | [diff] [blame] | 61 | #endif |
Rich Salz | 52df25c | 2017-06-07 15:12:03 -0400 | [diff] [blame] | 62 | error_loaded = 1; |
| 63 | } |
| 64 | return 1; |
| 65 | } |
clucey | 7f458a4 | 2016-02-17 13:38:36 +0000 | [diff] [blame] | 66 | |
Rich Salz | 52df25c | 2017-06-07 15:12:03 -0400 | [diff] [blame] | 67 | static 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); |
clucey | 7f458a4 | 2016-02-17 13:38:36 +0000 | [diff] [blame] | 73 | #endif |
Rich Salz | 52df25c | 2017-06-07 15:12:03 -0400 | [diff] [blame] | 74 | error_loaded = 0; |
clucey | 7f458a4 | 2016-02-17 13:38:36 +0000 | [diff] [blame] | 75 | } |
| 76 | } |
| 77 | |
Rich Salz | 52df25c | 2017-06-07 15:12:03 -0400 | [diff] [blame] | 78 | static void ERR_AFALG_error(int function, int reason, char *file, int line) |
clucey | 7f458a4 | 2016-02-17 13:38:36 +0000 | [diff] [blame] | 79 | { |
Rich Salz | 52df25c | 2017-06-07 15:12:03 -0400 | [diff] [blame] | 80 | if (lib_code == 0) |
| 81 | lib_code = ERR_get_next_error_library(); |
| 82 | ERR_PUT_error(lib_code, function, reason, file, line); |
clucey | 7f458a4 | 2016-02-17 13:38:36 +0000 | [diff] [blame] | 83 | } |