Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ed789309 authored by Steve Fung's avatar Steve Fung
Browse files

crash_reporter: Add model_manifest_id field to report

Add the model_manifest_id from weave's configuration to the
crash report.

Bug: 22874192
Change-Id: I26d5334a6eb3b82fd07338e98ce0f3efbb2ff16d
parent c372a778
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -79,6 +79,9 @@ SECONDS_SEND_SPREAD=${SECONDS_SEND_SPREAD:-600}
# Set this to 1 to allow uploading of device coredumps.
DEVCOREDUMP_UPLOAD_FLAG_FILE="${CRASH_STATE_DIR}/device_coredump_upload_allowed"

# The weave configuration file.
WEAVE_CONF_FILE="/etc/weaved/weaved.conf"

# The syslog tag for all logging we emit.
TAG="$(basename $0)[$$]"

@@ -288,6 +291,7 @@ send_crash() {
  local version="$(get_key_value "${meta_path}" "upload_var_ver")"
  local upload_prefix="$(get_key_value "${meta_path}" "upload_prefix")"
  local guid
  local model_manifest_id="$(get_key_value "${WEAVE_CONF_FILE}" "model_id")"

  set -- \
    -F "write_payload_size=${write_payload_size}" \
@@ -441,6 +445,7 @@ send_crash() {
    -F "ver=${version}" \
    -F "hwclass=${hwclass}" \
    -F "exec_name=${exec_name}" \
    -F "model_manifest_id=${model_manifest_id}" \
    ${image_type:+-F "image_type=${image_type}"} \
    ${boot_mode:+-F "boot_mode=${boot_mode}"} \
    ${error_type:+-F "error_type=${error_type}"} \