mrc0mmand / rpms / libguestfs

Forked from rpms/libguestfs 3 years ago
Clone

Blame SOURCES/0051-v2v-linux-improve-regex-for-resume-entries-RHBZ-1651.patch

d0ea73
From e003f5b8e7fe673aa462199e6190ea58a0cef011 Mon Sep 17 00:00:00 2001
d0ea73
From: Pino Toscano <ptoscano@redhat.com>
d0ea73
Date: Tue, 4 Dec 2018 18:43:59 +0100
d0ea73
Subject: [PATCH] v2v: linux: improve regex for resume= entries (RHBZ#1651987)
d0ea73
d0ea73
Add few more characters for the devices of resume= entries in the
d0ea73
command line of grub: this way it is possible to match also /dev/mapper
d0ea73
devices.
d0ea73
d0ea73
This should require no further processing, since the names of the
d0ea73
/dev/mapper devices do not change after the conversion.
d0ea73
d0ea73
(cherry picked from commit 50b08fd84bc035ada9e7a3cdda6c36ab7e418e8c)
d0ea73
---
d0ea73
 v2v/convert_linux.ml | 2 +-
d0ea73
 1 file changed, 1 insertion(+), 1 deletion(-)
d0ea73
d0ea73
diff --git a/v2v/convert_linux.ml b/v2v/convert_linux.ml
d0ea73
index fd6b71ba4..da06352a0 100644
d0ea73
--- a/v2v/convert_linux.ml
d0ea73
+++ b/v2v/convert_linux.ml
d0ea73
@@ -983,7 +983,7 @@ let convert (g : G.guestfs) inspect source output rcaps =
d0ea73
       List.flatten (List.map Array.to_list (List.map g#aug_match paths)) in
d0ea73
 
d0ea73
     (* Map device names for each entry. *)
d0ea73
-    let rex_resume = PCRE.compile "^resume=(/dev/[a-z\\d]+)(.*)$"
d0ea73
+    let rex_resume = PCRE.compile "^resume=(/dev/[-a-z\\d/_]+)(.*)$"
d0ea73
     and rex_device_cciss = PCRE.compile "^/dev/(cciss/c\\d+d\\d+)(?:p(\\d+))?$"
d0ea73
     and rex_device = PCRE.compile "^/dev/([a-z]+)(\\d*)?$" in
d0ea73
 
d0ea73
-- 
6b9fda
2.21.0
d0ea73