Fix printf and formatting so 'go test' passes
Change-Id: I90e4c8a4976e2b33820259fefa4ddd1c5823e7f6
diff --git a/.gitignore b/.gitignore
index d37010e..203f81b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,3 @@
bbsim
-openolt/openolt.pb.go
+protos/openolt.pb.go
coverage.txt
diff --git a/setup/setup_env.go b/setup/setup_env.go
index 72cf9cc..6d9981d 100644
--- a/setup/setup_env.go
+++ b/setup/setup_env.go
@@ -46,7 +46,7 @@
return nil
}
-func KillProcess (name string) error {
+func KillProcess(name string) error {
err := exec.Command("pkill", name).Run()
if err != nil {
log.Printf("[ERROR] Fail to pkill %s: %v\n", name, err)
@@ -117,12 +117,12 @@
log.Printf("[ERROR] Faile to activateWPASupplicant() for :%s %v\n", vethname, err)
return
}
- log.Printf("activateDHCPClient()\n", vethname)
+ log.Printf("activateDHCPClient() for: %s\n", vethname)
return
}
func ActivateDHCPServer(veth string, serverip string) error {
- err := exec.Command("ip", "addr", "add", serverip, "dev",veth).Run()
+ err := exec.Command("ip", "addr", "add", serverip, "dev", veth).Run()
if err != nil {
log.Printf("[ERROR] Fail to add ip to %s address: %s\n", veth, err)
return err
@@ -136,7 +136,7 @@
conf := "/etc/dhcp/dhcpd.conf"
err = exec.Command(cmd, "-cf", conf, veth).Run()
if err != nil {
- log.Printf("[ERROR] Fail to activateDHCP Server ()\n", err)
+ log.Printf("[ERROR] Fail to activateDHCP Server (): %s\n", err)
return err
}
log.Printf("Activate DHCP Server()\n")