From a653740fefe24edefe7fc3aaf84b14655778c5be Mon Sep 17 00:00:00 2001 From: marko Date: Tue, 9 Oct 2007 11:22:51 +0000 Subject: [PATCH] Eliminate the guesswork when attempting to determine the id of a newly created ng_eiface or ng_iface node. The replacement approach at "ngctl mkpeer" invocation yields deterministic results, and reduces the spawned process pipeline at the same time, thus reducing the time / CPU cycles wasted on ng node creation. Bug found by: Submitted by: Reviewed by: Approved by: Obtained from: --- exec.tcl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/exec.tcl b/exec.tcl index c9ce007..2f98845 100755 --- a/exec.tcl +++ b/exec.tcl @@ -1,4 +1,4 @@ -# $Id: exec.tcl,v 1.57 2007/10/08 23:28:13 marko Exp $ +# $Id: exec.tcl,v 1.58 2007/10/09 11:22:51 marko Exp $ # Copyright 2004, 2005 University of Zagreb, Croatia. All rights reserved. # @@ -228,8 +228,7 @@ proc statline {line} { # * name -- the name of the new interface #**** proc createIfc {type hook} { - catch { exec ngctl mkpeer $type $hook $hook } - catch { exec ngctl l | fgrep " Name: " | cut -c9-23 | xargs echo } nglist + catch { exec printf "mkpeer eiface ether ether \n show .ether" | ngctl -f - } nglist return [lindex $nglist 1] } -- 2.39.5