> I'd like reviewers for a fix for:
> 6651973 hvm migration: cannot open dlpi interface
> webrev is at:
> http://dme.org/solaris/webrev/6651973/sunos.hg/
It's probably not performance critical, but I think you
can save two forks / execs / processes by matching
lines and counting them all with nawk, something like
this:
73 set_refcount()
74 {
75 #
76 # Set $refcount to the number of times $1 is referenced as a nic
77 # used by a backend device in xenstore.
78 #
80 refcount=`xenstore-ls backend/vif | \
81 nawk -v nic=' "'$1'"' -F= 'BEGIN { n = 0; } $1==" nic " && $2
== nic { n++;} END { print n; }' `
83 }
This message posted from opensolaris.org
_______________________________________________
xen-discuss mailing list
[email protected]