diff options
author | Doug Goldstein <cardoe@gentoo.org> | 2007-04-12 15:53:32 -0400 |
---|---|---|
committer | David Zeuthen <davidz@redhat.com> | 2007-04-12 15:53:54 -0400 |
commit | 1078461043f99e2f9adc51d9101e3c343a04ff6d (patch) | |
tree | 455cfbe0cb2a99e31e9e4798004c06800eb14616 | |
parent | f22a37b7a7073b3398e9060e21bc1d12dc58783f (diff) |
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.
-rw-r--r-- | hald/mmap_cache.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hald/mmap_cache.c b/hald/mmap_cache.c index 1711f3fe..1170bd8b 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; |