All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dtor_core@ameritech.net>
To: Al Viro <viro@ftp.linux.org.uk>
Cc: Dave Jones <davej@redhat.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Dmitry Torokhov <dtor@mail.ru>
Subject: Re: [PATCH] I8K: convert to seqfile
Date: Fri, 4 Nov 2005 00:40:30 -0500	[thread overview]
Message-ID: <200511040040.31457.dtor_core@ameritech.net> (raw)
In-Reply-To: <20051104044118.GF7992@ftp.linux.org.uk>

On Thursday 03 November 2005 23:41, Al Viro wrote:
> On Thu, Nov 03, 2005 at 11:19:02PM -0500, Dave Jones wrote:
> > The missing '?' field is puzzling though. Looking at the diff,
> > this should work.  Is this a shortfalling of seq_file perhaps ?
> 
> dmi_get_system_info() returns "" instead of "?" now, apparently...
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 

Oops! I have that field in my BIOS so I never noticed the problem...

I wonder if something like the patch below will fix it.

-- 
Dmitry

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---

 drivers/char/i8k.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

Index: work/drivers/char/i8k.c
===================================================================
--- work.orig/drivers/char/i8k.c
+++ work/drivers/char/i8k.c
@@ -99,7 +99,9 @@ struct smm_regs {
 
 static inline char *i8k_get_dmi_data(int field)
 {
-	return dmi_get_system_info(field) ? : "N/A";
+	char *dmi_data = dmi_get_system_info(field);
+
+	return dmi_data && *dmi_data ? dmi_data : "?";
 }
 
 /*


      reply	other threads:[~2005-11-04  5:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200506260103.j5Q13ovn020970@hera.kernel.org>
2005-11-04  4:19 ` [PATCH] I8K: convert to seqfile Dave Jones
2005-11-04  4:41   ` Al Viro
2005-11-04  5:40     ` Dmitry Torokhov [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=200511040040.31457.dtor_core@ameritech.net \
    --to=dtor_core@ameritech.net \
    --cc=davej@redhat.com \
    --cc=dtor@mail.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@ftp.linux.org.uk \
    /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.