File: test-run-qemu-include-in-ARGS-array.patch

package info (click to toggle)
dracut 109-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,592 kB
  • sloc: sh: 24,498; ansic: 5,234; makefile: 346; perl: 186; python: 48; javascript: 19
file content (35 lines) | stat: -rw-r--r-- 1,064 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
From: Benjamin Drung <benjamin.drung@canonical.com>
Date: Wed, 19 Nov 2025 04:20:39 +0100
Subject: test(run-qemu): include $@ in ARGS array

To simplify the code and as preparation for the following commit,
include `$@` in the `ARGS` array.

Forwarded: https://github.com/dracut-ng/dracut-ng/pull/1860
---
 test/run-qemu | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/test/run-qemu b/test/run-qemu
index cc1fab6..4af8275 100755
--- a/test/run-qemu
+++ b/test/run-qemu
@@ -116,13 +116,15 @@ if [[ $ARCH != "s390x" ]]; then
     ARGS+=(-device i6300esb)
 fi
 
+ARGS+=("$@")
+
 # only set -kernel if -initrd is specified
-initrd=$(get_initrd "$@")
+initrd=$(get_initrd "${ARGS[@]}")
 if [[ -n $initrd ]]; then
     KVERSION=$(lsinitrd "$initrd" | grep modules.dep | head -1 | rev | cut -d'/' -f2 | rev)
     set_vmlinux_env
     ARGS+=(-kernel "$VMLINUZ")
 fi
 
-echo "${0##*/}: $BIN $(quote_args "${ARGS[@]}") $(quote_args "$@")"
-exec "$BIN" "${ARGS[@]}" "$@"
+echo "${0##*/}: $BIN $(quote_args "${ARGS[@]}")"
+exec "$BIN" "${ARGS[@]}"