Change fd_init() and memory_source_init() to check LOCAL_ACTIVE(). We need
this for the last patch in series.

The 1st change is obviously safe, fd_init() sets LIVE_SYSTEM | MEMSRC_LOCAL
and nobody else can set LIVE_SYSTEM if we get here.

The 2nd one should be correct even if REMOTE() is true, we check MEMSRC_LOCAL
at the start of memory_source_init().
---
 filesys.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/filesys.c b/filesys.c
index 9ea8f7e..3b2ce05 100644
--- a/filesys.c
+++ b/filesys.c
@@ -135,7 +135,7 @@ fd_init(void)
                        pc->nfd = -1;
                }
 
-               if (ACTIVE() && !(pc->namelist_debug || pc->system_map)) {
+               if (LOCAL_ACTIVE() && !(pc->namelist_debug || pc->system_map)) {
                        memory_source_init();
                        match_proc_version();
                }
@@ -169,7 +169,7 @@ memory_source_init(void)
        if (pc->flags & KERNEL_DEBUG_QUERY)
                return;
 
-        if (ACTIVE()) {
+        if (LOCAL_ACTIVE()) {
                if (pc->mfd != -1)  /* already been here */
                        return;
 
-- 
2.5.0

--
Crash-utility mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/crash-utility

Reply via email to