diff mbox series

[isar-cip-core] encrypt partition: Add support for swap partition

Message ID 20240613094845.1167459-1-Quirin.Gylstorff@siemens.com (mailing list archive)
State Accepted
Headers show
Series [isar-cip-core] encrypt partition: Add support for swap partition | expand

Commit Message

Gylstorff Quirin June 13, 2024, 9:47 a.m. UTC
From: Quirin Gylstorff <quirin.gylstorff@siemens.com>

This changes allows to encrypt a swap partitions.

Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
---
 .../initramfs-crypt-hook/files/encrypt_partition.script         | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jan Kiszka June 13, 2024, 4:45 p.m. UTC | #1
On 13.06.24 11:47, Quirin Gylstorff wrote:
> From: Quirin Gylstorff <quirin.gylstorff@siemens.com>
> 
> This changes allows to encrypt a swap partitions.
> 
> Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
> ---
>  .../initramfs-crypt-hook/files/encrypt_partition.script         | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.script b/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.script
> index d48db94..8fccb4c 100644
> --- a/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.script
> +++ b/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.script
> @@ -77,7 +77,7 @@ reencrypt_existing_partition() {
>  			panic "reencryption of filesystem $1 cannot continue!"
>  		fi
>  		;;
> -	squashfs|"")
> +	squashfs|swap|"")
>  		[ "$debug" = "y" ] && echo "skip disk resize as it is not supported or unnecessary for fstype: '$partition_fstype'"
>  		;;
>  	*)

While not formally a fix, this is trivial enough to still include it
after rc1 - applied, thanks.

Jan
diff mbox series

Patch

diff --git a/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.script b/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.script
index d48db94..8fccb4c 100644
--- a/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.script
+++ b/recipes-initramfs/initramfs-crypt-hook/files/encrypt_partition.script
@@ -77,7 +77,7 @@  reencrypt_existing_partition() {
 			panic "reencryption of filesystem $1 cannot continue!"
 		fi
 		;;
-	squashfs|"")
+	squashfs|swap|"")
 		[ "$debug" = "y" ] && echo "skip disk resize as it is not supported or unnecessary for fstype: '$partition_fstype'"
 		;;
 	*)