From fc5997258ff981d0ce0da7a90ab87b9e9b2a64da Mon Sep 17 00:00:00 2001 From: Silvio Gissi Date: Sat, 20 Jun 2020 22:40:27 -0700 Subject: [PATCH] Show error if invalid command is provided. --- cmd/fwtablectl/firmware.go | 4 ++++ cmd/fwtablectl/part.go | 3 +++ 2 files changed, 7 insertions(+) diff --git a/cmd/fwtablectl/firmware.go b/cmd/fwtablectl/firmware.go index e321afc..cecca1c 100644 --- a/cmd/fwtablectl/firmware.go +++ b/cmd/fwtablectl/firmware.go @@ -34,6 +34,10 @@ func firmware(args []string) { usage() } firmwareRemove(args[1:]) + default: + fmt.Println("Invalid firmware command:", args[0]) + usage() + } } diff --git a/cmd/fwtablectl/part.go b/cmd/fwtablectl/part.go index da7c446..b6878f6 100644 --- a/cmd/fwtablectl/part.go +++ b/cmd/fwtablectl/part.go @@ -14,6 +14,9 @@ func part(args []string) { usage() } partRemove(args[1:]) + default: + fmt.Println("Invalid parts command:", args[0]) + usage() } }