Depending on what you are doing with the resultant string 
ConvertDevicePathToText from DevicePathLib (header file located in MdePkg) is a 
much more common method to convert a device path to a text.  This also supports 
some options on some conversion results.

-Jaben

-----Original Message-----
From: Bill Paul [mailto:wp...@windriver.com] 
Sent: Tuesday, February 25, 2014 4:24 PM
To: edk2-devel@lists.sourceforge.net
Subject: Re: [edk2] DevicePathToStr

Of all the gin joints in all the towns in all the world, John Davis had to walk 
into mine at 16:10:15 on Tuesday 25 February 2014 and say:

> Hello
> 
> I see some code which uses DevicePathToStr.  When I do a grep on it, I 
> see it  a few include files.
> 
> 1. IntelFrameworkModulePkg
> 2. OvmfPkg
> 3. SecruityPkg
> 
> I am working with the NT32 emulator so I'm guessing that I don't need 
> the ones from source 2 and 3.  However, when I try to include the 
> header file for
> #include <Library/GenericBdsLib.h> // DevicePathToStr      from the
> IntelFrameworkModulePkg it fails to compile.
> 
> I also noticed that there is a .c file in MdeModulePkg
> (PlatDriOverrideDxe.c) which uses this routine.  I was thinking that 
> maybe there is some other way to get access to it, but I don't know. I 
> don't see it any other header files.
> 
> Any advice on how to use this routine?

I'm not certain this is the right way to do it, but what I did was to edit my 
.inf file and add the following line under the [Packages] section:

  IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec

Then I was able to include <Library/GenericBdsLib.h> in my code and use
DevicePathToStr() without any issue.

-Bill

--
=============================================================================
-Bill Paul            (510) 749-2329 | Senior Member of Technical Staff,
                 wp...@windriver.com | Master of Unix-Fu - Wind River Systems 
=============================================================================
   "I put a dollar in a change machine. Nothing changed." - George Carlin 
=============================================================================

------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer Customize 
your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to