Hi,
Thanks for the reply.Sorry for any inconvenience, I'm very new to EFI
programming. Just trying to get my head around this new API :p
"Please don't top-post."Not sure what you mean by this. There is a 2 or 3 line
space at the top when replying on hotmail so I replied in that space.
I was aware that I was coding in pure UEFI, but I didn't know that I would lose
certain functionality such as strtok.I was just wandering if there was a pure
UEFI alternative to strtok.It appears there isn't, but that's ok, I can create
my own function. I just needed confirmation pure UEFI doesn't support this type
of functionality.
The Getting Starter guide doesn't mention the advantages and disadvantages of
using AppPkg vs MdeModulePkg, I spent three days trying to figure this out,
perhaps we could add this info to the Getting Started guide?
For example, we could suggest:
"If you want to convert an existing DOS app to UEFI, AppPkg is recommended as
it allows access to standard C libraries. But you won't be able to access the
UEFI system table (no access to SMBIOS tables, etc.. etc..).If you are starting
fresh and would like to use UEFI specific libraries and have access to the
SystemTable, and lose some of the standard C library functionality, use
MdeModulePkg."
(not sure if the above is correct, but that is what I have gathered so far)
I require ImageHandle and SystemTable so I can read the SMBIOS table, but after
many hours of googling I couldn't find information that would tell me if AppPkg
supported this functionality.
The USAGE section mentions "Three libraries are used to provide the Console and
File-system device abstractions.", but then it lists 14 library references.
Those three libraries are not mentioned which I found a bit confusing.
Usually I would refer to other peoples code via google, but finding UDK code is
very difficult. So I resort to the documentation, which seems to be written for
UEFI experts, not beginners.
Perhaps we could improve the documentation for a beginners perspective? Anyway
thanks again for the help, I think I have my answers so I can continue now :)
> Date: Mon, 8 Sep 2014 15:55:52 +0200
> From: [email protected]
> To: [email protected]
> Subject: Re: [edk2] String Tokens in UDK (strtok equivalent)
>
> On 09/08/14 12:43, J. E. wrote:
> > The readme.txt file doesn't really contain the information I am after.
>
> Please don't top-post.
>
> > My app is in MdeModulePkg\Application\, not in AppPkg\Application, so I
> > cannot access the standard C Library. I get a file not found error if I
> > include stdlib.h
> >
> > I can see the standard c functions in here:
> >
> > StdLib\LibC\String\string.h
> > Std C: strcpy, strlen, strcmp, strcat, strtok, etc..
> >
> > I can see some EFI String functions in here:
> >
> > MdePkg\Library\BaseLib\string.c
> > EFI: StrCpy, StrLen, StrCmp, StrCat, ____, etc..
> >
> >
> > But StrTok() is missing.
> >
> > I can't find an EFI equivalent function.
> > StrTok() has not been implemented yet?
> >
> >
> > Or should I be placing my app in AppPkg\Application instead?
>
> You stated
>
> From my understanding, the standard c library isn't available to
> apps,
>
> which is factually incorrect *in general*. Which is why I answered with
> the link, to disprove that.
>
> It is your call to write a pure UEFI app, or an StdLib app. If you opt
> the former, then you may not have a canned strtok() at your disposal. If
> you opt for an StdLib app, then you'll have one.
>
> The distinction between pure UEFI apps and StdLib apps is briefly
> mentioned in the file that I linked:
>
> >> https://github.com/tianocore/edk2/blob/master/StdLib/ReadMe.txt
>
> where it speaks about "Hello" vs. "Main":
>
> It goes into more details under USAGE.
>
> As far as I understand, the StdLib module(s) exist (in part) exactly for
> helping with porting C applications. So if you're porting one, you
> should probably use StdLib.
>
> Laszlo
>
>
> ------------------------------------------------------------------------------
> Want excitement?
> Manually upgrade your production database.
> When you want reliability, choose Perforce
> Perforce version control. Predictably reliable.
> http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
> _______________________________________________
> edk2-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel