/[linux-patches]/genpatches-2.6/trunk/2.6.14/1149_4_i8k-blank-service-tags.patch
Gentoo

Contents of /genpatches-2.6/trunk/2.6.14/1149_4_i8k-blank-service-tags.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 292 - (show annotations) (download) (as text)
Tue Jan 31 21:50:53 2006 UTC (14 years, 8 months ago) by johnm
File MIME type: text/x-diff
File size: 1448 byte(s)
Large update - thanks goes to Kerin Millar for the legwork.
1 From stable-bounces@linux.kernel.org Mon Dec 12 12:32:39 2005
2 Date: Sat, 12 Nov 2005 11:59:25 -0800
3 Message-Id: <200511121959.jACJxPZh004172@hera.kernel.org>
4 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
5 To: git-commits-head@vger.kernel.org
6 Cc:
7 Subject: I8K: fix /proc reporting of blank service tags
8
9 From: Dmitry Torokhov <dtor_core@ameritech.net>
10
11 [PATCH] I8K: fix /proc reporting of blank service tags
12
13 Make /proc/i8k display '?' when service tag is blank in BIOS.
14 This fixes segfault in i8k gkrellm plugin.
15
16 Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
17 Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
19
20
21 ---
22 drivers/char/i8k.c | 6 ++++--
23 1 file changed, 4 insertions(+), 2 deletions(-)
24
25 --- linux-2.6.14.3.orig/drivers/char/i8k.c
26 +++ linux-2.6.14.3/drivers/char/i8k.c
27 @@ -99,7 +99,9 @@ struct smm_regs {
28
29 static inline char *i8k_get_dmi_data(int field)
30 {
31 - return dmi_get_system_info(field) ? : "N/A";
32 + char *dmi_data = dmi_get_system_info(field);
33 +
34 + return dmi_data && *dmi_data ? dmi_data : "?";
35 }
36
37 /*
38 @@ -396,7 +398,7 @@ static int i8k_proc_show(struct seq_file
39 return seq_printf(seq, "%s %s %s %d %d %d %d %d %d %d\n",
40 I8K_PROC_FMT,
41 bios_version,
42 - dmi_get_system_info(DMI_PRODUCT_SERIAL) ? : "N/A",
43 + i8k_get_dmi_data(DMI_PRODUCT_SERIAL),
44 cpu_temp,
45 left_fan, right_fan, left_speed, right_speed,
46 ac_power, fn_key);

  ViewVC Help
Powered by ViewVC 1.1.20