From 8e82bbbe4a239a529a3c7df3ae0664fc551e1213 Mon Sep 17 00:00:00 2001
From: nl6720 <nl6720@gmail.com>
Date: Sun, 2 Aug 2020 15:37:30 +0300
Subject: [PATCH] archiso/initcpio/hooks/archiso: remove option terminator from
 the blockdev command

Apparently blockdev does not support it.
In an ISO made using '-s img' (Squashfs with dm-snapshot), it results in:

    blockdev: Unknown command: --
---
 archiso/initcpio/hooks/archiso | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/archiso/initcpio/hooks/archiso b/archiso/initcpio/hooks/archiso
index a12c2601..716c69e6 100644
--- a/archiso/initcpio/hooks/archiso
+++ b/archiso/initcpio/hooks/archiso
@@ -14,7 +14,7 @@ _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
-- 
GitLab