Skip to content

Commit 3ba9912

Browse files
authored
Merge pull request #4294 from leidwang/issue3461
fwcfg: update command to make it more accurate and general
2 parents f3ad7bd + a0e61df commit 3ba9912

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

qemu/tests/cfg/fwcfg.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
vmcoreinfo = yes
77
start_vm = no
88
tmp_dir = "/var/tmp"
9-
get_avail_disk = df -h /home | grep home | awk -F "G" '{print $3}'
9+
get_avail_disk = df -BG /home | awk 'NR==2 {print $4}' | sed 's/G//'
1010
unzip_cmd = 'powershell -command "Expand-Archive %s:\Memory.dmp.zip %s:"'
1111
unzip_timeout = 1800
1212
dump_file = Memory.dmp

qemu/tests/cfg/fwcfg_enable.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
start_vm = no
1010
setup_verifier = no
1111
tmp_dir = "/home/tmp"
12-
get_avail_disk = df -h /home | grep home | awk -F "G" '{print $3}'
12+
get_avail_disk = df -BG /home | awk 'NR==2 {print $4}' | sed 's/G//'
1313
unzip_cmd = 'powershell -command "Expand-Archive %s:\Memory.dmp.zip %s:"'
1414
unzip_timeout = 1800
1515
dump_file = Memory.dmp

qemu/tests/cfg/win_virtio_driver_update_test.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@
288288
device_name = "QEMU FwCfg Device"
289289
device_hwid = '"ACPI\VEN_QEMU&DEV_0002"'
290290
tmp_dir = "/home/tmp"
291-
get_avail_disk = df -h /home | grep home | awk -F "G" '{print $3}'
291+
get_avail_disk = df -BG /home | awk 'NR==2 {print $4}' | sed 's/G//'
292292
unzip_cmd = 'powershell -command "Expand-Archive %s:\Memory.dmp.zip %s:"'
293293
unzip_timeout = 1800
294294
dump_file = Memory.dmp

0 commit comments

Comments
 (0)