Linux ATA/IDE development
 help / color / mirror / Atom feed
From: Michael Tokarev <mjt@tls.msk.ru>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Mark Lord <liml@rtr.ca>, linux-ide@vger.kernel.org
Subject: Re: [PATCH] hdparm: Show form factor and media rotation rate
Date: Sun, 22 Feb 2009 01:41:20 +0300	[thread overview]
Message-ID: <49A08310.8020100@msgid.tls.msk.ru> (raw)
In-Reply-To: <yq1fxi8eh7e.fsf@sermon.lab.mkp.net>

Martin K. Petersen wrote:
> Make hdparm display form factor and media rotation rate when using -I.

Ok, just a small (but I think very useful) nitpick:

[]
> +	/* Form factor */
> +	if(val[FORM_FACTOR] > 0) {
> +		printf("\tForm Factor: ");
> +		switch(val[FORM_FACTOR]) {
...
> +			printf("1.8 inch");
> +			break;
> +		default:
> +			printf("unknown");
> +			break;

How about printing the actual (unrecognized) value here?   Like this:

  +		default:
  +			printf("unknown (raw value = %d)", val[FORM_FACTOR]);
  +			break;

(with whatever %d needed)

Thanks!

/mjt

  reply	other threads:[~2009-02-21 22:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-21  1:01 [PATCH] hdparm: Show form factor and media rotation rate Martin K. Petersen
2009-02-21 22:41 ` Michael Tokarev [this message]
2009-02-23 16:14   ` Martin K. Petersen
2009-02-23 20:26     ` Mark Lord
2009-02-22  5:53 ` Mark Lord
2009-02-23 16:13   ` Martin K. Petersen

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=49A08310.8020100@msgid.tls.msk.ru \
    --to=mjt@tls.msk.ru \
    --cc=liml@rtr.ca \
    --cc=linux-ide@vger.kernel.org \
    --cc=martin.petersen@oracle.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