#!/bin/ash
+#
+# SPDX-License-Identifier: GPL-3.0-or-later
# args: source, newroot, mountpoint
_mnt_dmsnapshot() {
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
# shellcheck disable=SC2154
# defined via initcpio's parse_cmdline()
[ -z "${archisodevice}" ] && archisodevice="/dev/disk/by-label/${archisolabel}"
- [ -z "${cow_spacesize}" ] && cow_spacesize="256M"
+ #[ -z "${cow_spacesize}" ] && cow_spacesize="256M"
+ [ -z "${cow_spacesize}" ] && cow_spacesize="%COWSPACE%"
# shellcheck disable=SC2154
# defined via initcpio's parse_cmdline()
if [ -n "${cow_label}" ]; then