All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 2/2] Add a cli command to test the TPM device.
Date: Sat, 15 Oct 2011 15:13:51 -0400	[thread overview]
Message-ID: <201110151513.52606.vapier@gentoo.org> (raw)
In-Reply-To: <20111015033908.13FA4419FF@eskimo.mtv.corp.google.com>

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 <data> [<data>]   - 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 "<byte> [<byte> ...]" 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 

  parent reply	other threads:[~2011-10-15 19:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-15  3:39 [U-Boot] [PATCH v2 2/2] Add a cli command to test the TPM device Vadim Bendebury
2011-10-15 18:02 ` Marek Vasut
2011-10-15 18:23   ` Vadim Bendebury
2011-10-15 19:44     ` Wolfgang Denk
2011-10-15 20:01       ` Mike Frysinger
2011-10-15 20:27         ` Vadim Bendebury
2011-10-16  5:15           ` Mike Frysinger
2011-10-16  0:58       ` Vadim Bendebury
2011-10-15 19:08   ` Mike Frysinger
2011-10-16  0:56     ` Vadim Bendebury
2011-10-15 19:13 ` Mike Frysinger [this message]
2011-10-15 19:14 ` Mike Frysinger

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=201110151513.52606.vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=u-boot@lists.denx.de \
    /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.