File 0056-Lib.pm-unknown-filesystem-label-SWAP-sda2-RHBZ-66657.patch of Package libguestfs
From bb2881d715ef686baba5477725199d319d54028b Mon Sep 17 00:00:00 2001
From: Douglas Schilling Landgraf <dougsland@redhat.com>
Date: Sun, 2 Jan 2011 18:53:55 +0000
Subject: [PATCH 56/72] Lib.pm: unknown filesystem label SWAP-sda2 (RHBZ#666578)
Hi,
This is a purpose patch to avoid the message: unknown filesystem label
SWAP-sda2.
Instead of validate the label with 'eq', use '=~' and /$label/i.
https://bugzilla.redhat.com/show_bug.cgi?id=666578
Thanks
Douglas
(cherry picked from commit 5cab0d6c807d8a3bf9690375c663d11a10e21656)
(cherry picked from commit a38330ca19a47024f5f965bb586ac9116992108d)
---
perl/lib/Sys/Guestfs/Lib.pm | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/perl/lib/Sys/Guestfs/Lib.pm b/perl/lib/Sys/Guestfs/Lib.pm
index 4e5c506..5265500 100644
--- a/perl/lib/Sys/Guestfs/Lib.pm
+++ b/perl/lib/Sys/Guestfs/Lib.pm
@@ -893,7 +893,7 @@ sub _find_filesystem
my $label = $1;
foreach (sort keys %$fses) {
if (exists $fses->{$_}->{label} &&
- $fses->{$_}->{label} eq $label) {
+ $fses->{$_}->{label} =~ /$label/i) {
return ($_, $fses->{$_});
}
}
--
1.7.1