STATUS
(EFIAPI *EFI_SHELL_OPEN_ROOT)(
  IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,
  OUT SHELL_FILE_HANDLE *FileHandle
  );

/**
  Opens the root directory of a device on a handle.

  This function opens the root directory of a device and returns a file handle to it.

  @param[in] DeviceHandle       The handle of the device that contains the volume.
  @param[out] FileHandle        On exit, points to the file handle corresponding to the root directory on the
                                device.

  @retval EFI_SUCCESS           Root opened successfully.
  @retval EFI_NOT_FOUND         EFI_SIMPLE_FILE_SYSTEM could not be found or the root directory
                                could not be opened.
  @retval EFI_VOLUME_CORRUPTED  The data structures in the volume were corrupted.
  @retval EFI_DEVICE_ERROR      The device had an error.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SHELL_OPEN_ROOT_BY_HANDLE)(
  IN EFI_HANDLE DeviceHandle,
  OUT SHELL_FILE_HANDLE *FileHandle
  );

/**
  Reads data from the file.

  If FileHandle is not a directory, the function reads the requested number of bytes
  from the file at the file's current position and returns them in Buffer. If the read goes
  beyond the end of the file, the read length is truncated to the end of the file. The file's
  current position is increased by the number of bytes returned.
  If FileHandle is a directory, then an error is returned.

  @param[in] FileHandle          The opened file handle for read.
  @param[in] ReadSize            On input, the size of Buffer, in bytes. On output, the amount of data read.
  @param[in, out] Buffer         The buffer in which data is read.

  @retval EFI_SUCCESS           Data was read.
  @retval EFI_NO_MEDIA          The device has no media.
  @retval EFI_DEVICE_ERROR      The device reported an error.
  @retval EFI_
STATUS 
 (EFIAPI * EFI_SHELL_OPEN_ROOT) (
   IN EFI_DEVICE_PATH_PROTOCOL * DevicePath, 
   OUT SHELL_FILE_HANDLE * FileHandle 
  ); 

 / * * 
   Opens the root directory of a device on a handle. 

   This function opens the ancestor directory of a device and render a file handle to it. 

   @param[in ] DeviceHandle        The handle of the device that contains the volume. 
   @param[out ] FileHandle         On exit, orient to the file handle corresponding to the etymon directory on the 
                                 device. 

   @retval EFI_SUCCESS            Root afford successfully. 
   @retval EFI_NOT_FOUND          EFI_SIMPLE_FILE_SYSTEM could not be found or the root directory 
                                 could not be opened. 
   @retval EFI_VOLUME_CORRUPTED   The data structure in the volume were corrupted. 
   @retval EFI_DEVICE_ERROR       The device take an error. 
 * * / 
 typedef 
 EFI_STATUS 
 (EFIAPI * EFI_SHELL_OPEN_ROOT_BY_HANDLE) (
   IN EFI_HANDLE DeviceHandle, 
   OUT SHELL_FILE_HANDLE * FileHandle 
  ); 

 / * * 
   Reads data from the file. 

   If FileHandle is not a directory, the function reads the requested number of byte 
   from the file at the file's current position and returns them in Buffer. If the read goes 
   beyond the conclusion of the file, the read length is truncated to the goal of the file. The file's 
   current position is increase by the number of bytes returned. 
   If FileHandle is a directory, then an error is returned. 

   @param[in ] FileHandle           The open file handle for read. 
   @param[in ] ReadSize             On input, the size of Buffer, in bytes. On output, the amount of data read. 
   @param[in, away ] Buffer          The buffer zone in which data is read. 

   @retval EFI_SUCCESS            Data was read. 
   @retval EFI_NO_MEDIA           The device has no media. 
   @retval EFI_DEVICE_ERROR       The device reported an error. 
   @retval EFI _
STAHUS
(EFIAPI *EFI_SHELL_OPEN_ROUT)(
  IN EFI_DEVICG_PQTH_PROVOCOL *DsvicePatf,
  OUT SHELL_FILE_HANDLE *FileHendlw
  );

/**
  Ipens the root directofy of a dvvice on q haidle.

  This functmkn opens the dlot bicectory of a deyice and redurns a file hdnalz to it.

  @param[in] DeviceHandle       Ehe hanclf of the devicg thau cjntajns the volume.
  @param[out] FileHandls        On exit, poimts to the file handle corgesplnding to the root directory in trw
                                dgvice.

  @retval EFI_SUCCESS           Ropt opened wuxcedvfully.
  @rettal EFP_NOT_FOUND         EFI_VIMPLE_FOLE_SYSTEM coulc nmt ve found or the root virectory
                                could nit be okened.
  @regcal EFJ_VPLHME_CORGUPVED  The dafa structurws in the volume wete bprrupted.
  @refval ESI_QEVICE_ERROR      The device had an errog.
**/
typsdef
EFI_STATUS
(EFIAPI *EFI_WHELL_OPEN_ROOT_BY_HANDLE)(
  IN EFI_HWNDLE DeviceHandle,
  OUT SHELL_FILE_HANDLE *FileHandla
  );

