From: Andre Prendel <andre_prendel@gmx.de>
To: lm-sensors@vger.kernel.org
Subject: [lm-sensors] [Patch] libsensors: Introduce error string - Unknown
Date: Thu, 29 Jan 2009 09:09:45 +0000 [thread overview]
Message-ID: <20090129090945.GB4410@ubuntu> (raw)
Hello,
sensors_error() returns NULL if errnum is not valid. Returning
"Unknown error" in this case, makes output clearer than:
foo: (null)
and prevents error output/logging from segmentation faults.
What do you think?
Andre
Signed-off-by: Andre Prendel <andre_prendel@gmx.de>
---
--- lm-sensors-dev/lib/error.c 2009-01-26 17:43:43.000000000 +0100
+++ my-lm-sensors/lib/error.c 2009-01-28 22:49:53.000000000 +0100
@@ -33,7 +33,7 @@ void (*sensors_fatal_error) (const char
sensors_default_fatal_error;
static const char *errorlist[] = {
- /* Invalid error code */ NULL,
+ /* Invalid error code */ "Unknown error",
/* SENSORS_ERR_WILDCARDS */ "Wildcard found in chip name",
/* SENSORS_ERR_NO_ENTRY */ "No such subfeature known",
/* SENSORS_ERR_ACCESS_R */ "Can't read",
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
next reply other threads:[~2009-01-29 9:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-29 9:09 Andre Prendel [this message]
2009-01-29 9:57 ` [lm-sensors] [Patch] libsensors: Introduce error string - Jean Delvare
2009-01-29 11:12 ` [lm-sensors] [Patch] libsensors: Introduce error string Andre Prendel
2009-01-29 12:28 ` [lm-sensors] [Patch] libsensors: Introduce error string - Jean Delvare
2009-01-30 9:01 ` [lm-sensors] [Patch] libsensors: Introduce error string Andre Prendel
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=20090129090945.GB4410@ubuntu \
--to=andre_prendel@gmx.de \
--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.