From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Date: Sat, 15 Oct 2011 15:13:51 -0400 Subject: [U-Boot] [PATCH v2 2/2] Add a cli command to test the TPM device. In-Reply-To: <20111015033908.13FA4419FF@eskimo.mtv.corp.google.com> References: <20111015033908.13FA4419FF@eskimo.mtv.corp.google.com> Message-ID: <201110151513.52606.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Friday 14 October 2011 23:39:08 Vadim Bendebury wrote: > --- /dev/null > +++ b/common/cmd_tpm.c > > + /* > + * Verify that in case it is present, the first argument, it is > + * exactly one character in size. > + */ > + if (argc < 7) { > + puts("command should be at least six bytes in size\n"); > + return ~0; > + } > ... > +U_BOOT_CMD(tpm, MAX_TRANSACTION_SIZE, 1, do_tpm, > + "tpm [] - write data and read ressponse\n", the usage information does not convey that you have to do: tpm 1 2 3 4 5 6 7 8 9 perhaps says " [ ...]" instead ? and note that you have to specify at least 6 ? also, there's a typo: ressponse -> response > +static void report_error(const char *msg) > +{ > + if (msg && *msg) > + printf("%s\n", msg); > + cmd_usage(&__u_boot_cmd_tpm); > +} this gets used in one place, and the one place where it does get used, i don't see a point in calling cmd_usage(). just have the one place where this is used call puts() instead. -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20111015/af49390d/attachment.pgp