e_afalg_err.c 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /*
  2. * Generated by util/mkerr.pl DO NOT EDIT
  3. * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved.
  4. *
  5. * Licensed under the Apache License 2.0 (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
  9. */
  10. #include <openssl/err.h>
  11. #include "e_afalg_err.h"
  12. #ifndef OPENSSL_NO_ERR
  13. static ERR_STRING_DATA AFALG_str_functs[] = {
  14. {ERR_PACK(0, AFALG_F_AFALG_CHK_PLATFORM, 0), "afalg_chk_platform"},
  15. {ERR_PACK(0, AFALG_F_AFALG_CREATE_SK, 0), "afalg_create_sk"},
  16. {ERR_PACK(0, AFALG_F_AFALG_INIT_AIO, 0), "afalg_init_aio"},
  17. {ERR_PACK(0, AFALG_F_AFALG_SETUP_ASYNC_EVENT_NOTIFICATION, 0),
  18. "afalg_setup_async_event_notification"},
  19. {ERR_PACK(0, AFALG_F_AFALG_SET_KEY, 0), "afalg_set_key"},
  20. {ERR_PACK(0, AFALG_F_BIND_AFALG, 0), "bind_afalg"},
  21. {0, NULL}
  22. };
  23. static ERR_STRING_DATA AFALG_str_reasons[] = {
  24. {ERR_PACK(0, 0, AFALG_R_EVENTFD_FAILED), "eventfd failed"},
  25. {ERR_PACK(0, 0, AFALG_R_FAILED_TO_GET_PLATFORM_INFO),
  26. "failed to get platform info"},
  27. {ERR_PACK(0, 0, AFALG_R_INIT_FAILED), "init failed"},
  28. {ERR_PACK(0, 0, AFALG_R_IO_SETUP_FAILED), "io setup failed"},
  29. {ERR_PACK(0, 0, AFALG_R_KERNEL_DOES_NOT_SUPPORT_AFALG),
  30. "kernel does not support afalg"},
  31. {ERR_PACK(0, 0, AFALG_R_KERNEL_DOES_NOT_SUPPORT_ASYNC_AFALG),
  32. "kernel does not support async afalg"},
  33. {ERR_PACK(0, 0, AFALG_R_MEM_ALLOC_FAILED), "mem alloc failed"},
  34. {ERR_PACK(0, 0, AFALG_R_SOCKET_ACCEPT_FAILED), "socket accept failed"},
  35. {ERR_PACK(0, 0, AFALG_R_SOCKET_BIND_FAILED), "socket bind failed"},
  36. {ERR_PACK(0, 0, AFALG_R_SOCKET_CREATE_FAILED), "socket create failed"},
  37. {ERR_PACK(0, 0, AFALG_R_SOCKET_OPERATION_FAILED),
  38. "socket operation failed"},
  39. {ERR_PACK(0, 0, AFALG_R_SOCKET_SET_KEY_FAILED), "socket set key failed"},
  40. {0, NULL}
  41. };
  42. #endif
  43. static int lib_code = 0;
  44. static int error_loaded = 0;
  45. static int ERR_load_AFALG_strings(void)
  46. {
  47. if (lib_code == 0)
  48. lib_code = ERR_get_next_error_library();
  49. if (!error_loaded) {
  50. #ifndef OPENSSL_NO_ERR
  51. ERR_load_strings(lib_code, AFALG_str_functs);
  52. ERR_load_strings(lib_code, AFALG_str_reasons);
  53. #endif
  54. error_loaded = 1;
  55. }
  56. return 1;
  57. }
  58. static void ERR_unload_AFALG_strings(void)
  59. {
  60. if (error_loaded) {
  61. #ifndef OPENSSL_NO_ERR
  62. ERR_unload_strings(lib_code, AFALG_str_functs);
  63. ERR_unload_strings(lib_code, AFALG_str_reasons);
  64. #endif
  65. error_loaded = 0;
  66. }
  67. }
  68. static void ERR_AFALG_error(int function, int reason, char *file, int line)
  69. {
  70. if (lib_code == 0)
  71. lib_code = ERR_get_next_error_library();
  72. ERR_PUT_error(lib_code, function, reason, file, line);
  73. }