All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH] sensors-detect: Print kernel version and processor info
Date: Wed, 10 Sep 2014 13:17:25 +0000	[thread overview]
Message-ID: <54104F65.8000505@roeck-us.net> (raw)
In-Reply-To: <20140910104841.25a5dda9@endymion.delvare>

On 09/10/2014 01:48 AM, Jean Delvare wrote:
> Print the kernel version and the processor information, to make user
> support easier.
> ---
> Guenter, what do you think? These are questions we often end up asking
> to the user, so gathering the answers early should save us some time.
> If you think any other piece of information should be included too,
> please let me know.
>
Makes sense. Go for it.

Guenter

>   prog/detect/sensors-detect |   13 +++++++++++++
>   1 file changed, 13 insertions(+)
>
> --- lm-sensors.orig/prog/detect/sensors-detect	2014-07-20 13:03:04.826633228 +0200
> +++ lm-sensors/prog/detect/sensors-detect	2014-09-10 09:20:54.530273884 +0200
> @@ -2731,6 +2731,11 @@ sub initialize_kernel_version
>   	}
>   }
>
> +sub print_kernel_version
> +{
> +	printf "# Kernel: \%d.\%d.\%d\%s \%s\n", @kernel_version, $kernel_arch;
> +}
> +
>   sub kernel_version_at_least
>   {
>   	my ($vers, $plvl, $slvl) = @_;
> @@ -2775,6 +2780,12 @@ sub initialize_cpu_list
>   	push @cpu, $entry if scalar keys(%{$entry}); # Last entry
>   }
>
> +sub print_cpu_info
> +{
> +	my $cpu = $cpu[0];
> +	print "# Processor: $cpu->{'model name'} ($cpu->{'cpu family'}/$cpu->{model}/$cpu->{stepping})\n";
> +}
> +
>   # @i2c_adapters is a list of references to hashes, one hash per I2C/SMBus
>   # adapter present on the system. Each entry has the following keys: path,
>   # parent, name (directly taken from sysfs), driver and autoload.
> @@ -7027,6 +7038,8 @@ sub main
>   	print "# sensors-detect revision $revision\n";
>   	initialize_dmi_data();
>   	print_dmi_summary();
> +	print_kernel_version();
> +	print_cpu_info();
>   	print "\n";
>
>   	if ($opt{auto}) {
>
>


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

      reply	other threads:[~2014-09-10 13:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-10  8:48 [lm-sensors] [PATCH] sensors-detect: Print kernel version and processor info Jean Delvare
2014-09-10 13:17 ` Guenter Roeck [this message]

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=54104F65.8000505@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=lm-sensors@vger.kernel.org \
    /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.