]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | Implement the constructor and destructor for the EFI socket library\r | |
3 | \r | |
4 | Copyright (c) 2011, Intel Corporation\r | |
5 | All rights reserved. This program and the accompanying materials\r | |
6 | are licensed and made available under the terms and conditions of the BSD License\r | |
7 | which accompanies this distribution. The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.\r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
12 | \r | |
13 | **/\r | |
14 | \r | |
15 | #include "Socket.h"\r | |
16 | \r | |
17 | \r | |
18 | /**\r | |
19 | EFI Socket Library Constructor\r | |
20 | \r | |
21 | @retval EFI_SUCCESS The initialization was successful\r | |
22 | \r | |
23 | **/\r | |
24 | EFI_STATUS\r | |
25 | EFIAPI\r | |
26 | EslConstructor (\r | |
27 | VOID\r | |
28 | )\r | |
29 | {\r | |
30 | EFI_STATUS Status;\r | |
31 | \r | |
32 | DBG_ENTER ( );\r | |
33 | \r | |
34 | //\r | |
35 | // Assume success\r | |
36 | //\r | |
37 | Status = EFI_SUCCESS;\r | |
38 | \r | |
39 | //\r | |
40 | // Call the image dependent constructor if available\r | |
41 | //\r | |
42 | if ( NULL != mpfnEslConstructor ) {\r | |
43 | Status = mpfnEslConstructor ( );\r | |
44 | }\r | |
45 | \r | |
46 | //\r | |
47 | // Return the constructor status\r | |
48 | //\r | |
49 | DBG_EXIT_STATUS ( Status );\r | |
50 | return Status;\r | |
51 | }\r | |
52 | \r | |
53 | \r | |
54 | /**\r | |
55 | EFI Socket Library Destructor\r | |
56 | \r | |
57 | @retval EFI_SUCCESS The shutdown was successful\r | |
58 | \r | |
59 | **/\r | |
60 | EFI_STATUS\r | |
61 | EFIAPI\r | |
62 | EslDestructor (\r | |
63 | VOID\r | |
64 | )\r | |
65 | {\r | |
66 | EFI_STATUS Status;\r | |
67 | \r | |
68 | DBG_ENTER ( );\r | |
69 | \r | |
70 | //\r | |
71 | // Assume success\r | |
72 | //\r | |
73 | Status = EFI_SUCCESS;\r | |
74 | \r | |
75 | //\r | |
76 | // Call the image dependent destructor if available\r | |
77 | //\r | |
78 | if ( NULL != mpfnEslDestructor ) {\r | |
79 | Status = mpfnEslDestructor ( );\r | |
80 | }\r | |
81 | \r | |
82 | //\r | |
83 | // Return the constructor status\r | |
84 | //\r | |
85 | DBG_EXIT_STATUS ( Status );\r | |
86 | return Status;\r | |
87 | }\r |