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