OSDN Git Service

archiso/initcpio/hooks/archiso: remove option terminator from the blockdev command
authornl6720 <nl6720@gmail.com>
Sun, 2 Aug 2020 12:37:30 +0000 (15:37 +0300)
committernl6720 <nl6720@gmail.com>
Tue, 11 Aug 2020 03:58:06 +0000 (06:58 +0300)
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

index a12c260..716c69e 100644 (file)
@@ -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