hal: Branch 'hal-0_5_9-branch'
David Zeuthen
david at kemper.freedesktop.org
Thu Apr 12 12:53:52 PDT 2007
hald/mmap_cache.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
New commits:
diff-tree 1078461043f99e2f9adc51d9101e3c343a04ff6d (from f22a37b7a7073b3398e9060e21bc1d12dc58783f)
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 1711f3f..1170bd8 100644
--- a/hald/mmap_cache.c
+++ b/hald/mmap_cache.c
@@ -137,10 +137,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