summaryrefslogtreecommitdiffstats
path: root/lib/Utils/DebugDump.cpp
diff options
context:
space:
mode:
authorZdenek Prikryl <zprikryl@redhat.com>2009-02-12 11:50:56 +0100
committerZdenek Prikryl <zprikryl@redhat.com>2009-02-12 11:50:56 +0100
commitaaef16fb6fce63936bc0fd7aca205b7f1b0c9580 (patch)
tree4d784b7fe97d90ce42c5a7c165e9013efed7d71b /lib/Utils/DebugDump.cpp
parent6259030484be3e11c1d8accf943fd5411cb0d7bb (diff)
downloadabrt-aaef16fb6fce63936bc0fd7aca205b7f1b0c9580.tar.gz
abrt-aaef16fb6fce63936bc0fd7aca205b7f1b0c9580.tar.xz
abrt-aaef16fb6fce63936bc0fd7aca205b7f1b0c9580.zip
for getting proc info and package names there are separate plublic methods
Diffstat (limited to 'lib/Utils/DebugDump.cpp')
-rw-r--r--lib/Utils/DebugDump.cpp30
1 files changed, 17 insertions, 13 deletions
diff --git a/lib/Utils/DebugDump.cpp b/lib/Utils/DebugDump.cpp
index e0f88c4..09e65ae 100644
--- a/lib/Utils/DebugDump.cpp
+++ b/lib/Utils/DebugDump.cpp
@@ -79,13 +79,6 @@ void CDebugDump::Create(const std::string& pDir)
SaveTime();
}
-void CDebugDump::Create(const std::string& pDir, const std::string& pPID)
-{
- Create(pDir);
- SaveProc(pPID);
-}
-
-
void CDebugDump::Delete(const std::string& pDir)
{
if (!ExistFileDir(pDir))
@@ -253,12 +246,6 @@ void CDebugDump::SaveProc(const std::string& pPID)
SaveText(FILENAME_EXECUTABLE, executable);
}
- CPackages packages;
- while (!packages.SearchFile(executable)) {}
- while (!packages.GetStatus()) {}
- std::string package = packages.GetSearchFileReply();
-
- SaveText(FILENAME_PACKAGE, package);
path = "/proc/"+pPID+"/status";
std::string uid = "";
@@ -273,4 +260,21 @@ void CDebugDump::SaveProc(const std::string& pPID)
ii++;
}
SaveText(FILENAME_UID, uid);
+
+ path = "/proc/"+pPID+"/cmdline";
+ LoadTextFile(path, data);
+ SaveText(FILENAME_CMDLINE, data);
+}
+
+void CDebugDump::SavePackage()
+{
+ std::string executable;
+ std::string package = "";
+ if (Exist(FILENAME_EXECUTABLE))
+ {
+ CPackages packages;
+ LoadText(FILENAME_EXECUTABLE, executable);
+ package = packages.SearchFile("/usr/sbin/acpid");
+ }
+ SaveText(FILENAME_PACKAGE, package);
}