History log of /u-boot/tools/dumpimage.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 11f29d44 12-Feb-2022 Pali Rohár <pali@kernel.org>

tools: mkimage/dumpimage: Allow to use -l with -T

Currently -l option for mkimage and dumpimage ignores option -T and always
tries to autodetect image type.

With this change it is possible to tell mkimage and dumpimage to parse
image file as specific type (and not random autodetected type). This allows
to use mkimage -l or dumpimage -l as tool for validating image.

params.type for -l option is now by default initialized to zero
(IH_TYPE_INVALID) instead of IH_TYPE_KERNEL. imagetool_get_type() for
IH_TYPE_INVALID returns NULL, which is assigned to tparams. mkimage and
dumpimage code is extended to handle tparams with NULL for -l option. And
imagetool_verify_print_header() is extended to do validation via tparams if
is not NULL.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>

# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>

# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>

# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>

# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>

# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>

# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>

# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>

# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our single license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini <trini@konsulko.com>

# 67f946cd 14-Jan-2015 Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>

dumpimage: replace the term "datafile" by "subimage"

Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>

# f41f5b7c 14-Jan-2015 Guilherme Maciel Ferreira <guilherme.maciel@datacom.ind.br>

dumpimage: add 'T' option to explicitly set the image type

Some image types, like "KeyStone GP", do not have magic numbers to
distinguish them from other image types. Thus, the automatic image
type discovery does not work correctly.

This patch also fix some integer type mismatches.

Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>

# a93648d1 14-Jan-2015 Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>

imagetool: replace image registration function by linker_lists feature

The registration was introduced in commit f86ed6a8d52c99bb2d17d3cac1647edca0c4399c

This commit also removes all registration functions, and the member "next"
from image_type_params struct

Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>

# 0ca6691c 14-Jan-2015 Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>

imagetool: move common code to imagetool module

The get_type() and verify_print_header() functions have the
same code on both dumpimage.c and mkimage.c modules.

Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>

# a804b5ce 01-Dec-2013 Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>

Add dumpimage, a tool to extract data from U-Boot images

Given a multi-file image created through the mkimage's -d option:

$ mkimage -A x86 -O linux -T multi -n x86 -d vmlinuz:initrd.img:System.map \
multi.img

Image Name: x86
Created: Thu Jul 25 10:29:13 2013
Image Type: Intel x86 Linux Multi-File Image (gzip compressed)
Data Size: 13722956 Bytes = 13401.32 kB = 13.09 MB
Load Address: 00000000
Entry Point: 00000000
Contents:
Image 0: 4040128 Bytes = 3945.44 kB = 3.85 MB
Image 1: 7991719 Bytes = 7804.41 kB = 7.62 MB
Image 2: 1691092 Bytes = 1651.46 kB = 1.61 MB

It is possible to perform the innverse operation -- extracting any file from
the image -- by using the dumpimage's -i option:

$ dumpimage -i multi.img -p 2 System.map

Although it's feasible to retrieve "data files" from image through scripting,
the requirement to embed tools such 'dd', 'awk' and 'sed' for this sole purpose
is cumbersome and unreliable -- once you must keep track of file sizes inside
the image. Furthermore, extracting data files using "dumpimage" tool is faster
than through scripting.

Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Signed-off-by: Simon Glass <sjg@chromium.org>

# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3cd06be 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Fall-though to print usage for help command

This has the same result but some compilers will warn about this
fall-through if there are statements as part of the label block.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# 79e984c4 17-Sep-2019 Andrew F. Davis <afd@ti.com>

tools: dumpimage: Provide more feedback on internal errors

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what has gone
wrong. Add additional error messages to make the cause of the failure
more obvious.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# e3b4fc95 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Clarify help

Help message isn't clear over the use of the "-T" option (it's to declare
the type of image that the tool is operating on), which also is optional
as it defaults to the default image type. It's also missing a description
of the "-o" option, so add it.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 65a80b43 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Add help option and make error paths consistent

The utility dumpimage has error paths that display the usage and others
that exit without displaying usage. Add an explicit help option to
dumpimage to display the usage and remove it's use in error paths to make
the error messages more obvious and errors paths more consistent.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 11e3c1fd 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify internal logic

There are 3 supported modes of operation:

1) Show version
2) List image contents
3) Extract image component

Option (1) terminates early, so only options (2) and (3) remain. Remove
redundant check for these modes.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 12b83187 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Simplify arguments

The dump image utility has very confusing syntax. If called to list image
contents ("-l") it takes the image name as a positional argument. If the
utility is called to extract something from the image, the image must be
provided via the optional argument "-i" as well as the positional argument
but the value passed in the positional argument will be completely
ignored.

Simplify dumpimage by always providing the image as the first positional
argument. Assume we want to dump something from the image if we do not
provide the "-l" option for now.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 57a608e9 25-Jan-2019 Martyn Welch <martyn.welch@collabora.com>

tools: dumpimage: Provide more feedback on error

The dumpimage utility errors out in a number of places without providing
sufficient feedback to allow the user to easily determine what they have
done wrong. Add addtional error messages to make the cause of the failure
more obvious.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>


# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our single license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini <trini@konsulko.com>


# 67f946cd 14-Jan-2015 Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>

dumpimage: replace the term "datafile" by "subimage"

Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>


# f41f5b7c 14-Jan-2015 Guilherme Maciel Ferreira <guilherme.maciel@datacom.ind.br>

dumpimage: add 'T' option to explicitly set the image type

Some image types, like "KeyStone GP", do not have magic numbers to
distinguish them from other image types. Thus, the automatic image
type discovery does not work correctly.

This patch also fix some integer type mismatches.

Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>


# a93648d1 14-Jan-2015 Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>

imagetool: replace image registration function by linker_lists feature

The registration was introduced in commit f86ed6a8d52c99bb2d17d3cac1647edca0c4399c

This commit also removes all registration functions, and the member "next"
from image_type_params struct

Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>


# 0ca6691c 14-Jan-2015 Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>

imagetool: move common code to imagetool module

The get_type() and verify_print_header() functions have the
same code on both dumpimage.c and mkimage.c modules.

Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>


# a804b5ce 01-Dec-2013 Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>

Add dumpimage, a tool to extract data from U-Boot images

Given a multi-file image created through the mkimage's -d option:

$ mkimage -A x86 -O linux -T multi -n x86 -d vmlinuz:initrd.img:System.map \
multi.img

Image Name: x86
Created: Thu Jul 25 10:29:13 2013
Image Type: Intel x86 Linux Multi-File Image (gzip compressed)
Data Size: 13722956 Bytes = 13401.32 kB = 13.09 MB
Load Address: 00000000
Entry Point: 00000000
Contents:
Image 0: 4040128 Bytes = 3945.44 kB = 3.85 MB
Image 1: 7991719 Bytes = 7804.41 kB = 7.62 MB
Image 2: 1691092 Bytes = 1651.46 kB = 1.61 MB

It is possible to perform the innverse operation -- extracting any file from
the image -- by using the dumpimage's -i option:

$ dumpimage -i multi.img -p 2 System.map

Although it's feasible to retrieve "data files" from image through scripting,
the requirement to embed tools such 'dd', 'awk' and 'sed' for this sole purpose
is cumbersome and unreliable -- once you must keep track of file sizes inside
the image. Furthermore, extracting data files using "dumpimage" tool is faster
than through scripting.

Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Signed-off-by: Simon Glass <sjg@chromium.org>