On Tue 24 Mar 2020 03:46:07 PM CET, Eric Blake wrote: >> -$QEMU_IO -c 'discard 0k 64k' "$TEST_IMG" | _filter_qemu_io >> +poke_file "$TEST_IMG" '262144' "\x00\x00\x00\x00\x00\x00\x00\x00" # 0x40000 >> - L2 entry >> +poke_file "$TEST_IMG" '131082' "\x00\x00" # 0x2000a - Refcount entry > > Instead of writing '262144' ... # 0x40000, you could write > $((0x40000)) in-place. Similarly for 131082 vs. 0x2000a.
The exiting poke_file line in that test was using base 10 so I decided to use it too for consistency. I actually realized that $rb_offset and $l2_offset are defined, so I could use those too. > Also, Max has pending patches for adding poke_file_be; if those land > first, this becomes simpler as: > > poke_file_be "$TEST_IMG" $((0x40000)) 8 0 # L2 entry > poke_file_be "$TEST_IMG" $((0x2000a)) 2 0 # Refcount entry I'm fine if those lines are changed when the patch is committed. Berto