Re: [PATCH] hdparm: Show form factor and media rotation rate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux