hal: Branch 'master'

David Zeuthen david at kemper.freedesktop.org
Thu Apr 12 12:53:30 PDT 2007


 hald/mmap_cache.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

New commits:
diff-tree 81aa6e39d309d3cdba216f8076e3b5260fb4bcfa (from 5745da44f3bb43dafd9b53cbfcfc1218619a5263)
Author: Doug Goldstein <cardoe at gentoo.org>
Date:   Thu Apr 12 15:53:32 2007 -0400

    fix fdi cache regen logic error
    
    There's a logic error in the check of the return from fdi cache regen.
    Basically if exit_type wasn't HALD_RUN_SUCCESS (which is defined as 0)
    or return_code isn't 0 or 2, then an error occurred. Based on the
    order users would have the following in their logs.
    
    12:54:13.827 [I] mmap_cache.c:137: In regen_cache_cb exit_type=0, return_code=0
    12:54:13.827 [E] mmap_cache.c:190: fdi cache regeneration failed!
    
    The following patch corrects the issue and should be applied to 0.5.9
    branch as well.

diff --git a/hald/mmap_cache.c b/hald/mmap_cache.c
index 6cdec6b..af875d9 100644
--- a/hald/mmap_cache.c
+++ b/hald/mmap_cache.c
@@ -105,10 +105,10 @@ regen_cache_cb (HalDevice *d, 
 	HAL_INFO (("In regen_cache_cb exit_type=%d, return_code=%d", exit_type, return_code));
 
 	/* see create_cache.c - rc==0 means success - rc==2 means "success, but some fdi files skipped" */
-	if (exit_type != HALD_RUN_SUCCESS || return_code != 0 || return_code != 2) {
-		regen_cache_success = FALSE;
-	} else {
+	if (exit_type == HALD_RUN_SUCCESS && ( return_code == 0 || return_code == 2)) {
 		regen_cache_success = TRUE;
+	} else {
+		regen_cache_success = FALSE;
 	}
 
 	regen_cache_done = TRUE;


More information about the hal-commit mailing list