removed unused patches
This commit is contained in:
parent
cf2b3c3c0d
commit
b9863ed60d
7 changed files with 0 additions and 526 deletions
|
|
@ -1,27 +0,0 @@
|
|||
From 3e39d5b9944536a6f4d4f266b3c4961ad8da443e Mon Sep 17 00:00:00 2001
|
||||
From: Jiri <moskovcak@gmail.com>
|
||||
Date: Wed, 7 Dec 2011 10:34:27 +0100
|
||||
Subject: [PATCH 2/5] disabled reporting to kerneloops.org
|
||||
|
||||
- we get lot of complains about dead kerneloops.org and since it's
|
||||
not wihtin our power to fix it -> disable it!
|
||||
---
|
||||
src/plugins/koops_event.conf | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/src/plugins/koops_event.conf b/src/plugins/koops_event.conf
|
||||
index 3b80a1b..2fdccda 100644
|
||||
--- a/src/plugins/koops_event.conf
|
||||
+++ b/src/plugins/koops_event.conf
|
||||
@@ -10,7 +10,7 @@ EVENT=post-create analyzer=Kerneloops
|
||||
reporter-kerneloops
|
||||
|
||||
# report
|
||||
-EVENT=report_Kerneloops analyzer=Kerneloops
|
||||
+#EVENT=report_Kerneloops analyzer=Kerneloops
|
||||
reporter-kerneloops
|
||||
|
||||
EVENT=report_Bugzilla analyzer=Kerneloops
|
||||
--
|
||||
1.7.7.3
|
||||
|
||||
|
|
@ -1,90 +0,0 @@
|
|||
From c138894ba3f3e630d7e1af398fcd93ffa862659d Mon Sep 17 00:00:00 2001
|
||||
From: Denys Vlasenko <dvlasenk@redhat.com>
|
||||
Date: Wed, 7 Dec 2011 13:58:25 +0100
|
||||
Subject: [PATCH 3/5] abrtd: fix potential problem with exitcode check on
|
||||
"post-create"
|
||||
|
||||
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
||||
---
|
||||
src/daemon/abrtd.c | 53 ++++++++++++++++++++++++++-------------------------
|
||||
1 files changed, 27 insertions(+), 26 deletions(-)
|
||||
|
||||
diff --git a/src/daemon/abrtd.c b/src/daemon/abrtd.c
|
||||
index d3a759a..743e40f 100644
|
||||
--- a/src/daemon/abrtd.c
|
||||
+++ b/src/daemon/abrtd.c
|
||||
@@ -313,9 +313,10 @@ static mw_result_t run_post_create_and_load_data(const char *dump_dir_name, prob
|
||||
/* Prevent having zombie child process */
|
||||
int status;
|
||||
safe_waitpid(child, &status, 0);
|
||||
- status = WEXITSTATUS(status);
|
||||
+ /* status = WEXITSTATUS(status); - wrong, we need to check WIFEXITED too */
|
||||
|
||||
- /* exit 0 means, this is a good, non-dup dir */
|
||||
+ /* exit 0 means "this is a good, non-dup dir" */
|
||||
+ /* exit with 1 + "DUP_OF_DIR: dir" string => dup */
|
||||
if (status != 0)
|
||||
{
|
||||
if (!dup_of_dir)
|
||||
@@ -330,34 +331,34 @@ static mw_result_t run_post_create_and_load_data(const char *dump_dir_name, prob
|
||||
* else: MW_ERROR
|
||||
*/
|
||||
mw_result_t res = MW_ERROR;
|
||||
+ struct dump_dir *dd = dd_opendir(dump_dir_name, /*flags:*/ 0);
|
||||
+ if (!dd)
|
||||
+ /* dd_opendir already emitted error msg */
|
||||
+ goto ret;
|
||||
+
|
||||
+ /* Reset mode/uig/gid to correct values for all files created by event run */
|
||||
+ dd_sanitize_mode_and_owner(dd);
|
||||
+
|
||||
+ /* Update count */
|
||||
+ char *count_str = dd_load_text_ext(dd, FILENAME_COUNT, DD_FAIL_QUIETLY_ENOENT);
|
||||
+ unsigned long count = strtoul(count_str, NULL, 10);
|
||||
+ count++;
|
||||
+ char new_count_str[sizeof(long)*3 + 2];
|
||||
+ sprintf(new_count_str, "%lu", count);
|
||||
+ dd_save_text(dd, FILENAME_COUNT, new_count_str);
|
||||
+ dd_close(dd);
|
||||
+
|
||||
+ *problem_data = load_problem_data(dump_dir_name);
|
||||
+ if (*problem_data != NULL)
|
||||
{
|
||||
- struct dump_dir *dd = dd_opendir(dump_dir_name, /*flags:*/ 0);
|
||||
- if (!dd)
|
||||
- goto ret;
|
||||
-
|
||||
- /* Reset mode/uig/gid to correct values for all files created by event run */
|
||||
- dd_sanitize_mode_and_owner(dd);
|
||||
-
|
||||
- /* Update count */
|
||||
- char *count_str = dd_load_text_ext(dd, FILENAME_COUNT, DD_FAIL_QUIETLY_ENOENT);
|
||||
- unsigned long count = strtoul(count_str, NULL, 10);
|
||||
- count++;
|
||||
- char new_count_str[sizeof(long)*3 + 2];
|
||||
- sprintf(new_count_str, "%lu", count);
|
||||
- dd_save_text(dd, FILENAME_COUNT, new_count_str);
|
||||
- dd_close(dd);
|
||||
-
|
||||
- *problem_data = load_problem_data(dump_dir_name);
|
||||
- if (*problem_data != NULL)
|
||||
+ res = MW_OK;
|
||||
+ if (count > 1)
|
||||
{
|
||||
- res = MW_OK;
|
||||
- if (count > 1)
|
||||
- {
|
||||
- log("Problem directory is a duplicate of %s", dump_dir_name);
|
||||
- res = MW_OCCURRED;
|
||||
- }
|
||||
+ log("Problem directory is a duplicate of %s", dump_dir_name);
|
||||
+ res = MW_OCCURRED;
|
||||
}
|
||||
}
|
||||
+ /* else: load_problem_data already emitted error msg */
|
||||
|
||||
ret:
|
||||
free(dup_of_dir);
|
||||
--
|
||||
1.7.7.3
|
||||
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
From 26a0f776d32d0d5be2e15abe781adf5a830c24cc Mon Sep 17 00:00:00 2001
|
||||
From: Denys Vlasenko <dvlasenk@redhat.com>
|
||||
Date: Wed, 7 Dec 2011 14:14:56 +0100
|
||||
Subject: [PATCH 4/5] abrtd: always explain why we delete "corrupted" dir.
|
||||
Closes rhbz#706131.
|
||||
|
||||
We were almost always explaining it, except for the case when
|
||||
'post-create' was failing silently.
|
||||
|
||||
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
||||
---
|
||||
src/daemon/abrtd.c | 12 +++++++++++-
|
||||
1 files changed, 11 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/src/daemon/abrtd.c b/src/daemon/abrtd.c
|
||||
index 743e40f..b5c3d4b 100644
|
||||
--- a/src/daemon/abrtd.c
|
||||
+++ b/src/daemon/abrtd.c
|
||||
@@ -313,14 +313,24 @@ static mw_result_t run_post_create_and_load_data(const char *dump_dir_name, prob
|
||||
/* Prevent having zombie child process */
|
||||
int status;
|
||||
safe_waitpid(child, &status, 0);
|
||||
- /* status = WEXITSTATUS(status); - wrong, we need to check WIFEXITED too */
|
||||
|
||||
/* exit 0 means "this is a good, non-dup dir" */
|
||||
/* exit with 1 + "DUP_OF_DIR: dir" string => dup */
|
||||
if (status != 0)
|
||||
{
|
||||
+ if (WIFSIGNALED(status))
|
||||
+ {
|
||||
+ log("'post-create' on '%s' killed by signal %d",
|
||||
+ dump_dir_name, WTERMSIG(status));
|
||||
+ return MW_ERROR;
|
||||
+ }
|
||||
+ /* else: it is WIFEXITED(status) */
|
||||
if (!dup_of_dir)
|
||||
+ {
|
||||
+ log("'post-create' on '%s' exited with %d",
|
||||
+ dump_dir_name, WEXITSTATUS(status));
|
||||
return MW_ERROR;
|
||||
+ }
|
||||
dump_dir_name = dup_of_dir;
|
||||
}
|
||||
|
||||
--
|
||||
1.7.7.3
|
||||
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
From 2e941ae3c1d13968bda8bb4594a5aa566aa2e5dd Mon Sep 17 00:00:00 2001
|
||||
From: Jiri Moskovcak <jmoskovc@redhat.com>
|
||||
Date: Wed, 7 Dec 2011 16:12:28 +0100
|
||||
Subject: [PATCH 5/5] more glib2.31 fixes
|
||||
|
||||
---
|
||||
src/daemon/abrtd.c | 17 +++++++++++++----
|
||||
1 files changed, 13 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/daemon/abrtd.c b/src/daemon/abrtd.c
|
||||
index d3a759a..3d71e80 100644
|
||||
--- a/src/daemon/abrtd.c
|
||||
+++ b/src/daemon/abrtd.c
|
||||
@@ -238,7 +238,7 @@ static gboolean handle_signal_cb(GIOChannel *gio, GIOCondition condition, gpoint
|
||||
{
|
||||
uint8_t signo;
|
||||
gsize len = 0;
|
||||
- g_io_channel_read(gio, (void*) &signo, 1, &len);
|
||||
+ g_io_channel_read_chars(gio, (void*) &signo, 1, &len, NULL);
|
||||
if (len == 1)
|
||||
{
|
||||
/* we did receive a signal */
|
||||
@@ -382,10 +382,19 @@ static gboolean handle_inotify_cb(GIOChannel *gio, GIOCondition condition, gpoin
|
||||
char *buf = (char*)xmalloc(inotify_bytes);
|
||||
errno = 0;
|
||||
gsize len;
|
||||
- GIOError err = g_io_channel_read(gio, buf, inotify_bytes, &len);
|
||||
- if (err != G_IO_ERROR_NONE)
|
||||
+ GError *gerror = NULL;
|
||||
+ g_io_channel_set_encoding(gio, NULL, &gerror);
|
||||
+ /* need to set the encoding otherwise we get:
|
||||
+ * Invalid byte sequence in conversion input
|
||||
+ * according to manual "NULL" is safe for binary data
|
||||
+ */
|
||||
+ if (gerror)
|
||||
+ perror_msg("Can't set encoding on gio channel: '%s'", gerror->message);
|
||||
+
|
||||
+ GIOStatus err = g_io_channel_read_chars(gio, buf, inotify_bytes, &len, &gerror);
|
||||
+ if (err != G_IO_STATUS_NORMAL)
|
||||
{
|
||||
- perror_msg("Error reading inotify fd");
|
||||
+ perror_msg("Error reading inotify fd: %s", gerror ? gerror->message : "unknown");
|
||||
free(buf);
|
||||
return FALSE; /* "remove this event" (huh??) */
|
||||
}
|
||||
--
|
||||
1.7.7.3
|
||||
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
From 7b937c6322c3130d9801596b93866a5e72a6da64 Mon Sep 17 00:00:00 2001
|
||||
From: Jiri Moskovcak <jmoskovc@redhat.com>
|
||||
Date: Wed, 7 Dec 2011 16:29:03 +0100
|
||||
Subject: [PATCH 6/6] missed one more deprecated g_io_channel_read
|
||||
|
||||
---
|
||||
src/daemon/abrt-dbus.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/src/daemon/abrt-dbus.c b/src/daemon/abrt-dbus.c
|
||||
index 756076a..16c01d0 100644
|
||||
--- a/src/daemon/abrt-dbus.c
|
||||
+++ b/src/daemon/abrt-dbus.c
|
||||
@@ -284,7 +284,7 @@ static gboolean handle_signal_cb(GIOChannel *gio, GIOCondition condition, gpoint
|
||||
{
|
||||
uint8_t signo;
|
||||
gsize len = 0;
|
||||
- g_io_channel_read(gio, (void*) &signo, 1, &len);
|
||||
+ g_io_channel_read_chars(gio, (void*) &signo, 1, &len, NULL);
|
||||
if (len == 1)
|
||||
{
|
||||
/* we did receive a signal */
|
||||
--
|
||||
1.7.7.3
|
||||
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
From 8f6d5316e9d1555f8b33aeef97053f04d3903759 Mon Sep 17 00:00:00 2001
|
||||
From: Denys Vlasenko <dvlasenk@redhat.com>
|
||||
Date: Wed, 7 Dec 2011 18:08:06 +0100
|
||||
Subject: [PATCH 7/8] abrt-action-install-debuginfo: do not use scientific
|
||||
notation for sizes
|
||||
|
||||
"Downloading 5.1e+02Mb, installed size: 2.1e+03Mb" looks weird...
|
||||
|
||||
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
||||
---
|
||||
src/plugins/abrt-action-install-debuginfo.in | 6 +++---
|
||||
1 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/plugins/abrt-action-install-debuginfo.in b/src/plugins/abrt-action-install-debuginfo.in
|
||||
index f6d0001..7c19331 100644
|
||||
--- a/src/plugins/abrt-action-install-debuginfo.in
|
||||
+++ b/src/plugins/abrt-action-install-debuginfo.in
|
||||
@@ -288,9 +288,9 @@ class DebugInfoDownload(YumBase):
|
||||
print _("Can't find packages for {0} debuginfo files").format(len(not_found))
|
||||
if verbose != 0 or total_pkgs != 0:
|
||||
print _("Packages to download: {0}").format(total_pkgs)
|
||||
- question = _("Downloading {0:.2}Mb, installed size: {1:.2}Mb. Continue?").format(
|
||||
- todownload_size / (1024**2),
|
||||
- installed_size / (1024**2)
|
||||
+ question = _("Downloading {0:.2f}Mb, installed size: {1:.2f}Mb. Continue?").format(
|
||||
+ todownload_size / (1024*1024),
|
||||
+ installed_size / (1024*1024)
|
||||
)
|
||||
if noninteractive == False and not reportclient.ask_yes_no(question):
|
||||
print _("Download cancelled by user")
|
||||
--
|
||||
1.7.7.3
|
||||
|
||||
|
|
@ -1,256 +0,0 @@
|
|||
From 383a8c804e0a492e8261309bbd0e9d3502ec6604 Mon Sep 17 00:00:00 2001
|
||||
From: Denys Vlasenko <dvlasenk@redhat.com>
|
||||
Date: Wed, 7 Dec 2011 23:14:46 +0100
|
||||
Subject: [PATCH 8/8] abrt-cli: add man page. Closes rhbz#747624
|
||||
|
||||
This also regularizes help text a bit, and trims code
|
||||
by about 150 bytes
|
||||
|
||||
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
||||
---
|
||||
abrt.spec.in | 3 +--
|
||||
doc/Makefile.am | 1 +
|
||||
doc/abrt-cli.txt | 31 +++++++++++++++++++++++++++++++
|
||||
src/cli/abrt-cli.c | 10 +++++-----
|
||||
src/cli/list.c | 19 ++++++++++---------
|
||||
src/cli/report.c | 16 +++++++---------
|
||||
src/cli/rm.c | 10 +++++++---
|
||||
7 files changed, 62 insertions(+), 28 deletions(-)
|
||||
create mode 100644 doc/abrt-cli.txt
|
||||
|
||||
diff --git a/abrt.spec.in b/abrt.spec.in
|
||||
index a5e78a1..7847ac0 100644
|
||||
--- a/abrt.spec.in
|
||||
+++ b/abrt.spec.in
|
||||
@@ -497,8 +497,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||
%files cli
|
||||
%defattr(-,root,root,-)
|
||||
%{_bindir}/abrt-cli
|
||||
-# provide asap
|
||||
-#% {_mandir}/man1/report-cli.1.gz
|
||||
+%{_mandir}/man1/abrt-cli.1.gz
|
||||
|
||||
%files desktop
|
||||
%defattr(-,root,root,-)
|
||||
diff --git a/doc/Makefile.am b/doc/Makefile.am
|
||||
index 65a8142..5025f93 100644
|
||||
--- a/doc/Makefile.am
|
||||
+++ b/doc/Makefile.am
|
||||
@@ -11,6 +11,7 @@ MAN1_TXT += abrt-action-list-dsos.txt
|
||||
MAN1_TXT += abrt-retrace-client.txt
|
||||
MAN1_TXT += abrt-handle-upload.txt
|
||||
MAN1_TXT += abrt-server.txt
|
||||
+MAN1_TXT += abrt-cli.txt
|
||||
MAN1_TXT += abrt-action-save-package-data.txt
|
||||
MAN1_TXT += abrt-install-ccpp-hook.txt
|
||||
|
||||
diff --git a/doc/abrt-cli.txt b/doc/abrt-cli.txt
|
||||
new file mode 100644
|
||||
index 0000000..9680ad6
|
||||
--- /dev/null
|
||||
+++ b/doc/abrt-cli.txt
|
||||
@@ -0,0 +1,31 @@
|
||||
+abrt-cli(1)
|
||||
+===========
|
||||
+
|
||||
+NAME
|
||||
+----
|
||||
+abrt-cli - List, remove, print, analyze, report problems
|
||||
+
|
||||
+SYNOPSIS
|
||||
+--------
|
||||
+'abrt-cli' list [-vdf] [DIR]...
|
||||
+
|
||||
+'abrt-cli' rm [-v] DIR...
|
||||
+
|
||||
+'abrt-cli' report [-v] DIR...
|
||||
+
|
||||
+'abrt-cli' info [-vd] DIR...
|
||||
+
|
||||
+OPTIONS
|
||||
+-------
|
||||
+-v,--verbose::
|
||||
+ Be more verbose. Can be given multiple times.
|
||||
+
|
||||
+-d,--detailed::
|
||||
+ Show detailed report
|
||||
+
|
||||
+-f,--full::
|
||||
+ List even reported problems
|
||||
+
|
||||
+AUTHORS
|
||||
+-------
|
||||
+* ABRT team
|
||||
diff --git a/src/cli/abrt-cli.c b/src/cli/abrt-cli.c
|
||||
index 2ea5276..fdd3173 100644
|
||||
--- a/src/cli/abrt-cli.c
|
||||
+++ b/src/cli/abrt-cli.c
|
||||
@@ -138,14 +138,14 @@ int main(int argc, const char **argv)
|
||||
argc--;
|
||||
|
||||
const char *abrt_cli_usage_string = _(
|
||||
- "Usage: abrt-cli [--version] COMMAND [ARGS]"
|
||||
+ "Usage: abrt-cli [--version] COMMAND [DIR]..."
|
||||
);
|
||||
|
||||
const struct cmd_struct commands[] = {
|
||||
- {"list", cmd_list, _("List not yet reported problems")},
|
||||
- {"rm", cmd_rm, _("Remove files from problem directory")},
|
||||
- {"report", cmd_report, _("Analyze and report problem data in problem directory")},
|
||||
- {"info", cmd_info, _("Print information about DUMP_DIR")},
|
||||
+ {"list", cmd_list, _("List not yet reported problems [in DIRs]")},
|
||||
+ {"rm", cmd_rm, _("Remove problem directory DIR")},
|
||||
+ {"report", cmd_report, _("Analyze and report problem data in DIR")},
|
||||
+ {"info", cmd_info, _("Print information about DIR")},
|
||||
{NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
diff --git a/src/cli/list.c b/src/cli/list.c
|
||||
index a9b700c..565a36f 100644
|
||||
--- a/src/cli/list.c
|
||||
+++ b/src/cli/list.c
|
||||
@@ -87,7 +87,7 @@ static void print_crash_list(vector_of_problem_data_t *crash_list, int include_r
|
||||
int cmd_list(int argc, const char **argv)
|
||||
{
|
||||
const char *program_usage_string = _(
|
||||
- "& list [options] [<dump-dir>]..."
|
||||
+ "& list [options] [DIR]..."
|
||||
);
|
||||
|
||||
static int opt_full, opt_detailed;
|
||||
@@ -101,11 +101,11 @@ int cmd_list(int argc, const char **argv)
|
||||
};
|
||||
|
||||
parse_opts(argc, (char **)argv, program_options, program_usage_string);
|
||||
+ argv += optind;
|
||||
|
||||
GList *D_list = NULL;
|
||||
- if (optind < argc)
|
||||
- while (optind < argc)
|
||||
- D_list = g_list_append(D_list, xstrdup(argv[optind++]));
|
||||
+ while (*argv)
|
||||
+ D_list = g_list_append(D_list, xstrdup(*argv++));
|
||||
if (!D_list)
|
||||
{
|
||||
load_abrt_conf();
|
||||
@@ -130,7 +130,7 @@ int cmd_list(int argc, const char **argv)
|
||||
int cmd_info(int argc, const char **argv)
|
||||
{
|
||||
const char *program_usage_string = _(
|
||||
- "& info [options] [<dump-dir>]..."
|
||||
+ "& info [options] DIR..."
|
||||
);
|
||||
|
||||
static int opt_detailed;
|
||||
@@ -143,14 +143,15 @@ int cmd_info(int argc, const char **argv)
|
||||
};
|
||||
|
||||
parse_opts(argc, (char **)argv, program_options, program_usage_string);
|
||||
+ argv += optind;
|
||||
|
||||
- if (optind == argc)
|
||||
+ if (!argv[0])
|
||||
show_usage_and_die(program_usage_string, program_options);
|
||||
|
||||
int errs = 0;
|
||||
- while (argv[optind])
|
||||
+ while (*argv)
|
||||
{
|
||||
- const char *dump_dir = argv[optind++];
|
||||
+ const char *dump_dir = *argv++;
|
||||
problem_data_t *problem = fill_crash_info(dump_dir);
|
||||
if (!problem)
|
||||
{
|
||||
@@ -161,7 +162,7 @@ int cmd_info(int argc, const char **argv)
|
||||
|
||||
print_crash(problem, opt_detailed);
|
||||
free_problem_data(problem);
|
||||
- if (optind - argc)
|
||||
+ if (*argv)
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
diff --git a/src/cli/report.c b/src/cli/report.c
|
||||
index 1e6c5ce..e20bb96 100644
|
||||
--- a/src/cli/report.c
|
||||
+++ b/src/cli/report.c
|
||||
@@ -25,7 +25,7 @@
|
||||
int cmd_report(int argc, const char **argv)
|
||||
{
|
||||
const char *program_usage_string = _(
|
||||
- "& report [options] [<dump-dir>]..."
|
||||
+ "& report [options] DIR..."
|
||||
);
|
||||
|
||||
struct options program_options[] = {
|
||||
@@ -34,6 +34,10 @@ int cmd_report(int argc, const char **argv)
|
||||
};
|
||||
|
||||
parse_opts(argc, (char **)argv, program_options, program_usage_string);
|
||||
+ argv += optind;
|
||||
+
|
||||
+ if (!argv[0])
|
||||
+ show_usage_and_die(program_usage_string, program_options);
|
||||
|
||||
load_abrt_conf();
|
||||
char *home = getenv("HOME");
|
||||
@@ -43,12 +47,9 @@ int cmd_report(int argc, const char **argv)
|
||||
D_list = g_list_append(D_list, xstrdup(g_settings_dump_location));
|
||||
free_abrt_conf_data();
|
||||
|
||||
- if (!argv[optind])
|
||||
- show_usage_and_die(program_usage_string, program_options);
|
||||
-
|
||||
- while (1)
|
||||
+ while (*argv)
|
||||
{
|
||||
- const char *dir_name = argv[optind++];
|
||||
+ const char *dir_name = *argv++;
|
||||
|
||||
vector_of_problem_data_t *ci = NULL;
|
||||
if (*dir_name == '@')
|
||||
@@ -73,9 +74,6 @@ int cmd_report(int argc, const char **argv)
|
||||
free_vector_of_problem_data(ci);
|
||||
if (status)
|
||||
exit(status);
|
||||
-
|
||||
- if (!argv[optind])
|
||||
- break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
diff --git a/src/cli/rm.c b/src/cli/rm.c
|
||||
index 4a95d93..8f185a4 100644
|
||||
--- a/src/cli/rm.c
|
||||
+++ b/src/cli/rm.c
|
||||
@@ -28,7 +28,7 @@
|
||||
int cmd_rm(int argc, const char **argv)
|
||||
{
|
||||
const char *program_usage_string = _(
|
||||
- "& rm [options] [<dump-dir>]..."
|
||||
+ "& rm [options] DIR..."
|
||||
);
|
||||
|
||||
struct options program_options[] = {
|
||||
@@ -37,12 +37,16 @@ int cmd_rm(int argc, const char **argv)
|
||||
};
|
||||
|
||||
parse_opts(argc, (char **)argv, program_options, program_usage_string);
|
||||
+ argv += optind;
|
||||
+
|
||||
+ if (!argv[0])
|
||||
+ show_usage_and_die(program_usage_string, program_options);
|
||||
|
||||
int errs = 0;
|
||||
- while (argv[optind])
|
||||
+ while (*argv)
|
||||
{
|
||||
int status;
|
||||
- const char *rm_dir = argv[optind++];
|
||||
+ const char *rm_dir = *argv++;
|
||||
status = delete_dump_dir_possibly_using_abrtd(rm_dir);
|
||||
if (!status)
|
||||
log("rm '%s'", rm_dir);
|
||||
--
|
||||
1.7.7.3
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue