[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openbios
Subject:    [OpenBIOS] r645 - cpu/x86/pc/olpc
From:       svn () openbios ! org
Date:       2007-09-29 19:12:46
Message-ID: 200709291912.l8TJCvYq026844 () mailer ! progressive-comp ! com
[Download RAW message or body]

Author: wmb
Date: 2007-09-29 21:12:46 +0200 (Sat, 29 Sep 2007)
New Revision: 645

Modified:
   cpu/x86/pc/olpc/linuxserial.fth
Log:
linuxserial.fth - don't reopen serial device if it is already open.


Modified: cpu/x86/pc/olpc/linuxserial.fth
===================================================================
--- cpu/x86/pc/olpc/linuxserial.fth	2007-09-28 01:18:30 UTC (rev 644)
+++ cpu/x86/pc/olpc/linuxserial.fth	2007-09-29 19:12:46 UTC (rev 645)
@@ -32,6 +32,7 @@
 ;
 
 : $open-serial  ( dev$ -- )  \ e.g. " /dev/ttyS0"
+   serial-fd -1 <>  if  2drop  then
    $cstr  0 2 rot  8 syscall  3drop retval  to serial-fd
    serial-fd 0< abort" Can't open serial device"
    raw  8n1  blocking
@@ -46,7 +47,7 @@
    line-name place
 ;
 
-: open-serial  ( "devname" -- )
+: open-serial  ( -- )
    line-name c@  if  line-name count  else  " /dev/ttyS0"  then
    $open-serial
 ;


-- 
OpenBIOS                 http://openbios.org/
Mailinglist:  http://lists.openbios.org/mailman/listinfo
Free your System - May the Forth be with you
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic