From 51cd482ece2d780c02b82e0cafaa5c77f7281007 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Mon, 3 Sep 2007 17:08:57 +0000 Subject: [PATCH] fixup hwaddr --- bindings/ruby/examples/ifconfig.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bindings/ruby/examples/ifconfig.rb b/bindings/ruby/examples/ifconfig.rb index e8459e2a..b8b87eaa 100644 --- a/bindings/ruby/examples/ifconfig.rb +++ b/bindings/ruby/examples/ifconfig.rb @@ -7,7 +7,13 @@ iflist.each do |ifname| ifconfig = sigar.net_interface_config(ifname) flags = ifconfig.flags encap = ifconfig.type + hwaddr = ifconfig.hwaddr + if hwaddr == Sigar::NULL_HWADDR + hwaddr = "" + else + hwaddr = " HWaddr " + hwaddr + end puts ifname + "\t" + "Link encap:" + encap + hwaddr