From: Jani Nikula <jani.nikula@intel.com>
To: Marius Vlad <marius.c.vlad@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH i-g-t 00/17] tools/intel_bios_reader updates
Date: Thu, 12 May 2016 14:18:51 +0300 [thread overview]
Message-ID: <87a8jvh6ck.fsf@intel.com> (raw)
In-Reply-To: <20160504173517.GA21576@mcvlad-wk.rb.intel.com>
On Wed, 04 May 2016, Marius Vlad <marius.c.vlad@intel.com> wrote:
> Care to add this usage for it as well?
Pushed the entire series, with the strtoul in patch 4 fixed, and added
this usage patch, with a few minor tweaks.
BR,
Jani.
>
> Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
> ---
> tools/intel_bios_reader.c | 19 ++++++++++++++++++-
> 1 file changed, 18 insertions(+), 1 deletion(-)
>
> diff --git a/tools/intel_bios_reader.c b/tools/intel_bios_reader.c
> index de90f5d..4192919 100644
> --- a/tools/intel_bios_reader.c
> +++ b/tools/intel_bios_reader.c
> @@ -1414,8 +1414,22 @@ enum opt {
> OPT_ALL_PANELS,
> OPT_HEXDUMP,
> OPT_BLOCK,
> + OPT_USAGE
> };
>
> +static void usage(const char *toolname)
> +{
> + fprintf(stderr, "usage %s:", toolname);
> + fprintf(stderr, " --file=<rom file>"
> + " [--devid=<device_id>]"
> + " [--panel-type=<panel_type>]"
> + " [--all-panels]"
> + " [--hexdump]"
> + " [--block=<block_no>]"
> + " [--help]\n");
> +
> +}
> +
> int main(int argc, char **argv)
> {
> uint8_t *VBIOS;
> @@ -1443,6 +1457,7 @@ int main(int argc, char **argv)
> { "all-panels", no_argument, NULL, OPT_ALL_PANELS },
> { "hexdump", no_argument, NULL, OPT_HEXDUMP },
> { "block", required_argument, NULL, OPT_BLOCK },
> + { "help", no_argument, NULL, OPT_USAGE },
> { 0 }
> };
>
> @@ -1484,7 +1499,9 @@ int main(int argc, char **argv)
> break;
> case OPT_END:
> break;
> + case OPT_USAGE: /* fall-through */
> case OPT_UNKNOWN:
> + usage(toolname);
> return EXIT_FAILURE;
> }
> }
> @@ -1497,7 +1514,7 @@ int main(int argc, char **argv)
> /* for backwards compatibility */
> filename = argv[0];
> } else {
> - printf("usage: %s --file=<rom file>\n", toolname);
> + usage(toolname);
> return EXIT_FAILURE;
> }
> }
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
prev parent reply other threads:[~2016-05-12 11:18 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-03 14:18 [PATCH i-g-t 00/17] tools/intel_bios_reader updates Jani Nikula
2016-05-03 14:18 ` [PATCH i-g-t 01/17] tools/intel_bios_reader: drop unused macros Jani Nikula
2016-05-03 14:18 ` [PATCH i-g-t 02/17] tools/intel_bios_reader: make VBIOS non-global Jani Nikula
2016-05-03 14:18 ` [PATCH i-g-t 03/17] tools/intel_bios_reader: add command line option parsing and --file parameter Jani Nikula
2016-05-03 14:18 ` [PATCH i-g-t 04/17] tools/intel_bios_reader: add --devid parameter Jani Nikula
2016-05-04 15:25 ` Marius Vlad
2016-05-04 15:47 ` Jani Nikula
2016-05-03 14:18 ` [PATCH i-g-t 05/17] tools/intel_bios_reader: drop unused lvds_support variable Jani Nikula
2016-05-03 14:18 ` [PATCH i-g-t 06/17] tools/intel_bios_reader: drop silly tv_present variable and printout Jani Nikula
2016-05-03 14:18 ` [PATCH i-g-t 07/17] tools/intel_bios_reader: pass around a context pointer instead of bdb_header Jani Nikula
2016-05-03 14:18 ` [PATCH i-g-t 08/17] tools/intel_bios_reader: move more globals to struct context Jani Nikula
2016-05-03 14:18 ` [PATCH i-g-t 09/17] tools/intel_bios_reader: move devid to context too Jani Nikula
2016-05-03 14:19 ` [PATCH i-g-t 10/17] tools/intel_bios_reader: drop dependencies on lvds block parsing Jani Nikula
2016-05-03 14:19 ` [PATCH i-g-t 11/17] tools/intel_bios_reader: let the user specify panel type on the command line Jani Nikula
2016-05-03 14:19 ` [PATCH i-g-t 12/17] tools/intel_bios_reader: dump the blocks in numerical order Jani Nikula
2016-05-03 14:19 ` [PATCH i-g-t 13/17] tools/intel_bios_reader: add --hexdump option to dump hex, disable by default Jani Nikula
2016-05-03 14:19 ` [PATCH i-g-t 14/17] tools/intel_bios_reader: add support for dumping only specific section Jani Nikula
2016-05-03 14:19 ` [PATCH i-g-t 15/17] tools/intel_bios_reader: add --all-panels option to dump all panels Jani Nikula
2016-05-03 14:19 ` [PATCH i-g-t 16/17] tools/intel_bios_reader: free the block returned by find_section Jani Nikula
2016-05-03 14:19 ` [PATCH i-g-t 17/17] man: update intel_bios_reader man page Jani Nikula
2016-05-04 17:35 ` [PATCH i-g-t 00/17] tools/intel_bios_reader updates Marius Vlad
2016-05-12 11:18 ` Jani Nikula [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a8jvh6ck.fsf@intel.com \
--to=jani.nikula@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=marius.c.vlad@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.