chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
journald: bring max coredump size in sync with max entry size
[elogind.git]
/
src
/
journal
/
coredumpctl.c
diff --git
a/src/journal/coredumpctl.c
b/src/journal/coredumpctl.c
index b6e558186d812111cdaca948aeb91449e84c0cd2..99ca26932799d41ab54d389d7e4d22045bcd0d8d 100644
(file)
--- a/
src/journal/coredumpctl.c
+++ b/
src/journal/coredumpctl.c
@@
-34,6
+34,7
@@
#include "log.h"
#include "path-util.h"
#include "pager.h"
#include "log.h"
#include "path-util.h"
#include "pager.h"
+#include "macro.h"
static enum {
ACTION_NONE,
static enum {
ACTION_NONE,
@@
-42,7
+43,6
@@
static enum {
ACTION_GDB,
} arg_action = ACTION_LIST;
ACTION_GDB,
} arg_action = ACTION_LIST;
-static Set *matches = NULL;
static FILE* output = NULL;
static char* field = NULL;
static FILE* output = NULL;
static char* field = NULL;
@@
-139,7
+139,7
@@
fail:
return r;
}
return r;
}
-static int parse_argv(int argc, char *argv[]) {
+static int parse_argv(int argc, char *argv[]
, Set *matches
) {
enum {
ARG_VERSION = 0x100,
ARG_NO_PAGER,
enum {
ARG_VERSION = 0x100,
ARG_NO_PAGER,
@@
-519,10
+519,11
@@
finish:
}
int main(int argc, char *argv[]) {
}
int main(int argc, char *argv[]) {
- sd_journal *j = NULL;
+ sd_journal
_cleanup_journal_close_
*j = NULL;
const char* match;
Iterator it;
int r = 0;
const char* match;
Iterator it;
int r = 0;
+ Set _cleanup_set_free_free_ *matches = NULL;
setlocale(LC_ALL, "");
log_parse_environment();
setlocale(LC_ALL, "");
log_parse_environment();
@@
-534,7
+535,7
@@
int main(int argc, char *argv[]) {
goto end;
}
goto end;
}
- r = parse_argv(argc, argv);
+ r = parse_argv(argc, argv
, matches
);
if (r < 0)
goto end;
if (r < 0)
goto end;
@@
-560,7
+561,7
@@
int main(int argc, char *argv[]) {
case ACTION_LIST:
if (!arg_no_pager)
case ACTION_LIST:
if (!arg_no_pager)
- pager_open();
+ pager_open(
false
);
r = dump_list(j);
break;
r = dump_list(j);
break;
@@
-578,11
+579,6
@@
int main(int argc, char *argv[]) {
}
end:
}
end:
- if (j)
- sd_journal_close(j);
-
- set_free_free(matches);
-
pager_close();
if (output)
pager_close();
if (output)