feat: Add QMP configuration variables (#1360)

This commit is contained in:
Kroese
2026-08-09 11:24:49 +02:00
committed by GitHub
parent 8b6624cf2f
commit cb8f440564
2 changed files with 11 additions and 1 deletions
+2
View File
@@ -98,3 +98,5 @@ An empty default means the variable is unset and its value is determined automat
| `DEBUG` | `N` | Enables verbose debug output. |
| `TRACE` | `N` | Enables shell command tracing. |
| `HOST_DEBUG` | `N` | Enables debug output for the DSM host helper. |
| `MONITOR` | | QEMU monitor configuration. |
| `QMP` | | QEMU Machine Protocol configuration. |
+9 -1
View File
@@ -1,6 +1,9 @@
#!/usr/bin/env bash
set -Eeuo pipefail
: "${QMP:=""}"
: "${MONITOR:=""}"
DEF_OPTS="-nodefaults -boot strict=on"
DEV_OPTS=""
@@ -23,8 +26,13 @@ configureMemory() {
configureMonitor() {
MON_OPTS="-name $PROCESS,process=$PROCESS,debug-threads=on"
MON_OPTS=""
[ -n "$QMP" ] && MON_OPTS+=" -qmp $QMP"
[ -n "$MONITOR" ] && MON_OPTS+=" -monitor $MONITOR"
MON_OPTS+=" -name $PROCESS,process=$PROCESS,debug-threads=on"
MON_OPTS+=" -pidfile $QEMU_PID"
MON_OPTS="${MON_OPTS# }"
return 0
}