On 10/21/2013 08:51 PM, Sergey Isakov wrote: > I am sorry for the very big example but your question is not so simple as you > think > http://sourceforge.net/p/refind/code/ci/master/tree/refind/config.c
Please keep in mind that the rEFInd code in that source file does much more than just read a text file -- it also parses it, and handles various formats, too (ISO8859-1, UTF-8, and UTF-16LE). In the rEFInd code, the function ReadFile() does the actual reading; it's called by other functions that do most of the extra stuff. If you just wanted to load something into a text buffer (like for a text editor), it could probably be much simpler than what rEFInd does. In fact, there's a text editor in the EFI shell in Tianocore, so you could probably look up that code. (I don't have a URL or file reference handy, though.) The EFI shell's text editor is also licensed under the BSD license, whereas rEFInd is GPLed. (If rEFInd's code looks better for your purposes and you need a BSD-licensed example, you could look up the equivalent in rEFIt -- http://refit.sourceforge.net. rEFIt uses the BSD license and is rEFInd's predecessor.) > On 19.10.2013, at 11:00, Nishit Patira wrote: > >> Hi, >> >> Can someone give an example code for an uefi application where data is taken >> from another text file. -- Rod Smith [email protected] http://www.rodsbooks.com ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk _______________________________________________ edk2-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/edk2-devel
