You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ma...@apache.org on 2016/01/13 00:42:28 UTC
incubator-mynewt-newt git commit: Don't display non-existent response
data when setting image to boot.
Repository: incubator-mynewt-newt
Updated Branches:
refs/heads/master 5e87e8f6f -> 06e9bde8c
Don't display non-existent response data when setting image to boot.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/commit/06e9bde8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/tree/06e9bde8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/diff/06e9bde8
Branch: refs/heads/master
Commit: 06e9bde8c78dfbe93348859710bf12aa717efa67
Parents: 5e87e8f
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Tue Jan 12 15:40:54 2016 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Tue Jan 12 15:40:54 2016 -0800
----------------------------------------------------------------------
newtmgr/newtmgr.go | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/06e9bde8/newtmgr/newtmgr.go
----------------------------------------------------------------------
diff --git a/newtmgr/newtmgr.go b/newtmgr/newtmgr.go
index fb7a722..336283a 100644
--- a/newtmgr/newtmgr.go
+++ b/newtmgr/newtmgr.go
@@ -285,7 +285,7 @@ func imageListCmd(cmd *cobra.Command, args []string) {
}
fmt.Println("Images:")
for i := 0; i < len(iRsp.Images); i++ {
- fmt.Println(" ", i, ": " + iRsp.Images[i])
+ fmt.Println(" ", i, ": "+iRsp.Images[i])
}
}
@@ -407,9 +407,11 @@ func imageBootCmd(cmd *cobra.Command, args []string) {
if err != nil {
nmUsage(cmd, err)
}
- fmt.Println(" Test image :", iRsp.TestImage)
- fmt.Println(" Main image :", iRsp.MainImage)
- fmt.Println(" Active img :", iRsp.ActiveImage)
+ if len(args) == 0 {
+ fmt.Println(" Test image :", iRsp.TestImage)
+ fmt.Println(" Main image :", iRsp.MainImage)
+ fmt.Println(" Active img :", iRsp.ActiveImage)
+ }
}
func imageCmd() *cobra.Command {