>
> Subject: [edk2] Cannot access files with StdLib in my UEFI application
>
> From: "Cohen Nehemia, Eli" <[email protected]>
>
> To: "[email protected]" <[email protected]>
>
> Date: 2012-03-15 15:00:43
>
> Hi,
>
>
>
> I am developing an UEFI application using EADK and StdLib. That
> application runs just fine except when trying to access files.
>
>
>
> When I try to access a file with *fopen*, whether for reading an existing
> one or creating a new one, I get a NULL in return. Apparently, this is not
> a permission issue because *perror* says "file not found" for when trying
> to read an existing file. I tried to use both relative and absolute paths,
> used both slash and backslash separators, used *cwd* function to get the
> current working directory (which is "fs0:\") but nothing works. Using
> *access* function to check for file existence on the application
> executable file itself yields a "file not found" error code. BTW – *fopen*
> does not work on the Nt32 emulation either (did not check the *errno*
> there, though).
>
>
>
> Further details: Application compiled with most up to date EADK version,
> runs on an EFI Shell 2.31 [1.0] running mode 1.1.2, loaded from a USB stick
> mounted as fs0.
>
>
>
> Thanks!
> Eli.



Just to answer if someone stumbles across this. If you are using fopen() or
open() functions you need to make sure LibStdio and DevShell are added to
[LibraryClasses] in your .inf file.
------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to