@@ -19,7 +19,7 @@ import "github.com/thinnect/go-devparam"
1919
2020const ApplicationVersionMajor = 0
2121const ApplicationVersionMinor = 1
22- const ApplicationVersionPatch = 2
22+ const ApplicationVersionPatch = 3
2323
2424var ApplicationBuildDate string
2525var ApplicationBuildDistro string
@@ -177,6 +177,8 @@ func main() {
177177 logger .Info .Printf ("Connected to %s:%d\n " , host , port )
178178 }
179179
180+ success := false
181+
180182 if len (opts .Parameter ) > 0 {
181183 if len (opts .Value ) == 0 || len (opts .Parameter ) > 1 {
182184 for _ , parameter := range opts .Parameter {
@@ -186,6 +188,7 @@ func main() {
186188 val , err := dpm .GetValue (parameter )
187189 if err == nil {
188190 logger .Info .Printf ("%s = %s\n " , val .Name , val )
191+ success = true
189192 } else {
190193 logger .Info .Printf ("Failed: %s\n " , err )
191194 }
@@ -196,6 +199,7 @@ func main() {
196199 logger .Info .Printf ("Set %s to 0x%X\n " , opts .Parameter [0 ], value )
197200 if val , err := dpm .SetValue (opts .Parameter [0 ], value ); err == nil {
198201 logger .Info .Printf ("%s = %s\n " , val .Name , val )
202+ success = true
199203 } else {
200204 logger .Info .Printf ("Failed: %s\n " , err )
201205 }
@@ -215,6 +219,7 @@ func main() {
215219 logger .Info .Printf ("%2d: %s\n " , param .Seqnum , param .Error )
216220 }
217221 }
222+ success = true
218223 } else {
219224 logger .Info .Printf ("Failed: %s\n " , err )
220225 }
@@ -223,6 +228,12 @@ func main() {
223228 dpm .Close ()
224229 sfc .Disconnect ()
225230 time .Sleep (100 * time .Millisecond )
231+
232+ if success {
233+ os .Exit (0 )
234+ } else {
235+ os .Exit (1 )
236+ }
226237}
227238
228239func logsetup (debuglevel int ) * loggers.DIWEloggers {
0 commit comments