hal: Branch 'hal-0_5_8-branch'

Sjoerd Simons sjoerd at kemper.freedesktop.org
Wed Sep 27 12:08:49 PDT 2006


 hald/linux/probing/probe-smbios.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

New commits:
diff-tree d432770926e8cb95cc170ecd142ec2a319ed1d2f (from c127f54ee1a91743989ccdbe93025740fe9cec73)
Author: Sjoerd Simons <sjoerd at luon.net>
Date:   Sun Sep 17 21:57:11 2006 +0200

    Let probe-smbios only return succes when it has info
    
    Let probe-smbios only return successfully if it actually got something
    usefull to parse. Otherwise we're just checking the output for nothing.
    (cherry picked from 7b4b27aa607baf38d1e8d8b38d748cff2e5210e3 commit)

diff --git a/hald/linux/probing/probe-smbios.c b/hald/linux/probing/probe-smbios.c
index 2beb809..bb9ace3 100644
--- a/hald/linux/probing/probe-smbios.c
+++ b/hald/linux/probing/probe-smbios.c
@@ -140,7 +140,7 @@ main (int argc, char *argv[])
 		break;
 	case -1:
 		HAL_ERROR (("Cannot fork!"));
-		break;
+		goto out;
 	}
 	
 	/* parent continues from here */
@@ -199,6 +199,10 @@ main (int argc, char *argv[])
 		if (dmiparser_state == DMIPARSER_STATE_IGNORE)
 			continue;
 
+		/* return success only if there was something usefull to parse */
+		ret = 0;
+
+
 		/* removes the leading tab */
 		nbuf = &buf[1];
 
@@ -228,9 +232,6 @@ main (int argc, char *argv[])
 	/* as read to EOF, close */
 	fclose (f);
 
-	/* return success */
-	ret = 0;
-
 out:
 	/* free ctx */
 	if (ctx != NULL) {


More information about the hal-commit mailing list