From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marius Vlad Subject: Re: [PATCH i-g-t 00/17] tools/intel_bios_reader updates Date: Wed, 4 May 2016 20:35:18 +0300 Message-ID: <20160504173517.GA21576@mcvlad-wk.rb.intel.com> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0410291616==" Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id E5CC56E16B for ; Wed, 4 May 2016 17:32:14 +0000 (UTC) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Jani Nikula Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org --===============0410291616== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="xHFwDpU9dbj6ez1V" Content-Disposition: inline --xHFwDpU9dbj6ez1V Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Care to add this usage for it as well? Signed-off-by: Marius Vlad --- 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 }; =20 +static void usage(const char *toolname) +{ + fprintf(stderr, "usage %s:", toolname); + fprintf(stderr, " --file=3D" + " [--devid=3D]" + " [--panel-type=3D]" + " [--all-panels]" + " [--hexdump]" + " [--block=3D]" + " [--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 } }; =20 @@ -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 =3D argv[0]; } else { - printf("usage: %s --file=3D\n", toolname); + usage(toolname); return EXIT_FAILURE; } } --=20 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. >=20 > BR, > Jani. >=20 >=20 > 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 >=20 > man/intel_bios_reader.rst | 48 +++++-- > tools/intel_bios_reader.c | 310 +++++++++++++++++++++++++++++++---------= ------ > 2 files changed, 249 insertions(+), 109 deletions(-) >=20 > --=20 > 2.1.4 >=20 > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx --xHFwDpU9dbj6ez1V Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJXKjLVAAoJELmLWIAQzyE+fKoH/igaEUrVLPVG0SCcoGvh+l1J 9LfjXrvxwvL84le8/PiL0BovxodDrz7UhLEfeQHbXKczfb0FwfHU45QP9Y6W8KEu uEto6AHLJQephSjAU93Aln5EK82itVpukLboUtyvB5/c9LYqtpF3UfMysBoX1h/g UUV/AuGJxT+AMvQRUaTJLTYJZdODxc7qy6bmbq+t2vOJZC+Z8Qz+6SY71zCbIJk1 iX3FrFAFxO7n/TpodgFvT4J6Fv4sshKJ3AOJbgpPXSRcQZ5eYWAnOWxwg+aebR/J p8WIYYccL81cl/rrilaWCHdqu7LAtAgIjUQH9fjQuLFYOzOMder3PdKtq14rgBE= =SOLC -----END PGP SIGNATURE----- --xHFwDpU9dbj6ez1V-- --===============0410291616== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KSW50ZWwtZ2Z4 IG1haWxpbmcgbGlzdApJbnRlbC1nZnhAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vaW50ZWwtZ2Z4Cg== --===============0410291616==--