/* Get the device path info saved in the menu structure. */
VOID LibGetDevicePath(IN UINT16 KeyValue)
/* Get the device path info saved in the menu structure. */
VOID LibGetDevicePath(IN UINT16 KeyValue)
{
  UINT16        FileOptionMask;
  MENU_ENTRY    *NewMenuEntry;
  FILE_CONTEXT  *NewFileContext;
  FileOptionMask = (UINT16)(FILE_OPTION_MASK & KeyValue) - mQuestionIdUpdate;
  NewMenuEntry = LibGetMenuEntry (gFileExplorerPrivate.FsOptionMenu, FileOptionMask);
  NewFileContext = (FILE_CONTEXT *)NewMenuEntry->VariableContext;
  if (gFileExplorerPrivate.RetDevicePath != NULL) {
    FreePool (gFileExplorerPrivate.RetDevicePath);
  }
  gFileExplorerPrivate.RetDevicePath = DuplicateDevicePath (NewFileContext->DevicePath);
}