aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorChristophe Saout <christophe@saout.de>2006-10-30 14:39:08 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-30 15:02:57 -0500
commit37af6560f7978c60791b5f3df17ce8b3e97f2d6e (patch)
tree6c8d68e7d79b2d49088e8be408b2f8a0a38f5212 /drivers/md
parentc1b707d253fe918b92882cff1dbd926b47e14fd2 (diff)
[PATCH] Fix dmsetup table output change
Fix dm-crypt after the block cipher API changes to correctly return the backwards compatible cipher-chainmode[-ivmode] format for "dmsetup table". Signed-off-by: Christophe Saout <christophe@saout.de> Cc: Alasdair G Kergon <agk@redhat.com> Cc: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Linus Torvalds <torvalds@osdl.org> diff linux-2.6.19-rc3.orig/drivers/md/dm-crypt.c linux-2.6.19-rc3/drivers/md/dm-crypt.c
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm-crypt.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c
index a625576fdeeb..08a40f4e4f60 100644
--- a/drivers/md/dm-crypt.c
+++ b/drivers/md/dm-crypt.c
@@ -915,8 +915,6 @@ static int crypt_status(struct dm_target *ti, status_type_t type,
915 char *result, unsigned int maxlen) 915 char *result, unsigned int maxlen)
916{ 916{
917 struct crypt_config *cc = (struct crypt_config *) ti->private; 917 struct crypt_config *cc = (struct crypt_config *) ti->private;
918 const char *cipher;
919 const char *chainmode = NULL;
920 unsigned int sz = 0; 918 unsigned int sz = 0;
921 919
922 switch (type) { 920 switch (type) {
@@ -925,14 +923,11 @@ static int crypt_status(struct dm_target *ti, status_type_t type,
925 break; 923 break;
926 924
927 case STATUSTYPE_TABLE: 925 case STATUSTYPE_TABLE:
928 cipher = crypto_blkcipher_name(cc->tfm);
929
930 chainmode = cc->chainmode;
931
932 if (cc->iv_mode) 926 if (cc->iv_mode)
933 DMEMIT("%s-%s-%s ", cipher, chainmode, cc->iv_mode); 927 DMEMIT("%s-%s-%s ", cc->cipher, cc->chainmode,
928 cc->iv_mode);
934 else 929 else
935 DMEMIT("%s-%s ", cipher, chainmode); 930 DMEMIT("%s-%s ", cc->cipher, cc->chainmode);
936 931
937 if (cc->key_size > 0) { 932 if (cc->key_size > 0) {
938 if ((maxlen - sz) < ((cc->key_size << 1) + 1)) 933 if ((maxlen - sz) < ((cc->key_size << 1) + 1))