Bug#726293: Cleanup: remove unused parameter of crypto_wipe_device()
Package: partman-crypto
Version: 63
Severity: minor
Tags: d-i patch
Hello,
I'm attaching a minor patch to remove the unused "size" parameter of
crypto_wipe_device() which is unused as blockdev-wipe determines the size of
the target device by itself.
Cheers,
Thiemo
>From 6111f8f6b01beefe517a28f144127beddfa32f64 Mon Sep 17 00:00:00 2001
From: Thiemo Nagel <thiemo.nagel@gmail.com>
Date: Mon, 14 Oct 2013 09:36:24 +0200
Subject: [PATCH] Remove unused parameter of crypto_wipe_device()
---
active_partition/erasepart/do_option | 2 +-
lib/crypto-base.sh | 9 ++++-----
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/active_partition/erasepart/do_option b/active_partition/erasepart/do_option
index 3280959..5afcd11 100755
--- a/active_partition/erasepart/do_option
+++ b/active_partition/erasepart/do_option
@@ -22,4 +22,4 @@ open_dialog PARTITION_INFO $id
read_line num id size type fs path name
close_dialog
-crypto_wipe_device $path $size $type "" || true
+crypto_wipe_device $path $type "" || true
diff --git a/lib/crypto-base.sh b/lib/crypto-base.sh
index ba90169..e0f8e77 100644
--- a/lib/crypto-base.sh
+++ b/lib/crypto-base.sh
@@ -313,11 +313,10 @@ crypto_do_wipe () {
}
crypto_wipe_device () {
- local device size method interactive targetdevice
+ local device method interactive targetdevice
device=$1
- size=$2
- method=$3
- interactive=$4
+ method=$2
+ interactive=$3
if [ "$interactive" != no ]; then
interactive=yes
fi
@@ -752,7 +751,7 @@ crypto_setup() {
continue
fi
- if ! crypto_wipe_device $path $size $(cat $id/crypto_type) $interactive; then
+ if ! crypto_wipe_device $path $(cat $id/crypto_type) $interactive; then
db_fset partman-crypto/commit_failed seen false
db_input critical partman-crypto/commit_failed
db_go || true
--
1.7.10.4
Reply to: