[openfirmware] [commit] r2526 - ofw/inet
repository service
svn at openfirmware.info
Fri Sep 23 00:42:26 CEST 2011
Author: wmb
Date: Fri Sep 23 00:42:26 2011
New Revision: 2526
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2526
Log:
pingd no longer needs an argument; it implicitly uses "net//obp-tftp:last". If you need to change the target device, change the "net" devalias.
Modified:
ofw/inet/ping.fth
Modified: ofw/inet/ping.fth
==============================================================================
--- ofw/inet/ping.fth Fri Sep 23 00:38:28 2011 (r2525)
+++ ofw/inet/ping.fth Fri Sep 23 00:42:26 2011 (r2526)
@@ -17,14 +17,12 @@
0 value ping-ih
: open-net ( pathname$ -- )
- dup 0= if 2drop " net" then ( pathname$' )
- open-dev to ping-ih
+ " net//obp-tftp:last" open-dev to ping-ih
ping-ih 0= abort" Can't open network device"
;
: close-net ( -- ) ping-ih close-dev ;
: $call-net ( ? name$ -- ? ) ping-ih $call-method ;
-true value first?
0 value /packet
d# 1600 constant /packet-max
/packet-max buffer: packet
@@ -169,13 +167,10 @@
key drop
;
-: $pingd ( pathname$ -- )
- true to first?
+: pingd ( -- )
open-net handle-requests close-net
;
-: pingd ( "device" -- ) parse-word $pingd ;
-
d# 64 value ping-size
d# 512 value /ping-max
d# 10 value ping-seconds
@@ -251,7 +246,7 @@
;
: $ping ( ip$ -- )
- " net//obp-tftp:last" open-net " $set-host" $call-net
+ open-net " $set-host" $call-net
/ping-max " allocate-ip" $call-net to ping-packet
try-pings
ping-packet /ping-max " free-ip" $call-net
More information about the openfirmware
mailing list