[flashrom] [PATCH] Move OS-dependent serial code from buspirate_spi.c to serial.c

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Wed Jan 6 17:12:00 CET 2010


On 06.01.2010 16:50, Michael Karcher wrote:
> Am Mittwoch, den 06.01.2010, 16:27 +0100 schrieb Michael Karcher:
>   
>> Am Mittwoch, den 06.01.2010, 16:13 +0100 schrieb Carl-Daniel Hailfinger:
>>     
>>> +int serialport_discard_read(void)
>>>
>>>       
>> [...] but is there any reason not to use
>>   tcflush(sp_fd, TCIFLUSH);
>> instead of this complicated function?
>>
>> OK, I think I got it. tcflush is or was broken on Windows. See for
>> example http://www.cygwin.com/ml/cygwin/2003-10/msg00797.html
>> Maybe add a reference to cygwin as explanation?
>>     
> Don't worry. They changed cygwin. See tcflush in
> http://cygwin.com/cgi-bin/cvsweb.cgi/src/winsup/cygwin/fhandler_serial.cc?rev=1.73&cvsroot=src
> It maps to a native PurgeComm which is just fine. Thanks to patrickg for
> the hint to recheck current code.
>
> So no need to not use tcflush here.
>   

Patrick, can you take care of this in your serial port patch? Thanks.

Regards,
Carl-Daniel

-- 
Developer quote of the year:
"We are juggling too many chainsaws and flaming arrows and tigers."





More information about the flashrom mailing list