mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-24 21:34:08 +03:00
coredump: rename COREDUMP_PKGMETA_ fields to COREDUMP_PACKAGE_
Follow-up for c546154a44
This commit is contained in:
parent
f216e74841
commit
671769c932
@ -353,9 +353,9 @@ flags: ...
|
|||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>COREDUMP_PKGMETA_PACKAGE=</varname></term>
|
<term><varname>COREDUMP_PACKAGE_NAME=</varname></term>
|
||||||
<term><varname>COREDUMP_PKGMETA_PACKAGEVERSION=</varname></term>
|
<term><varname>COREDUMP_PACKAGE_VERSION=</varname></term>
|
||||||
<term><varname>COREDUMP_PKGMETA_JSON=</varname></term>
|
<term><varname>COREDUMP_PACKAGE_JSON=</varname></term>
|
||||||
|
|
||||||
<listitem><para>If the executable contained .package metadata ELF notes, they will be
|
<listitem><para>If the executable contained .package metadata ELF notes, they will be
|
||||||
parsed and attached. The <varname>package</varname> and <varname>packageVersion</varname>
|
parsed and attached. The <varname>package</varname> and <varname>packageVersion</varname>
|
||||||
|
@ -792,7 +792,7 @@ log:
|
|||||||
if (r < 0)
|
if (r < 0)
|
||||||
return log_error_errno(r, "Failed to format JSON package metadata: %m");
|
return log_error_errno(r, "Failed to format JSON package metadata: %m");
|
||||||
|
|
||||||
(void) iovw_put_string_field(iovw, "COREDUMP_PKGMETA_JSON=", formatted_json);
|
(void) iovw_put_string_field(iovw, "COREDUMP_PACKAGE_JSON=", formatted_json);
|
||||||
}
|
}
|
||||||
|
|
||||||
JSON_VARIANT_OBJECT_FOREACH(module_name, module_json, json_metadata) {
|
JSON_VARIANT_OBJECT_FOREACH(module_name, module_json, json_metadata) {
|
||||||
@ -822,7 +822,6 @@ log:
|
|||||||
w = json_variant_by_index(_state2.variant, _state2.idx + 1); \
|
w = json_variant_by_index(_state2.variant, _state2.idx + 1); \
|
||||||
true; }); \
|
true; }); \
|
||||||
_state2.idx += 2) {
|
_state2.idx += 2) {
|
||||||
_cleanup_free_ char *metadata_id = NULL, *key_upper = NULL;
|
|
||||||
|
|
||||||
if (!json_variant_is_string(w))
|
if (!json_variant_is_string(w))
|
||||||
continue;
|
continue;
|
||||||
@ -830,17 +829,9 @@ log:
|
|||||||
if (!STR_IN_SET(key, "package", "packageVersion"))
|
if (!STR_IN_SET(key, "package", "packageVersion"))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* Journal metadata field names need to be upper case */
|
(void) iovw_put_string_field(iovw,
|
||||||
key_upper = strdup(key);
|
streq(key, "package") ? "COREDUMP_PACKAGE_NAME=" : "COREDUMP_PACKAGE_VERSION=",
|
||||||
if (!key_upper)
|
json_variant_string(w));
|
||||||
return log_oom();
|
|
||||||
key_upper = ascii_strupper(key_upper);
|
|
||||||
|
|
||||||
metadata_id = strjoin("COREDUMP_PKGMETA_", key_upper, "=");
|
|
||||||
if (!metadata_id)
|
|
||||||
return log_oom();
|
|
||||||
|
|
||||||
(void) iovw_put_string_field(iovw, metadata_id, json_variant_string(w));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -575,9 +575,9 @@ static int print_info(FILE *file, sd_journal *j, bool need_space) {
|
|||||||
RETRIEVE(d, l, "COREDUMP_FILENAME", filename);
|
RETRIEVE(d, l, "COREDUMP_FILENAME", filename);
|
||||||
RETRIEVE(d, l, "COREDUMP_TRUNCATED", truncated);
|
RETRIEVE(d, l, "COREDUMP_TRUNCATED", truncated);
|
||||||
RETRIEVE(d, l, "COREDUMP", coredump);
|
RETRIEVE(d, l, "COREDUMP", coredump);
|
||||||
RETRIEVE(d, l, "COREDUMP_PKGMETA_PACKAGE", pkgmeta_name);
|
RETRIEVE(d, l, "COREDUMP_PACKAGE_NAME", pkgmeta_name);
|
||||||
RETRIEVE(d, l, "COREDUMP_PKGMETA_PACKAGEVERSION", pkgmeta_version);
|
RETRIEVE(d, l, "COREDUMP_PACKAGE_VERSION", pkgmeta_version);
|
||||||
RETRIEVE(d, l, "COREDUMP_PKGMETA_JSON", pkgmeta_json);
|
RETRIEVE(d, l, "COREDUMP_PACKAGE_JSON", pkgmeta_json);
|
||||||
RETRIEVE(d, l, "_BOOT_ID", boot_id);
|
RETRIEVE(d, l, "_BOOT_ID", boot_id);
|
||||||
RETRIEVE(d, l, "_MACHINE_ID", machine_id);
|
RETRIEVE(d, l, "_MACHINE_ID", machine_id);
|
||||||
RETRIEVE(d, l, "MESSAGE", message);
|
RETRIEVE(d, l, "MESSAGE", message);
|
||||||
|
Loading…
Reference in New Issue
Block a user