public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* Mappings and StdLib
@ 2019-09-05  0:14 Tim Lewis
  2019-09-05  0:35 ` [edk2-devel] " Andrew Fish
  0 siblings, 1 reply; 4+ messages in thread
From: Tim Lewis @ 2019-09-05  0:14 UTC (permalink / raw)
  To: devel

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

Following up on my last e-mail, I guess I had the wrong assumption: there
doesn't appear to be a way to resolve mappings within StdLib.

 

Are there any plans here?

 

Thanks,

 

Tim


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [edk2-devel] Mappings and StdLib
  2019-09-05  0:14 Mappings and StdLib Tim Lewis
@ 2019-09-05  0:35 ` Andrew Fish
  2019-09-05 17:25   ` Tim Lewis
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Fish @ 2019-09-05  0:35 UTC (permalink / raw)
  To: devel, tim.lewis

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

Tim,

I don't know about the plans with the StdLib, but I do remember a long time ago with the old shell there was a protocol that let you translate volume names (mappings) into handles and device paths. 

So you could write a simple library that has 2 styles of APIs:
1) Handle + FilePath in Shell mapping with Volume Name out
2) Shell file path with mapping Volume names in and Simple File System handle Out with the file path
	a) A device path out version of this is also useful

You can make the lib just error return if the Shell protocol does not exist so you don't make it a requirement. The caller handles that failure as the current working volume/directory case. 

Thanks,

Andrew Fish

> On Sep 4, 2019, at 5:14 PM, Tim Lewis <tim.lewis@insyde.com> wrote:
> 
> Following up on my last e-mail, I guess I had the wrong assumption: there doesn’t appear to be a way to resolve mappings within StdLib.
>
> Are there any plans here?
>
> Thanks,
>
> Tim
> 


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [edk2-devel] Mappings and StdLib
  2019-09-05  0:35 ` [edk2-devel] " Andrew Fish
@ 2019-09-05 17:25   ` Tim Lewis
  0 siblings, 0 replies; 4+ messages in thread
From: Tim Lewis @ 2019-09-05 17:25 UTC (permalink / raw)
  To: devel, afish

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

Andrew –

 

There is a standard call that provides this service, but I am porting over BSD utils to the shell and they just take a straight path and call open. So I want open to behave the way I expect it to. IN fact, the low level code separates out the “drive”  from the path already, but the current library doesn’t add in the mappings into the list that gets created (it is used for stdin: stdout: and stderr:) The thing is that the underlying Shell APIs do handle this case, but the mapping is stripped before it gets to that layer.

 

Tim

 

From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Andrew Fish via Groups.Io
Sent: Wednesday, September 4, 2019 5:35 PM
To: devel@edk2.groups.io; tim.lewis@insyde.com
Subject: Re: [edk2-devel] Mappings and StdLib

 

Tim,

 

I don't know about the plans with the StdLib, but I do remember a long time ago with the old shell there was a protocol that let you translate volume names (mappings) into handles and device paths. 

 

So you could write a simple library that has 2 styles of APIs:

1) Handle + FilePath in Shell mapping with Volume Name out

2) Shell file path with mapping Volume names in and Simple File System handle Out with the file path

               a) A device path out version of this is also useful

 

You can make the lib just error return if the Shell protocol does not exist so you don't make it a requirement. The caller handles that failure as the current working volume/directory case. 

 

Thanks,

 

Andrew Fish





On Sep 4, 2019, at 5:14 PM, Tim Lewis <tim.lewis@insyde.com <mailto:tim.lewis@insyde.com> > wrote:

 

Following up on my last e-mail, I guess I had the wrong assumption: there doesn’t appear to be a way to resolve mappings within StdLib.

 

Are there any plans here?

 

Thanks,

 

Tim

 




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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [edk2-devel] Mappings and StdLib
       [not found] <15C19AC418D00FDA.11246@groups.io>
@ 2019-09-05 20:06 ` Tim Lewis
  0 siblings, 0 replies; 4+ messages in thread
From: Tim Lewis @ 2019-09-05 20:06 UTC (permalink / raw)
  To: devel, tim.lewis, afish

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

Ok, now I found my answer. DevShell library class must be included with StdLib in order to correctly process shell-style input parameters. Without it, it falls back on DevConsole

 

Thanks,

Tim

 

From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Tim Lewis
Sent: Thursday, September 5, 2019 10:25 AM
To: devel@edk2.groups.io; afish@apple.com
Subject: Re: [edk2-devel] Mappings and StdLib

 

Andrew –

 

There is a standard call that provides this service, but I am porting over BSD utils to the shell and they just take a straight path and call open. So I want open to behave the way I expect it to. IN fact, the low level code separates out the “drive”  from the path already, but the current library doesn’t add in the mappings into the list that gets created (it is used for stdin: stdout: and stderr:) The thing is that the underlying Shell APIs do handle this case, but the mapping is stripped before it gets to that layer.

 

Tim

 

From: devel@edk2.groups.io <mailto:devel@edk2.groups.io>  <devel@edk2.groups.io <mailto:devel@edk2.groups.io> > On Behalf Of Andrew Fish via Groups.Io
Sent: Wednesday, September 4, 2019 5:35 PM
To: devel@edk2.groups.io <mailto:devel@edk2.groups.io> ; tim.lewis@insyde.com <mailto:tim.lewis@insyde.com> 
Subject: Re: [edk2-devel] Mappings and StdLib

 

Tim,

 

I don't know about the plans with the StdLib, but I do remember a long time ago with the old shell there was a protocol that let you translate volume names (mappings) into handles and device paths. 

 

So you could write a simple library that has 2 styles of APIs:

1) Handle + FilePath in Shell mapping with Volume Name out

2) Shell file path with mapping Volume names in and Simple File System handle Out with the file path

               a) A device path out version of this is also useful

 

You can make the lib just error return if the Shell protocol does not exist so you don't make it a requirement. The caller handles that failure as the current working volume/directory case. 

 

Thanks,

 

Andrew Fish

 

On Sep 4, 2019, at 5:14 PM, Tim Lewis <tim.lewis@insyde.com <mailto:tim.lewis@insyde.com> > wrote:

 

Following up on my last e-mail, I guess I had the wrong assumption: there doesn’t appear to be a way to resolve mappings within StdLib.

 

Are there any plans here?

 

Thanks,

 

Tim

 




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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-09-05 20:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-05  0:14 Mappings and StdLib Tim Lewis
2019-09-05  0:35 ` [edk2-devel] " Andrew Fish
2019-09-05 17:25   ` Tim Lewis
     [not found] <15C19AC418D00FDA.11246@groups.io>
2019-09-05 20:06 ` Tim Lewis

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