From: "Tim Lewis" <tim.lewis@insyde.com>
To: <devel@edk2.groups.io>
Subject: Q: StdLib and mappings
Date: Wed, 4 Sep 2019 15:25:51 -0700 [thread overview]
Message-ID: <00f001d5636f$b79c4850$26d4d8f0$@insyde.com> (raw)
[-- 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 --]
reply other threads:[~2019-09-04 22:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='00f001d5636f$b79c4850$26d4d8f0$@insyde.com' \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox