[PC-BSD Commits] r2062 - pcbsd/trunk/NetworkManager

svn at pcbsd.org svn at pcbsd.org
Mon Jun 9 07:48:52 PDT 2008


Author: tim
Date: 2008-06-09 07:48:52 -0700 (Mon, 09 Jun 2008)
New Revision: 2062

Modified:
   pcbsd/trunk/NetworkManager/networkman.ui.h
Log:
Refactored for libpcbsd

Modified: pcbsd/trunk/NetworkManager/networkman.ui.h
===================================================================
--- pcbsd/trunk/NetworkManager/networkman.ui.h	2008-06-09 14:48:43 UTC (rev 2061)
+++ pcbsd/trunk/NetworkManager/networkman.ui.h	2008-06-09 14:48:52 UTC (rev 2062)
@@ -139,21 +139,8 @@
 
 QString NetworkMan::getStatusForIdent( QString ident )
 {
-    	QString command = "ifconfig " +ident + " | grep \"status\"";
-	QString inputLine = getLineFromCommandOutput(command);
-	QString status = "";
-	
-	if (inputLine != "" && inputLine.find("status") != -1){
-		
-		status = inputLine.remove(0, inputLine.find(" ") + 1);
-		status.truncate(inputLine.find("\n") );
-	
-	}
-	
-	return status;
-	
-
-
+   NetworkInterface ifr(ident);
+   return ifr.mediaStatusAsString();
 }
 
 void NetworkMan::DevSelectionChanged()



More information about the Commits mailing list