* [lm-sensors] sensors-detect won't recognize 3.0 kernel
@ 2011-06-14 5:29 Micah Gersten
2011-06-17 15:07 ` Jean Delvare
2011-06-17 17:04 ` Micah Gersten
0 siblings, 2 replies; 3+ messages in thread
From: Micah Gersten @ 2011-06-14 5:29 UTC (permalink / raw)
To: lm-sensors
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I filed this bug [1] in Launchpad for Ubuntu and attached the
following patch:
+--- lm-sensors-3-3.2.0.orig/prog/detect/sensors-detect
++++ lm-sensors-3-3.2.0/prog/detect/sensors-detect
+@@ -2258,7 +2258,8 @@ use vars qw(@kernel_version $kernel_arch
+
+ sub initialize_kernel_version
+ {
+- `uname -r` =~ /(\d+)\.(\d+)\.(\d+)(.*)/;
++ #Third decimal only for point releases starting with 3.0
++ `uname -r` =~ /(\d+)\.(\d+)(\.(\d+))?(.*)/;
+ @kernel_version = ($1, $2, $3, $4);
+ chomp($kernel_arch = `uname -m`);
+
Thanks,
Micah
[1] https://bugs.launchpad.net/bugs/797001
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iEYEARECAAYFAk328b0ACgkQTniv4aqX/VnAnACfXxwI1xGCCprG6BLkcV1gEimL
ncEAnjSJ1pPDfE33tLwe9P4SI9ls9xin
ŠqL
-----END PGP SIGNATURE-----
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [lm-sensors] sensors-detect won't recognize 3.0 kernel
2011-06-14 5:29 [lm-sensors] sensors-detect won't recognize 3.0 kernel Micah Gersten
@ 2011-06-17 15:07 ` Jean Delvare
2011-06-17 17:04 ` Micah Gersten
1 sibling, 0 replies; 3+ messages in thread
From: Jean Delvare @ 2011-06-17 15:07 UTC (permalink / raw)
To: lm-sensors
Hi Micah,
On Tue, 14 Jun 2011 00:29:49 -0500, Micah Gersten wrote:
> I filed this bug [1] in Launchpad for Ubuntu and attached the
> following patch:
>
>
> +--- lm-sensors-3-3.2.0.orig/prog/detect/sensors-detect
> ++++ lm-sensors-3-3.2.0/prog/detect/sensors-detect
> +@@ -2258,7 +2258,8 @@ use vars qw(@kernel_version $kernel_arch
> +
> + sub initialize_kernel_version
> + {
> +- `uname -r` =~ /(\d+)\.(\d+)\.(\d+)(.*)/;
> ++ #Third decimal only for point releases starting with 3.0
> ++ `uname -r` =~ /(\d+)\.(\d+)(\.(\d+))?(.*)/;
> + @kernel_version = ($1, $2, $3, $4);
> + chomp($kernel_arch = `uname -m`);
> +
Did you actually test your patch? I fail to see how it could work.
@kernel_version would contain (2, 6, .39, 39) for kernel 2.6.39.1. I
have the following instead:
@@ -2462,8 +2462,8 @@
sub initialize_kernel_version
{
- `uname -r` =~ /(\d+)\.(\d+)\.(\d+)(.*)/;
- @kernel_version = ($1, $2, $3, $4);
+ `uname -r` =~ /(\d+)\.(\d+)(?:\.(\d+))?(.*)/;
+ @kernel_version = ($1, $2, $3 || 0, $4);
chomp($kernel_arch = `uname -m`);
# We only support kernels >= 2.6.5
which properly sets @kernel_version to (2, 6, 39, .1).
That being said, I would much prefer if Linus could just get a life and
stick with 3-number versions, i.e. 3.0.0. Updating user-space at wide
to cope with this change is just wasting everyone's time at the moment,
for no benefit.
--
Jean Delvare
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [lm-sensors] sensors-detect won't recognize 3.0 kernel
2011-06-14 5:29 [lm-sensors] sensors-detect won't recognize 3.0 kernel Micah Gersten
2011-06-17 15:07 ` Jean Delvare
@ 2011-06-17 17:04 ` Micah Gersten
1 sibling, 0 replies; 3+ messages in thread
From: Micah Gersten @ 2011-06-17 17:04 UTC (permalink / raw)
To: lm-sensors
On 06/17/2011 10:07 AM, Jean Delvare wrote:
> Hi Micah,
>
> On Tue, 14 Jun 2011 00:29:49 -0500, Micah Gersten wrote:
>> I filed this bug [1] in Launchpad for Ubuntu and attached the
>> following patch:
>>
>>
>> +--- lm-sensors-3-3.2.0.orig/prog/detect/sensors-detect
>> ++++ lm-sensors-3-3.2.0/prog/detect/sensors-detect
>> +@@ -2258,7 +2258,8 @@ use vars qw(@kernel_version $kernel_arch
>> +
>> + sub initialize_kernel_version
>> + {
>> +- `uname -r` =~ /(\d+)\.(\d+)\.(\d+)(.*)/;
>> ++ #Third decimal only for point releases starting with 3.0
>> ++ `uname -r` =~ /(\d+)\.(\d+)(\.(\d+))?(.*)/;
>> + @kernel_version = ($1, $2, $3, $4);
>> + chomp($kernel_arch = `uname -m`);
>> +
>
> Did you actually test your patch? I fail to see how it could work.
> @kernel_version would contain (2, 6, .39, 39) for kernel 2.6.39.1. I
> have the following instead:
>
> @@ -2462,8 +2462,8 @@
>
> sub initialize_kernel_version
> {
> - `uname -r` =~ /(\d+)\.(\d+)\.(\d+)(.*)/;
> - @kernel_version = ($1, $2, $3, $4);
> + `uname -r` =~ /(\d+)\.(\d+)(?:\.(\d+))?(.*)/;
> + @kernel_version = ($1, $2, $3 || 0, $4);
> chomp($kernel_arch = `uname -m`);
>
> # We only support kernels >= 2.6.5
>
> which properly sets @kernel_version to (2, 6, 39, .1).
>
> That being said, I would much prefer if Linus could just get a life and
> stick with 3-number versions, i.e. 3.0.0. Updating user-space at wide
> to cope with this change is just wasting everyone's time at the moment,
> for no benefit.
>
I did test it, but regretfully, only on the 3.0 kernel. I only noticed
your patch afterwards. I think yours is the better way to do this, so
I"ll be updating my patch with yours. Thanks for the feedback. Looking
forward to this being included in a future release.
Thanks,
Micah
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-06-17 17:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-14 5:29 [lm-sensors] sensors-detect won't recognize 3.0 kernel Micah Gersten
2011-06-17 15:07 ` Jean Delvare
2011-06-17 17:04 ` Micah Gersten
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.