From: Marius Vlad <marius.c.vlad@intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH i-g-t 00/17] tools/intel_bios_reader updates
Date: Wed, 4 May 2016 20:35:18 +0300 [thread overview]
Message-ID: <20160504173517.GA21576@mcvlad-wk.rb.intel.com> (raw)
In-Reply-To: <cover.1462285023.git.jani.nikula@intel.com>
[-- Attachment #1.1: Type: text/plain, Size: 3367 bytes --]
Care to add this usage for it as well?
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;
}
}
--
2.5.0
On Tue, May 03, 2016 at 05:18:50PM +0300, Jani Nikula wrote:
> Give the intel_bios_reader tool some love. The last patch updating the
> man page doubles as a summary.
>
> BR,
> Jani.
>
>
> Jani Nikula (17):
> tools/intel_bios_reader: drop unused macros
> tools/intel_bios_reader: make VBIOS non-global
> tools/intel_bios_reader: add command line option parsing and --file
> parameter
> tools/intel_bios_reader: add --devid parameter
> tools/intel_bios_reader: drop unused lvds_support variable
> tools/intel_bios_reader: drop silly tv_present variable and printout
> tools/intel_bios_reader: pass around a context pointer instead of
> bdb_header
> tools/intel_bios_reader: move more globals to struct context
> tools/intel_bios_reader: move devid to context too
> tools/intel_bios_reader: drop dependencies on lvds block parsing
> tools/intel_bios_reader: let the user specify panel type on the
> command line
> tools/intel_bios_reader: dump the blocks in numerical order
> tools/intel_bios_reader: add --hexdump option to dump hex, disable by
> default
> tools/intel_bios_reader: add support for dumping only specific section
> tools/intel_bios_reader: add --all-panels option to dump all panels
> tools/intel_bios_reader: free the block returned by find_section
> man: update intel_bios_reader man page
>
> man/intel_bios_reader.rst | 48 +++++--
> tools/intel_bios_reader.c | 310 +++++++++++++++++++++++++++++++---------------
> 2 files changed, 249 insertions(+), 109 deletions(-)
>
> --
> 2.1.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-05-04 17:32 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 ` Marius Vlad [this message]
2016-05-12 11:18 ` [PATCH i-g-t 00/17] tools/intel_bios_reader updates Jani Nikula
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=20160504173517.GA21576@mcvlad-wk.rb.intel.com \
--to=marius.c.vlad@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox