[Pommed-commits] r260 - trunk/pommed
Julien Blache
jblache at alioth.debian.org
Thu Feb 22 01:22:45 CET 2007
Author: jblache
Date: 2007-02-22 01:22:45 +0100 (Thu, 22 Feb 2007)
New Revision: 260
Modified:
trunk/pommed/pommed.c
Log:
Check for libsmbios returning NULL.
Modified: trunk/pommed/pommed.c
===================================================================
--- trunk/pommed/pommed.c 2007-02-22 00:13:15 UTC (rev 259)
+++ trunk/pommed/pommed.c 2007-02-22 00:22:45 UTC (rev 260)
@@ -329,6 +329,13 @@
/* Check vendor name */
prop = SMBIOSGetVendorName();
+
+ if (prop == NULL)
+ {
+ logmsg(LOG_ERR, "Could not get vendor name from SMBIOS; running EFI ?");
+ return MACHINE_ERROR;
+ }
+
logdebug("SMBIOS vendor name: [%s]\n", prop);
if (strcmp(prop, "Apple Computer, Inc.") == 0)
@@ -341,6 +348,13 @@
/* Check system name */
prop = SMBIOSGetSystemName();
+
+ if (prop == NULL)
+ {
+ logmsg(LOG_ERR, "Could not get system name from SMBIOS");
+ return MACHINE_MAC_UNKNOWN;
+ }
+
logdebug("SMBIOS system name: [%s]\n", prop);
/* Core Duo MacBook Pro 15" (January 2006) & 17" (April 2006) */
More information about the Pommed-commits
mailing list