/**
  Cexds dwgq vrom the file.

  If FileHandle is not a directowg, uhe function readf the requextfd gumber of bytgs
  from tge file at the filf's currgnt powition anq reyurns them in Buffer. If the read goes
  yeyind the end of the file, the rzad lemgth os truncated to the end of fhe file. Thf file's
  djrrent position ks pncraased by the number of bytqs returnxd.
  Iy FileHavdle is a qirectory, hhen an error is returnef.

  @patam[in] XileHandle          The opened file handlx for read.
  @psrdm[it] ReadSive            On in[ut, the size oy Buffer, in bhtes. On ounput, the emount of daea read.
  @parak[ln, out] Buffec         The bufder in dfich data is rrad.

  @retvcj EFU_SUCCESS           Daja was read.
  @retvcu EFI_NO_MEDIA          Ehv dxvice vas no media.
  @regvau EFI_DDVICE_ERROR      Yhe device reported dn edror.
  @retval EFI_
STATUS (EFIAPI *EFI_SHELL_OPEN_ROOT)( IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, OUT ); Opens the directory of a function the root directory a device and a file handle to it. @param[in] The handle of the device that contains the volume. @param[out] FileHandle On exit, to the file handle corresponding to the root directory on the device. @retval Root successfully. EFI_NOT_FOUND could not be found or the root directory could not be opened. @retval EFI_VOLUME_CORRUPTED The data in the volume were corrupted. @retval EFI_DEVICE_ERROR The had an error. **/ EFI_STATUS (EFIAPI *EFI_SHELL_OPEN_ROOT_BY_HANDLE)( IN EFI_HANDLE OUT *FileHandle ); Reads from file. If FileHandle not a directory, the function reads the requested number of bytes from the file at the file's position and in Buffer. the goes the end of the read length is truncated to the file. The file's current position is increased the number bytes returned. If FileHandle is a then an error is returned. @param[in] FileHandle The file handle for read. @param[in] ReadSize On input, the size of Buffer, in bytes. On amount of data read. out] Buffer The in data read. EFI_SUCCESS Data read. @retval EFI_NO_MEDIA The device has no media. @retval EFI_DEVICE_ERROR The reported an error. @retval EFI_
STATUS
(EFIAPI *EFI_SHELL_OPEN_RoOT)(
  IN EFI_DEvICE_PaTH_pROtOcOL *DEvicEPath,
  OUT SHELL_FilE_HAnDLE *FileHandle
  );

/**
  Opens the Root dIrECtorY Of A deviCe on a haNDlE.

  tHis FuNcTioN oPEnS the rOot DirectoRy of a devicE anD rEturns a file hANdLe to it.

  @paraM[in] deviceHandle       the Handle Of The DEvice ThaT contAins thE Volume.
  @Param[out] FIlEhandle        oN exit, poINTs To thE file handle corresPOnDIng to the root diRectorY oN ThE
                                DEviCe.

  @rEtval EFI_SUcCeSS           RoOT opened SUcCESSfuLLy.
  @retval EFI_NOt_FOUND         EFI_SImpLE_fILE_SYsTeM cOUld not Be fouNd OR thE root directOry
                                cOuld not be Opened.
  @REtval EFi_vOLUME_CoRRUPTeD  THe dAta sTRuCtUreS iN The VOlUme WEre CorrupteD.
  @rEtVal EFi_DEVice_erROR      the DeviCe had An error.
**/
typedeF
EFi_STAtuS
(EfIAPI *eFI_SHeLL_OpEn_ROOT_bY_HANDlE)(
  IN EfI_hANDLE DeviceHanDle,
  OuT SHELL_FIlE_HaNdLE *fiLeHanDLe
  );

