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


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#46834): https://edk2.groups.io/g/devel/message/46834
Mute This Topic: https://groups.io/mt/33144261/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to