summaryrefslogtreecommitdiffstats
path: root/src/CLI/CLI.cpp
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-12-10 13:55:24 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2009-12-10 13:55:24 +0100
commitb07c8d78cbad077ea0596b90b370e2db0fe8b577 (patch)
tree4835acd8741a392833fc2969ec512b21c3f39584 /src/CLI/CLI.cpp
parentfc2c5e2f02e6da00e27d68a83277a61efdcc9f83 (diff)
downloadabrt-b07c8d78cbad077ea0596b90b370e2db0fe8b577.tar.gz
abrt-b07c8d78cbad077ea0596b90b370e2db0fe8b577.tar.xz
abrt-b07c8d78cbad077ea0596b90b370e2db0fe8b577.zip
make "abrt-cli --delete randomuuid" report that deletion failed. closes bug 59
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'src/CLI/CLI.cpp')
-rw-r--r--src/CLI/CLI.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/CLI/CLI.cpp b/src/CLI/CLI.cpp
index ac686ba3..1f7e5430 100644
--- a/src/CLI/CLI.cpp
+++ b/src/CLI/CLI.cpp
@@ -183,6 +183,7 @@ int main(int argc, char** argv)
ABRTDaemon.Connect(VAR_RUN"/abrt.socket");
#endif
+ int exitcode = 0;
switch (op)
{
case OPT_GET_LIST:
@@ -200,7 +201,11 @@ int main(int argc, char** argv)
break;
case OPT_DELETE:
{
- call_DeleteDebugDump(uuid);
+ if (call_DeleteDebugDump(uuid) != 0)
+ {
+ log("Can't delete debug dump with UUID '%s'", uuid);
+ exitcode = 1;
+ }
break;
}
}
@@ -209,5 +214,5 @@ int main(int argc, char** argv)
ABRTDaemon.Disconnect();
#endif
- return 0;
+ return exitcode;
}