Apparently blockdev does not support it.
In an ISO made using '-s img' (Squashfs with dm-snapshot), it results in:
blockdev: Unknown command: --
ro_dev="$(losetup --find --show --read-only -- "${img}")"
echo "${ro_dev}" >> /run/archiso/used_block_devices
- ro_dev_size="$(blockdev --getsz -- "${ro_dev}")"
+ ro_dev_size="$(blockdev --getsz "${ro_dev}")"
if [ "${cow_persistent}" = "P" ]; then
if [ -f "/run/archiso/cowspace/${cow_directory}/${img_name}.cow" ]; then