Michal Schmidt 706a2f
From aae5220d961a419a1e160de90ee5c393c7c13607 Mon Sep 17 00:00:00 2001
Michal Schmidt 706a2f
From: Michal Schmidt <mschmidt@redhat.com>
Michal Schmidt 706a2f
Date: Mon, 6 Jun 2011 22:59:19 +0200
Michal Schmidt 706a2f
Subject: [PATCH 3/4] cryptsetup-generator: fix /etc/cryptsetup options
Michal Schmidt 706a2f
Michal Schmidt 706a2f
cryptsetup-generator parses the options in /etc/cryptsetup incorrectly.
Michal Schmidt 706a2f
It fails to find the 'swap' option in
Michal Schmidt 706a2f
  swap,foo
Michal Schmidt 706a2f
and instead it matches on
Michal Schmidt 706a2f
  swaplalala,foo
Michal Schmidt 706a2f
Michal Schmidt 706a2f
The condition for the comma separator is reversed.
Michal Schmidt 706a2f
Michal Schmidt 706a2f
https://bugzilla.redhat.com/show_bug.cgi?id=710839
Michal Schmidt 706a2f
---
Michal Schmidt 706a2f
 src/cryptsetup-generator.c |    2 +-
Michal Schmidt 706a2f
 1 files changed, 1 insertions(+), 1 deletions(-)
Michal Schmidt 706a2f
Michal Schmidt 706a2f
diff --git a/src/cryptsetup-generator.c b/src/cryptsetup-generator.c
Michal Schmidt 706a2f
index 696f44a..db8ebdf 100644
Michal Schmidt 706a2f
--- a/src/cryptsetup-generator.c
Michal Schmidt 706a2f
+++ b/src/cryptsetup-generator.c
Michal Schmidt 706a2f
@@ -47,7 +47,7 @@ static bool has_option(const char *haystack, const char *needle) {
Michal Schmidt 706a2f
                         continue;
Michal Schmidt 706a2f
                 }
Michal Schmidt 706a2f
 
Michal Schmidt 706a2f
-                if (f[l] != 0 && f[l] == ',') {
Michal Schmidt 706a2f
+                if (f[l] != 0 && f[l] != ',') {
Michal Schmidt 706a2f
                         f++;
Michal Schmidt 706a2f
                         continue;
Michal Schmidt 706a2f
                 }
Michal Schmidt 706a2f
-- 
Michal Schmidt 706a2f
1.7.4.4
Michal Schmidt 706a2f