From 4225b3568ee87376272dda4fdcf3325eea49cc9e Mon Sep 17 00:00:00 2001 From: Ali Rizvi-Santiago Date: Tue, 5 Apr 2016 18:45:36 -0500 Subject: [PATCH] Fixed bad ORs and a bad fmtstring. --- builder/vmware/common/driver_parser.go | 2 +- builder/vmware/iso/step_create_vmx.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/builder/vmware/common/driver_parser.go b/builder/vmware/common/driver_parser.go index 38470eb5b..7071e424d 100644 --- a/builder/vmware/common/driver_parser.go +++ b/builder/vmware/common/driver_parser.go @@ -362,7 +362,7 @@ type pParameterBoolean struct { parameter string truancy bool } -func (e pParameterBoolean) repr() string { return fmt.Sprintf("boolean:%s=%s",e.parameter,e.truancy) } +func (e pParameterBoolean) repr() string { return fmt.Sprintf("boolean:%s=%v",e.parameter,e.truancy) } type pParameterClientMatch struct { name string diff --git a/builder/vmware/iso/step_create_vmx.go b/builder/vmware/iso/step_create_vmx.go index 8e9f6cda0..c1f4ea8f3 100644 --- a/builder/vmware/iso/step_create_vmx.go +++ b/builder/vmware/iso/step_create_vmx.go @@ -89,10 +89,10 @@ func unformat_serial(config string) (*serialUnion,error) { if len(comp) < 3 || len(comp) > 4 { return nil,fmt.Errorf("Unexpected format for serial port : pipe : %s", config) } - if res := strings.ToLower(comp[1]); res != "client" || res != "server" { + if res := strings.ToLower(comp[1]); res != "client" && res != "server" { return nil,fmt.Errorf("Unexpected format for serial port : pipe : endpoint : %s : %s", res, config) } - if res := strings.ToLower(comp[2]); res != "app" || res != "vm" { + if res := strings.ToLower(comp[2]); res != "app" && res != "vm" { return nil,fmt.Errorf("Unexpected format for serial port : pipe : host : %s : %s", res, config) } res := &serialConfigPipe{ @@ -104,7 +104,7 @@ func unformat_serial(config string) (*serialUnion,error) { if len(comp) == 4 { res.yield = strings.ToUpper(comp[3]) } - if res.yield != "TRUE" || res.yield != "FALSE" { + if res.yield != "TRUE" && res.yield != "FALSE" { return nil,fmt.Errorf("Unexpected format for serial port : pipe : yield : %s : %s", res.yield, config) } return &serialUnion{serialType:res, pipe:res},nil