diff options
author | Douglas Schilling Landgraf <dougsland@redhat.com> | 2011-01-02 18:55:12 +0000 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2011-01-02 18:58:19 +0000 |
commit | f07a0b6f1e01f12db0286ae49744deee0efcb5b9 (patch) | |
tree | 345bdbe8dfa18f92254046c3869b81c278cb6e6a | |
parent | 5cab0d6c807d8a3bf9690375c663d11a10e21656 (diff) | |
download | libguestfs-f07a0b6f1e01f12db0286ae49744deee0efcb5b9.tar.gz libguestfs-f07a0b6f1e01f12db0286ae49744deee0efcb5b9.tar.xz libguestfs-f07a0b6f1e01f12db0286ae49744deee0efcb5b9.zip |
Lib.pm: unknown filesystem /dev/hd{x} (cdrom) (RHBZ#666577)
This a purpose patch to avoid the message "unknown filesystem /dev/hdc".
Where /dev/hdc is an entry in fstab for CDROM.
Example of fstab:
/dev/hdc /media/cdrom auto
pamconsole,exec,noauto,managed 0 0
https://bugzilla.redhat.com/show_bug.cgi?id=666577
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
-rw-r--r-- | perl/lib/Sys/Guestfs/Lib.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/perl/lib/Sys/Guestfs/Lib.pm b/perl/lib/Sys/Guestfs/Lib.pm index 52655003..393eb8ad 100644 --- a/perl/lib/Sys/Guestfs/Lib.pm +++ b/perl/lib/Sys/Guestfs/Lib.pm @@ -867,7 +867,7 @@ sub _assign_mount_points foreach (@fstab) { my ($spec, $file) = @$_; - my ($dev, $fs) = _find_filesystem ($g, $fses, $spec); + my ($dev, $fs) = _find_filesystem ($g, $fses, $spec, $file); if ($dev) { $r->{mounts}->{$file} = $dev; $r->{filesystems}->{$dev} = $fs; @@ -888,6 +888,7 @@ sub _find_filesystem my $g = shift; my $fses = shift; local $_ = shift; + my $file = shift; if (/^LABEL=(.*)/) { my $label = $1; @@ -928,6 +929,7 @@ sub _find_filesystem return ("/dev/$1/$2", $fses->{"/dev/$1/$2"}); } + return () if $file =~ (/media\/cdrom/); return () if m{/dev/cdrom}; return () if m{/dev/fd0}; |