1949f388f5fa361e3be374f59edc09b92296abe03andrewfish/** @file
2949f388f5fa361e3be374f59edc09b92296abe03andrewfish
3949f388f5fa361e3be374f59edc09b92296abe03andrewfishCopyright (c) 2006, Intel Corporation. All rights reserved.<BR>
4d18d8a1d0e370f8ce6ccc2725f4170586d457e53jljustenThis program and the accompanying materials
5d18d8a1d0e370f8ce6ccc2725f4170586d457e53jljustenare licensed and made available under the terms and conditions of the BSD License
6d18d8a1d0e370f8ce6ccc2725f4170586d457e53jljustenwhich accompanies this distribution.  The full text of the license may be found at
7d18d8a1d0e370f8ce6ccc2725f4170586d457e53jljustenhttp://opensource.org/licenses/bsd-license.php
8d18d8a1d0e370f8ce6ccc2725f4170586d457e53jljusten
9d18d8a1d0e370f8ce6ccc2725f4170586d457e53jljustenTHE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10d18d8a1d0e370f8ce6ccc2725f4170586d457e53jljustenWITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11949f388f5fa361e3be374f59edc09b92296abe03andrewfish
12949f388f5fa361e3be374f59edc09b92296abe03andrewfish**/
13949f388f5fa361e3be374f59edc09b92296abe03andrewfish
14949f388f5fa361e3be374f59edc09b92296abe03andrewfish#include "EmuSimpleFileSystem.h"
15949f388f5fa361e3be374f59edc09b92296abe03andrewfish
16949f388f5fa361e3be374f59edc09b92296abe03andrewfish//
17949f388f5fa361e3be374f59edc09b92296abe03andrewfish// EFI Component Name Functions
18949f388f5fa361e3be374f59edc09b92296abe03andrewfish//
19949f388f5fa361e3be374f59edc09b92296abe03andrewfishEFI_STATUS
20949f388f5fa361e3be374f59edc09b92296abe03andrewfishEFIAPI
21949f388f5fa361e3be374f59edc09b92296abe03andrewfishEmuSimpleFileSystemComponentNameGetDriverName (
22949f388f5fa361e3be374f59edc09b92296abe03andrewfish  IN  EFI_COMPONENT_NAME_PROTOCOL  *This,
23949f388f5fa361e3be374f59edc09b92296abe03andrewfish  IN  CHAR8                        *Language,
24949f388f5fa361e3be374f59edc09b92296abe03andrewfish  OUT CHAR16                       **DriverName
25949f388f5fa361e3be374f59edc09b92296abe03andrewfish  );
26949f388f5fa361e3be374f59edc09b92296abe03andrewfish
27949f388f5fa361e3be374f59edc09b92296abe03andrewfishEFI_STATUS
28949f388f5fa361e3be374f59edc09b92296abe03andrewfishEFIAPI
29949f388f5fa361e3be374f59edc09b92296abe03andrewfishEmuSimpleFileSystemComponentNameGetControllerName (
30949f388f5fa361e3be374f59edc09b92296abe03andrewfish  IN  EFI_COMPONENT_NAME_PROTOCOL                                        *This,
31949f388f5fa361e3be374f59edc09b92296abe03andrewfish  IN  EFI_HANDLE                                                         ControllerHandle,
32949f388f5fa361e3be374f59edc09b92296abe03andrewfish  IN  EFI_HANDLE                                                         ChildHandle        OPTIONAL,
33949f388f5fa361e3be374f59edc09b92296abe03andrewfish  IN  CHAR8                                                              *Language,
34949f388f5fa361e3be374f59edc09b92296abe03andrewfish  OUT CHAR16                                                             **ControllerName
35949f388f5fa361e3be374f59edc09b92296abe03andrewfish  );
36949f388f5fa361e3be374f59edc09b92296abe03andrewfish
37949f388f5fa361e3be374f59edc09b92296abe03andrewfish//
38949f388f5fa361e3be374f59edc09b92296abe03andrewfish// EFI Component Name Protocol
39949f388f5fa361e3be374f59edc09b92296abe03andrewfish//
40949f388f5fa361e3be374f59edc09b92296abe03andrewfishGLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME_PROTOCOL  gEmuSimpleFileSystemComponentName = {
41949f388f5fa361e3be374f59edc09b92296abe03andrewfish  EmuSimpleFileSystemComponentNameGetDriverName,
42949f388f5fa361e3be374f59edc09b92296abe03andrewfish  EmuSimpleFileSystemComponentNameGetControllerName,
43949f388f5fa361e3be374f59edc09b92296abe03andrewfish  "eng"
44949f388f5fa361e3be374f59edc09b92296abe03andrewfish};
45949f388f5fa361e3be374f59edc09b92296abe03andrewfish
46949f388f5fa361e3be374f59edc09b92296abe03andrewfishGLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL  gEmuSimpleFileSystemComponentName2 = {
47949f388f5fa361e3be374f59edc09b92296abe03andrewfish  (EFI_COMPONENT_NAME2_GET_DRIVER_NAME)EmuSimpleFileSystemComponentNameGetDriverName,
48949f388f5fa361e3be374f59edc09b92296abe03andrewfish  (EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME)EmuSimpleFileSystemComponentNameGetControllerName,
49949f388f5fa361e3be374f59edc09b92296abe03andrewfish  "en"
50949f388f5fa361e3be374f59edc09b92296abe03andrewfish};
51949f388f5fa361e3be374f59edc09b92296abe03andrewfish
52949f388f5fa361e3be374f59edc09b92296abe03andrewfishEFI_UNICODE_STRING_TABLE mEmuSimpleFileSystemDriverNameTable[] = {
53949f388f5fa361e3be374f59edc09b92296abe03andrewfish  {
54949f388f5fa361e3be374f59edc09b92296abe03andrewfish    "eng;en",
55949f388f5fa361e3be374f59edc09b92296abe03andrewfish    L"Emu Simple File System Driver"
56949f388f5fa361e3be374f59edc09b92296abe03andrewfish  },
57949f388f5fa361e3be374f59edc09b92296abe03andrewfish  {
58949f388f5fa361e3be374f59edc09b92296abe03andrewfish    NULL,
59949f388f5fa361e3be374f59edc09b92296abe03andrewfish    NULL
60949f388f5fa361e3be374f59edc09b92296abe03andrewfish  }
61949f388f5fa361e3be374f59edc09b92296abe03andrewfish};
62949f388f5fa361e3be374f59edc09b92296abe03andrewfish
63949f388f5fa361e3be374f59edc09b92296abe03andrewfish/**
64949f388f5fa361e3be374f59edc09b92296abe03andrewfish  Retrieves a Unicode string that is the user readable name of the driver.
65949f388f5fa361e3be374f59edc09b92296abe03andrewfish
66949f388f5fa361e3be374f59edc09b92296abe03andrewfish  This function retrieves the user readable name of a driver in the form of a
67949f388f5fa361e3be374f59edc09b92296abe03andrewfish  Unicode string. If the driver specified by This has a user readable name in
68949f388f5fa361e3be374f59edc09b92296abe03andrewfish  the language specified by Language, then a pointer to the driver name is
69949f388f5fa361e3be374f59edc09b92296abe03andrewfish  returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
70949f388f5fa361e3be374f59edc09b92296abe03andrewfish  by This does not support the language specified by Language,
71949f388f5fa361e3be374f59edc09b92296abe03andrewfish  then EFI_UNSUPPORTED is returned.
72949f388f5fa361e3be374f59edc09b92296abe03andrewfish
73949f388f5fa361e3be374f59edc09b92296abe03andrewfish  @param  This[in]              A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
74949f388f5fa361e3be374f59edc09b92296abe03andrewfish                                EFI_COMPONENT_NAME_PROTOCOL instance.
75949f388f5fa361e3be374f59edc09b92296abe03andrewfish
76949f388f5fa361e3be374f59edc09b92296abe03andrewfish  @param  Language[in]          A pointer to a Null-terminated ASCII string
77949f388f5fa361e3be374f59edc09b92296abe03andrewfish                                array indicating the language. This is the
78949f388f5fa361e3be374f59edc09b92296abe03andrewfish                                language of the driver name that the caller is
79949f388f5fa361e3be374f59edc09b92296abe03andrewfish                                requesting, and it must match one of the
80949f388f5fa361e3be374f59edc09b92296abe03andrewfish                                languages specified in SupportedLanguages. The
81949f388f5fa361e3be374f59edc09b92296abe03andrewfish                                number of languages supported by a driver is up
82949f388f5fa361e3be374f59edc09b92296abe03andrewfish                                to the driver writer. Language is specified
83949f388f5fa361e3be374f59edc09b92296abe03andrewfish                                in RFC 4646 or ISO 639-2 language code format.
84949f388f5fa361e3be374f59edc09b92296abe03andrewfish
85949f388f5fa361e3be374f59edc09b92296abe03andrewfish  @param  DriverName[out]       A pointer to the Unicode string to return.
86949f388f5fa361e3be374f59edc09b92296abe03andrewfish                                This Unicode string is the name of the
87949f388f5fa361e3be374f59edc09b92296abe03andrewfish                                driver specified by This in the language
88949f388f5fa361e3be374f59edc09b92296abe03andrewfish                                specified by Language.
89949f388f5fa361e3be374f59edc09b92296abe03andrewfish
90949f388f5fa361e3be374f59edc09b92296abe03andrewfish  @retval EFI_SUCCESS           The Unicode string for the Driver specified by
91949f388f5fa361e3be374f59edc09b92296abe03andrewfish                                This and the language specified by Language was
92949f388f5fa361e3be374f59edc09b92296abe03andrewfish                                returned in DriverName.
93949f388f5fa361e3be374f59edc09b92296abe03andrewfish
94949f388f5fa361e3be374f59edc09b92296abe03andrewfish  @retval EFI_INVALID_PARAMETER Language is NULL.
95949f388f5fa361e3be374f59edc09b92296abe03andrewfish
96949f388f5fa361e3be374f59edc09b92296abe03andrewfish  @retval EFI_INVALID_PARAMETER DriverName is NULL.
97949f388f5fa361e3be374f59edc09b92296abe03andrewfish
98949f388f5fa361e3be374f59edc09b92296abe03andrewfish  @retval EFI_UNSUPPORTED       The driver specified by This does not support
99949f388f5fa361e3be374f59edc09b92296abe03andrewfish                                the language specified by Language.
100949f388f5fa361e3be374f59edc09b92296abe03andrewfish
101949f388f5fa361e3be374f59edc09b92296abe03andrewfish**/
102949f388f5fa361e3be374f59edc09b92296abe03andrewfishEFI_STATUS
103949f388f5fa361e3be374f59edc09b92296abe03andrewfishEFIAPI
104949f388f5fa361e3be374f59edc09b92296abe03andrewfishEmuSimpleFileSystemComponentNameGetDriverName (
105949f388f5fa361e3be374f59edc09b92296abe03andrewfish  IN  EFI_COMPONENT_NAME_PROTOCOL  *This,
106949f388f5fa361e3be374f59edc09b92296abe03andrewfish  IN  CHAR8                        *Language,
107949f388f5fa361e3be374f59edc09b92296abe03andrewfish  OUT CHAR16                       **DriverName
108949f388f5fa361e3be374f59edc09b92296abe03andrewfish  )
109949f388f5fa361e3be374f59edc09b92296abe03andrewfish{
110949f388f5fa361e3be374f59edc09b92296abe03andrewfish  return LookupUnicodeString2 (
111949f388f5fa361e3be374f59edc09b92296abe03andrewfish          Language,
112949f388f5fa361e3be374f59edc09b92296abe03andrewfish          This->SupportedLanguages,
113949f388f5fa361e3be374f59edc09b92296abe03andrewfish          mEmuSimpleFileSystemDriverNameTable,
114949f388f5fa361e3be374f59edc09b92296abe03andrewfish          DriverName,
115949f388f5fa361e3be374f59edc09b92296abe03andrewfish          (BOOLEAN)(This == &gEmuSimpleFileSystemComponentName)
116949f388f5fa361e3be374f59edc09b92296abe03andrewfish          );
117949f388f5fa361e3be374f59edc09b92296abe03andrewfish}
118949f388f5fa361e3be374f59edc09b92296abe03andrewfish
119949f388f5fa361e3be374f59edc09b92296abe03andrewfish
120949f388f5fa361e3be374f59edc09b92296abe03andrewfish/**
121949f388f5fa361e3be374f59edc09b92296abe03andrewfish  Retrieves a Unicode string that is the user readable name of the controller
122949f388f5fa361e3be374f59edc09b92296abe03andrewfish  that is being managed by a driver.
123949f388f5fa361e3be374f59edc09b92296abe03andrewfish
124949f388f5fa361e3be374f59edc09b92296abe03andrewfish  This function retrieves the user readable name of the controller specified by
125949f388f5fa361e3be374f59edc09b92296abe03andrewfish  ControllerHandle and ChildHandle in the form of a Unicode string. If the
126949f388f5fa361e3be374f59edc09b92296abe03andrewfish  driver specified by This has a user readable name in the language specified by
127949f388f5fa361e3be374f59edc09b92296abe03andrewfish  Language, then a pointer to the controller name is returned in ControllerName,
128949f388f5fa361e3be374f59edc09b92296abe03andrewfish  and EFI_SUCCESS is returned.  If the driver specified by This is not currently
129949f388f5fa361e3be374f59edc09b92296abe03andrewfish  managing the controller specified by ControllerHandle and ChildHandle,
130949f388f5fa361e3be374f59edc09b92296abe03andrewfish  then EFI_UNSUPPORTED is returned.  If the driver specified by This does not
131949f388f5fa361e3be374f59edc09b92296abe03andrewfish  support the language specified by Language, then EFI_UNSUPPORTED is returned.
132949f388f5fa361e3be374f59edc09b92296abe03andrewfish
133949f388f5fa361e3be374f59edc09b92296abe03andrewfish  @param  This[in]              A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
134949f388f5fa361e3be374f59edc09b92296abe03andrewfish                                EFI_COMPONENT_NAME_PROTOCOL instance.
135949f388f5fa361e3be374f59edc09b92296abe03andrewfish
136949f388f5fa361e3be374f59edc09b92296abe03andrewfish  @param  ControllerHandle[in]  The handle of a controller that the driver
137949f388f5fa361e3be374f59edc09b92296abe03andrewfish                                specified by This is managing.  This handle
138949f388f5fa361e3be374f59edc09b92296abe03andrewfish                                specifies the controller whose name is to be
139949f388f5fa361e3be374f59edc09b92296abe03andrewfish                                returned.
140949f388f5fa361e3be374f59edc09b92296abe03andrewfish
141949f388f5fa361e3be374f59edc09b92296abe03andrewfish  @param  ChildHandle[in]       The handle of the child controller to retrieve
142949f388f5fa361e3be374f59edc09b92296abe03andrewfish                                the name of.  This is an optional parameter that
143949f388f5fa361e3be374f59edc09b92296abe03andrewfish                                may be NULL.  It will be NULL for device
144949f388f5fa361e3be374f59edc09b92296abe03andrewfish                                drivers.  It will also be NULL for a bus drivers
145949f388f5fa361e3be374f59edc09b92296abe03andrewfish                                that wish to retrieve the name of the bus
146949f388f5fa361e3be374f59edc09b92296abe03andrewfish                                controller.  It will not be NULL for a bus
147949f388f5fa361e3be374f59edc09b92296abe03andrewfish                                driver that wishes to retrieve the name of a
148949f388f5fa361e3be374f59edc09b92296abe03andrewfish                                child controller.
149949f388f5fa361e3be374f59edc09b92296abe03andrewfish
150949f388f5fa361e3be374f59edc09b92296abe03andrewfish  @param  Language[in]          A pointer to a Null-terminated ASCII string
151949f388f5fa361e3be374f59edc09b92296abe03andrewfish                                array indicating the language.  This is the
152949f388f5fa361e3be374f59edc09b92296abe03andrewfish                                language of the driver name that the caller is
153949f388f5fa361e3be374f59edc09b92296abe03andrewfish                                requesting, and it must match one of the
154949f388f5fa361e3be374f59edc09b92296abe03andrewfish                                languages specified in SupportedLanguages. The
155949f388f5fa361e3be374f59edc09b92296abe03andrewfish                                number of languages supported by a driver is up
156949f388f5fa361e3be374f59edc09b92296abe03andrewfish                                to the driver writer. Language is specified in
157949f388f5fa361e3be374f59edc09b92296abe03andrewfish                                RFC 4646 or ISO 639-2 language code format.
158949f388f5fa361e3be374f59edc09b92296abe03andrewfish
159949f388f5fa361e3be374f59edc09b92296abe03andrewfish  @param  ControllerName[out]   A pointer to the Unicode string to return.
160949f388f5fa361e3be374f59edc09b92296abe03andrewfish                                This Unicode string is the name of the
161949f388f5fa361e3be374f59edc09b92296abe03andrewfish                                controller specified by ControllerHandle and
162949f388f5fa361e3be374f59edc09b92296abe03andrewfish                                ChildHandle in the language specified by
163949f388f5fa361e3be374f59edc09b92296abe03andrewfish                                Language from the point of view of the driver
164949f388f5fa361e3be374f59edc09b92296abe03andrewfish                                specified by This.
165949f388f5fa361e3be374f59edc09b92296abe03andrewfish
166949f388f5fa361e3be374f59edc09b92296abe03andrewfish  @retval EFI_SUCCESS           The Unicode string for the user readable name in
167949f388f5fa361e3be374f59edc09b92296abe03andrewfish                                the language specified by Language for the
168949f388f5fa361e3be374f59edc09b92296abe03andrewfish                                driver specified by This was returned in
169949f388f5fa361e3be374f59edc09b92296abe03andrewfish                                DriverName.
170949f388f5fa361e3be374f59edc09b92296abe03andrewfish
171949f388f5fa361e3be374f59edc09b92296abe03andrewfish  @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
172949f388f5fa361e3be374f59edc09b92296abe03andrewfish
173949f388f5fa361e3be374f59edc09b92296abe03andrewfish  @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
174949f388f5fa361e3be374f59edc09b92296abe03andrewfish                                EFI_HANDLE.
175949f388f5fa361e3be374f59edc09b92296abe03andrewfish
176949f388f5fa361e3be374f59edc09b92296abe03andrewfish  @retval EFI_INVALID_PARAMETER Language is NULL.
177949f388f5fa361e3be374f59edc09b92296abe03andrewfish
178949f388f5fa361e3be374f59edc09b92296abe03andrewfish  @retval EFI_INVALID_PARAMETER ControllerName is NULL.
179949f388f5fa361e3be374f59edc09b92296abe03andrewfish
180949f388f5fa361e3be374f59edc09b92296abe03andrewfish  @retval EFI_UNSUPPORTED       The driver specified by This is not currently
181949f388f5fa361e3be374f59edc09b92296abe03andrewfish                                managing the controller specified by
182949f388f5fa361e3be374f59edc09b92296abe03andrewfish                                ControllerHandle and ChildHandle.
183949f388f5fa361e3be374f59edc09b92296abe03andrewfish
184949f388f5fa361e3be374f59edc09b92296abe03andrewfish  @retval EFI_UNSUPPORTED       The driver specified by This does not support
185949f388f5fa361e3be374f59edc09b92296abe03andrewfish                                the language specified by Language.
186949f388f5fa361e3be374f59edc09b92296abe03andrewfish
187949f388f5fa361e3be374f59edc09b92296abe03andrewfish**/
188949f388f5fa361e3be374f59edc09b92296abe03andrewfishEFI_STATUS
189949f388f5fa361e3be374f59edc09b92296abe03andrewfishEFIAPI
190949f388f5fa361e3be374f59edc09b92296abe03andrewfishEmuSimpleFileSystemComponentNameGetControllerName (
191949f388f5fa361e3be374f59edc09b92296abe03andrewfish  IN  EFI_COMPONENT_NAME_PROTOCOL                                        *This,
192949f388f5fa361e3be374f59edc09b92296abe03andrewfish  IN  EFI_HANDLE                                                         ControllerHandle,
193949f388f5fa361e3be374f59edc09b92296abe03andrewfish  IN  EFI_HANDLE                                                         ChildHandle        OPTIONAL,
194949f388f5fa361e3be374f59edc09b92296abe03andrewfish  IN  CHAR8                                                              *Language,
195949f388f5fa361e3be374f59edc09b92296abe03andrewfish  OUT CHAR16                                                             **ControllerName
196949f388f5fa361e3be374f59edc09b92296abe03andrewfish  )
197949f388f5fa361e3be374f59edc09b92296abe03andrewfish{
198949f388f5fa361e3be374f59edc09b92296abe03andrewfish  EFI_STATUS                        Status;
199949f388f5fa361e3be374f59edc09b92296abe03andrewfish  EFI_SIMPLE_FILE_SYSTEM_PROTOCOL   *SimpleFileSystem;
200949f388f5fa361e3be374f59edc09b92296abe03andrewfish  EMU_SIMPLE_FILE_SYSTEM_PRIVATE    *Private;
201949f388f5fa361e3be374f59edc09b92296abe03andrewfish
202949f388f5fa361e3be374f59edc09b92296abe03andrewfish  //
203949f388f5fa361e3be374f59edc09b92296abe03andrewfish  // This is a device driver, so ChildHandle must be NULL.
204949f388f5fa361e3be374f59edc09b92296abe03andrewfish  //
205949f388f5fa361e3be374f59edc09b92296abe03andrewfish  if (ChildHandle != NULL) {
206949f388f5fa361e3be374f59edc09b92296abe03andrewfish    return EFI_UNSUPPORTED;
207949f388f5fa361e3be374f59edc09b92296abe03andrewfish  }
208949f388f5fa361e3be374f59edc09b92296abe03andrewfish
209949f388f5fa361e3be374f59edc09b92296abe03andrewfish  //
210949f388f5fa361e3be374f59edc09b92296abe03andrewfish  // Make sure this driver is currently managing ControllerHandle
211949f388f5fa361e3be374f59edc09b92296abe03andrewfish  //
212949f388f5fa361e3be374f59edc09b92296abe03andrewfish  Status = EfiTestManagedDevice (
213949f388f5fa361e3be374f59edc09b92296abe03andrewfish             ControllerHandle,
214949f388f5fa361e3be374f59edc09b92296abe03andrewfish             gEmuSimpleFileSystemDriverBinding.DriverBindingHandle,
215949f388f5fa361e3be374f59edc09b92296abe03andrewfish             &gEmuIoThunkProtocolGuid
216949f388f5fa361e3be374f59edc09b92296abe03andrewfish             );
217949f388f5fa361e3be374f59edc09b92296abe03andrewfish  if (EFI_ERROR (Status)) {
218949f388f5fa361e3be374f59edc09b92296abe03andrewfish    return EFI_UNSUPPORTED;
219949f388f5fa361e3be374f59edc09b92296abe03andrewfish  }
220949f388f5fa361e3be374f59edc09b92296abe03andrewfish  //
221949f388f5fa361e3be374f59edc09b92296abe03andrewfish  // Get our context back
222949f388f5fa361e3be374f59edc09b92296abe03andrewfish  //
223949f388f5fa361e3be374f59edc09b92296abe03andrewfish  Status = gBS->OpenProtocol (
224949f388f5fa361e3be374f59edc09b92296abe03andrewfish                  ControllerHandle,
225949f388f5fa361e3be374f59edc09b92296abe03andrewfish                  &gEfiSimpleFileSystemProtocolGuid,
226949f388f5fa361e3be374f59edc09b92296abe03andrewfish                  (VOID**)&SimpleFileSystem,
227949f388f5fa361e3be374f59edc09b92296abe03andrewfish                  gEmuSimpleFileSystemDriverBinding.DriverBindingHandle,
228949f388f5fa361e3be374f59edc09b92296abe03andrewfish                  ControllerHandle,
229949f388f5fa361e3be374f59edc09b92296abe03andrewfish                  EFI_OPEN_PROTOCOL_GET_PROTOCOL
230949f388f5fa361e3be374f59edc09b92296abe03andrewfish                  );
231949f388f5fa361e3be374f59edc09b92296abe03andrewfish  if (EFI_ERROR (Status)) {
232949f388f5fa361e3be374f59edc09b92296abe03andrewfish    return EFI_UNSUPPORTED;
233949f388f5fa361e3be374f59edc09b92296abe03andrewfish  }
234949f388f5fa361e3be374f59edc09b92296abe03andrewfish
235949f388f5fa361e3be374f59edc09b92296abe03andrewfish  Private = EMU_SIMPLE_FILE_SYSTEM_PRIVATE_DATA_FROM_THIS (SimpleFileSystem);
236949f388f5fa361e3be374f59edc09b92296abe03andrewfish
237949f388f5fa361e3be374f59edc09b92296abe03andrewfish  return LookupUnicodeString2 (
238949f388f5fa361e3be374f59edc09b92296abe03andrewfish          Language,
239949f388f5fa361e3be374f59edc09b92296abe03andrewfish          This->SupportedLanguages,
240949f388f5fa361e3be374f59edc09b92296abe03andrewfish          Private->ControllerNameTable,
241949f388f5fa361e3be374f59edc09b92296abe03andrewfish          ControllerName,
242949f388f5fa361e3be374f59edc09b92296abe03andrewfish          (BOOLEAN)(This == &gEmuSimpleFileSystemComponentName)
243949f388f5fa361e3be374f59edc09b92296abe03andrewfish          );
244949f388f5fa361e3be374f59edc09b92296abe03andrewfish}
245