From fc2c5e2f02e6da00e27d68a83277a61efdcc9f83 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Thu, 10 Dec 2009 13:10:43 +0100 Subject: style fixes, no code changes Signed-off-by: Denys Vlasenko --- src/CLI/CLI.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/CLI/CLI.cpp') diff --git a/src/CLI/CLI.cpp b/src/CLI/CLI.cpp index 9f2db3f..ac686ba 100644 --- a/src/CLI/CLI.cpp +++ b/src/CLI/CLI.cpp @@ -131,7 +131,7 @@ int main(int argc, char** argv) char* uuid = NULL; int op = -1; - setlocale(LC_ALL,""); + setlocale(LC_ALL, ""); #if ENABLE_NLS bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); -- cgit From b07c8d78cbad077ea0596b90b370e2db0fe8b577 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Thu, 10 Dec 2009 13:55:24 +0100 Subject: make "abrt-cli --delete randomuuid" report that deletion failed. closes bug 59 Signed-off-by: Denys Vlasenko --- src/CLI/CLI.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/CLI/CLI.cpp') diff --git a/src/CLI/CLI.cpp b/src/CLI/CLI.cpp index ac686ba..1f7e543 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; } -- cgit From 890f62322fc8fee262e39a10428b1a2489edf267 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 11 Dec 2009 16:43:57 +0100 Subject: abrt-cli: report success/failure of reporting. closes bug 71 See https://fedorahosted.org/abrt/ticket/71 Signed-off-by: Denys Vlasenko --- src/CLI/CLI.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/CLI/CLI.cpp') diff --git a/src/CLI/CLI.cpp b/src/CLI/CLI.cpp index 1f7e543..1ea3a5d 100644 --- a/src/CLI/CLI.cpp +++ b/src/CLI/CLI.cpp @@ -194,10 +194,10 @@ int main(int argc, char** argv) break; } case OPT_REPORT: - report(uuid, false); + exitcode = report(uuid, false); break; case OPT_REPORT_ALWAYS: - report(uuid, true); + exitcode = report(uuid, true); break; case OPT_DELETE: { -- cgit