|
|
baab13 |
From 7cd921326a2cdba7fa268cd373477149b7118bff Mon Sep 17 00:00:00 2001
|
|
|
baab13 |
From: Jakub Filak <jfilak@redhat.com>
|
|
|
baab13 |
Date: Thu, 4 Jun 2015 10:22:33 +0200
|
|
|
baab13 |
Subject: [PATCH] cli: exit with the number of unreported problems
|
|
|
baab13 |
|
|
|
baab13 |
This patch fixes the broken cli-sanity.
|
|
|
baab13 |
|
|
|
baab13 |
Related: #1224984
|
|
|
baab13 |
|
|
|
baab13 |
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
|
|
baab13 |
---
|
|
|
baab13 |
src/cli/report.c | 5 ++++-
|
|
|
baab13 |
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
baab13 |
|
|
|
baab13 |
diff --git a/src/cli/report.c b/src/cli/report.c
|
|
|
baab13 |
index 6af9769..194f7c9 100644
|
|
|
baab13 |
--- a/src/cli/report.c
|
|
|
baab13 |
+++ b/src/cli/report.c
|
|
|
baab13 |
@@ -50,6 +50,7 @@ int cmd_report(int argc, const char **argv)
|
|
|
baab13 |
load_abrt_conf();
|
|
|
baab13 |
free_abrt_conf_data();
|
|
|
baab13 |
|
|
|
baab13 |
+ int ret = 0;
|
|
|
baab13 |
while (*argv)
|
|
|
baab13 |
{
|
|
|
baab13 |
const char *dir_name = *argv++;
|
|
|
baab13 |
@@ -57,6 +58,7 @@ int cmd_report(int argc, const char **argv)
|
|
|
baab13 |
if (real_problem_id == NULL)
|
|
|
baab13 |
{
|
|
|
baab13 |
error_msg(_("Can't find problem '%s'"), dir_name);
|
|
|
baab13 |
+ ++ret;
|
|
|
baab13 |
continue;
|
|
|
baab13 |
}
|
|
|
baab13 |
|
|
|
baab13 |
@@ -65,6 +67,7 @@ int cmd_report(int argc, const char **argv)
|
|
|
baab13 |
{
|
|
|
baab13 |
error_msg(_("Can't take ownership of '%s'"), real_problem_id);
|
|
|
baab13 |
free(real_problem_id);
|
|
|
baab13 |
+ ++ret;
|
|
|
baab13 |
continue;
|
|
|
baab13 |
}
|
|
|
baab13 |
int status = report_problem_in_dir(real_problem_id,
|
|
|
baab13 |
@@ -84,5 +87,5 @@ int cmd_report(int argc, const char **argv)
|
|
|
baab13 |
exit(status);
|
|
|
baab13 |
}
|
|
|
baab13 |
|
|
|
baab13 |
- return 0;
|
|
|
baab13 |
+ return ret;
|
|
|
baab13 |
}
|
|
|
baab13 |
--
|
|
|
baab13 |
2.4.3
|
|
|
baab13 |
|