×
Close
The permissions on this repository are being updated. This may take a while.
During this time, you or some of the project's contributors may not be able
to push to this repository.
Blame SOURCES/0136-cli-exit-with-the-number-of-unreported-problems.patch
Branch: 800d313d89fbc4adcb009a9b434530ec25de1b4c
47a88a
From 7cd921326a2cdba7fa268cd373477149b7118bff Mon Sep 17 00:00:00 2001
47a88a
From: Jakub Filak <jfilak@redhat.com>
47a88a
Date: Thu, 4 Jun 2015 10:22:33 +0200
47a88a
Subject: [PATCH] cli: exit with the number of unreported problems
47a88a
47a88a
This patch fixes the broken cli-sanity.
47a88a
47a88a
Related: #1224984
47a88a
47a88a
Signed-off-by: Jakub Filak <jfilak@redhat.com>
47a88a
---
47a88a
src/cli/report.c | 5 ++++-
47a88a
1 file changed, 4 insertions(+), 1 deletion(-)
47a88a
47a88a
diff --git a/src/cli/report.c b/src/cli/report.c
47a88a
index 6af9769..194f7c9 100644
47a88a
--- a/src/cli/report.c
47a88a
+++ b/src/cli/report.c
47a88a
@@ -50,6 +50,7 @@ int cmd_report(int argc, const char **argv)
47a88a
load_abrt_conf();
47a88a
free_abrt_conf_data();
47a88a
47a88a
+ int ret = 0;
47a88a
while (*argv)
47a88a
{
47a88a
const char *dir_name = *argv++;
47a88a
@@ -57,6 +58,7 @@ int cmd_report(int argc, const char **argv)
47a88a
if (real_problem_id == NULL)
47a88a
{
47a88a
error_msg(_("Can't find problem '%s'"), dir_name);
47a88a
+ ++ret;
47a88a
continue;
47a88a
}
47a88a
47a88a
@@ -65,6 +67,7 @@ int cmd_report(int argc, const char **argv)
47a88a
{
47a88a
error_msg(_("Can't take ownership of '%s'"), real_problem_id);
47a88a
free(real_problem_id);
47a88a
+ ++ret;
47a88a
continue;
47a88a
}
47a88a
int status = report_problem_in_dir(real_problem_id,
47a88a
@@ -84,5 +87,5 @@ int cmd_report(int argc, const char **argv)
47a88a
exit(status);
47a88a
}
47a88a
47a88a
- return 0;
47a88a
+ return ret;
47a88a
}
47a88a
--
47a88a
2.4.3
47a88a