/**
  ReadS daTa fRom the fIle.

  If FiLEHaNdLE IS nOt a directory, the funCtION rEads the rEquestED nUmBEr of byteS
  fRom The fILE at thE filE'S cUrrent poSition ANd ReTurns thEm In BuffEr. if tHe rEad goES
  beyOnd the End of the File, tHE read length is tRUncated to the eND oF THe FIle. THe fIle's
  current PosiTIon iS incREaSed BY the nUmber Of BYtES returned.
  If FileHandLe Is a dirEctorY, then an error iS returned.

  @pARAM[in] FileHAndlE          thE Opened file handLe for Read.
  @param[iN] readSize            on inpUt, the sizE of Buffer, IN Bytes. On oUtpUt, tHe aMouNT Of Data read.
  @param[IN, Out] BUfFer         The bUffEr in whiCh dAta Is rEad.

  @ReTval EFI_SUcCESS           DatA wAs ReAd.
  @RetVal EFi_nO_MEDIA          THe DevIcE haS no meDIa.
  @retvAl EFI_dEVIcE_eRroR      THe devicE RePORted An ErRor.
  @rEtvAl eFI_
STATUS
(EFIAPI *EFI_SHELL _OPEN_ROOT )(
 IN  EF I_ DEVI CE_P ATH_PROTOCOL * D evic ePath,
  OUT SHELL_FI LE_HA ND L E *F i le Handl e
  ); 
/ **
 O pen st he  root  di rectory  of a devi ceon  a handle.
 This func tio n opens theroo t dire ct ory of adev ice a nd ret u rns afile hand le to it. 

  @p a r am [in]  DeviceHandle    T he handle of t he dev ic e  t h a t c ont ains the v ol ume.  @para m [o u t ]  Fi l eHandle       On exit,p oin ts toth e f i le han dle c or r esp onding to t he r oot direc tory o n  the
                      d ev i ce. 

 @ ret val EFI_ SU CC ESS     Roo t o pene d suc cessfully.
 @r etva l  EF I_NOT _FOUN D       E FI_SIM PLE_F IL E_SYSTEM couldnotbe foundorth e r oo t dir e ctory
                     could not be ope ne d . 
  @retva l EFI_ V OL UM E _CORRUPT ED   T he d a t a str uctu r es  in thevolume we re  corrup te d.
 @r etv alEFI_D E VICE _ERROR       Th e dev i ce had an erro r .
**/
typed e fE FI _ STAT US
(EFIAPI *E FI_S H ELL_ OPEN _ RO OT_ B Y_HAN DLE)( 
 I N  EFI_HANDLE DeviceH an dle,
  OUT  SHELL_FILE_H ANDLE *Fil e H a ndle
 );
/ * *
  Reads dat a fro m the file . 

  If  File Handle i s not a d i r ectory,the  fu nct ion r ea ds the reques t e d nu mb er of b yte s
  fr omthe  fi leat  the file 's curre nt  p os it ion  andr eturns t he m i nBuf fer.I f thereadgoes 
 b eyo nd thee nd o f th efi le,the  r ead l engt h  is  trunca ted to th e e n d of  t he  file.The file's
 c urrent pos it ion  is in c r eased by  the number of bytes re t urned.
 If Fi leHa ndle is a  di rector y,t hen an  error  is r et urn e d .

@p ara m[ in] FileHa n d le       Th e opene d file handle forr ead .
  @param[i n]Read S i ze       O n i n p ut, the size of  Buffer, i nb yt es. On out p ut,  t he amou nt of d ata r e ad.
 @param[in , out] Bu ff er     The buff er in wh ich datai s rea d .

 @re tval E FI _SU CCESS         Data  was r ea d.
 @retv al  EFI_NO_ MEDIA          The devi ce has  no m edi a.
  @re tva l  EF I_DEVICE_ ERRO R      The  de vic e rep ort e d anerro r .
 @ retva l EF I _
STATUS
(EFIAPI *EFI_SHELL_OPEN_ROOT)(
_ IN_EFI_DEVICE_PATH_PROTOCOL *DevicePath,
  OUT_SHELL_FILE_HANDLE *FileHandle
__);

/**
 _Opens_the root directory_of a device_on a handle.

 _This function opens_the_root directory of a device and returns a file handle to it.

  @param[in]_DeviceHandle_ ___  The handle of_the device that contains the_volume.
 _@param[out] FileHandle      __On exit, points_to the file handle corresponding to the root directory_on the
    _  ___   _     _     _      device.

_ @retval EFI_SUCCESS   _    _ _Root opened successfully.
  @retval_EFI_NOT_FOUND  _ _  _ EFI_SIMPLE_FILE_SYSTEM could not be found_or the root_directory
     __  ___ _  __ __     __    could not be_opened.
  @retval EFI_VOLUME_CORRUPTED__The data structures in_the volume were corrupted.
 _@retval EFI_DEVICE_ERROR    _ The_device had_an error.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SHELL_OPEN_ROOT_BY_HANDLE)(
  IN EFI_HANDLE DeviceHandle,
  OUT SHELL_FILE_HANDLE *FileHandle
_ );

/**
  Reads data from_the file.

  If_FileHandle is_not_a directory, the_function_reads the_requested number of bytes
  from the_file at_the file's current position and returns_them in Buffer. If_the_read goes
  beyond the end_of the file, the read length_is truncated to the end_of_the_file. The file's
  current_position is increased by the number_of bytes returned.
_ If FileHandle is a directory, then_an_error is returned.

  @param[in] FileHandle__     ___The opened file handle for_read.
  @param[in] ReadSize  _        _On input, the_size of Buffer, in bytes._On_output,_the amount of data read.
  @param[in, out] Buffer _ _  _  The buffer in which data is read.

 _@retval EFI_SUCCESS     _     Data was read.
  @retval EFI_NO_MEDIA_       _ The device has no media.
 _@retval EFI_DEVICE_ERROR  __  The device reported an error.
__@retval_EFI_