public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* Q: StdLib and mappings
@ 2019-09-04 22:25 Tim Lewis
  0 siblings, 0 replies; only message in thread
From: Tim Lewis @ 2019-09-04 22:25 UTC (permalink / raw)
  To: devel

[-- Attachment #1: Type: text/plain, Size: 920 bytes --]

When using StdLib, I found that access and open have difficulty if the
mapping name is not the same case as the mapping name in the path. I have
traced this down to a line in DevSearch.c (line 68) 

 

          if(wcsncmp(DevName, WorkNode->DevName, wcslen(WorkNode->DevName))
== 0) {

 

It appears that (a) the shell itself does not make a distinction between
cases (just try fs0: and FS0:) but (b) the StdLib does.

 

I ran into this while porting an app that searches through the path
environment variable (where they are all in caps) but open() kept failing
because of this.

 

The simple fix would be to use wcsncasecmp (which is listed in namespace.h)
but that is not actually implemented. And the non-standard (but common)
wcsnicmp is also not implemented.

 

1.	Is my understanding correct here for mappings?
2.	Is there another wide-character case-insensitive mapping function to
use?

 

Thanks,

 

Tim


[-- Attachment #2: Type: text/html, Size: 6614 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-09-04 22:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-04 22:25 Q: StdLib and mappings Tim Lewis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox