On 03/27/15 22:47, Ard Biesheuvel wrote:
> On 27 March 2015 at 22:42, Laszlo Ersek <[email protected]> wrote:

>> I committed your patch to SVN as r17079, with a couple of minimal
>> tweaks:
>>
> 
> Thanks

Your veri welcom.

>> Since I'm an unsufferable pedant, I wanted to spell out the DebugLib
> 
> insufferable

I wanted to write "insufferable" and just mistyped it from (wrong)
mussel memory. You insufferable pendant. :)

> 
>> dependency in the sibling INF file as well. Predictably, that triggered
>> the following (all too well known) error, when I build-tested
>> ArmVirtualizationXen:
>>
>>> .../ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationXen.dsc(...):
>>> error F002: Library 
>>> [.../MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf] with 
>>> constructors has a cycle
>>>                 consumed by 
>>> .../OvmfPkg/Library/XenConsoleSerialPortLib/XenConsoleSerialPortLib.inf
>>
> 
> Yep, tried that as well :-)

And you tryed sneeking it past me? Lol. :)

>> (3) This is not a tweak, just a note. From a quick look, the
>> SerialPortRead() function seems to suffer from the same issue. (It is
>> probably never exposed because callers presumably only read 1 byte at a
>> time, and even that should be preceded by a call to SerialPortPoll().)
>>
>> If you want to fix this, that can be done in a separate patch; this one
>> precisely states in the commit message that it only deals with output.
>>
> 
> The comment suggests that only returning 0 is considered a failure,
> and returning fewer bytes than there is space available is not. Since
> Poll () returning TRUE suggests at least 1 byte available, i think it
> does not make sense to spin
> 
>   @retval 0                Read data failed, no data is to be read.
>   @retval >0               Actual number of bytes read from serial device.
> 

Indeed. The comment on SerialPortRead() says:

  If the return value is less than NumberOfBytes, then the rest
  operation failed.

"rest [of the]" being the key expression.

Apparently, I need to re-learn to reed two, not just to right.

Tanks!
Laszlo
PS: I love English, "you insensitive clod"! ;)

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to