summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/coredump/coredump.c2
-rw-r--r--src/coredump/coredumpctl.c8
2 files changed, 6 insertions, 4 deletions
diff --git a/src/coredump/coredump.c b/src/coredump/coredump.c
index 270af630cf..190ffc631e 100644
--- a/src/coredump/coredump.c
+++ b/src/coredump/coredump.c
@@ -795,7 +795,7 @@ log:
IOVEC_SET_STRING(iovec[n_iovec++], core_message);
if (truncated)
- IOVEC_SET_STRING(iovec[n_iovec++], "COREDUMP_TRUNCATED=yes");
+ IOVEC_SET_STRING(iovec[n_iovec++], "COREDUMP_TRUNCATED=1");
/* Optionally store the entire coredump in the journal */
if (arg_storage == COREDUMP_STORAGE_JOURNAL) {
diff --git a/src/coredump/coredumpctl.c b/src/coredump/coredumpctl.c
index 3e9a00bbcf..bffb3d458f 100644
--- a/src/coredump/coredumpctl.c
+++ b/src/coredump/coredumpctl.c
@@ -414,7 +414,7 @@ static int print_list(FILE* file, sd_journal *j, int had_legend) {
else
present = "-";
- if (STR_IN_SET(present, "present", "journal") && streq_ptr(truncated, "yes"))
+ if (STR_IN_SET(present, "present", "journal") && truncated && parse_boolean(truncated) > 0)
present = "truncated";
fprintf(file, "%-*s %*s %*s %*s %*s %-*s %s\n",
@@ -583,8 +583,10 @@ static int print_info(FILE *file, sd_journal *j, bool need_space) {
fprintf(file, " Hostname: %s\n", hostname);
if (filename) {
- bool inacc = access(filename, R_OK) < 0;
- bool trunc = streq_ptr(truncated, "yes");
+ bool inacc, trunc;
+
+ inacc = access(filename, R_OK) < 0;
+ trunc = truncated && parse_boolean(truncated) > 0;
if (inacc || trunc)
fprintf(file, " Storage: %s%s (%s%s%s)%s\n",