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>
This commit is contained in:
Douglas Schilling Landgraf
2011-01-02 18:55:12 +00:00
committed by Richard W.M. Jones
parent 5cab0d6c80
commit f07a0b6f1e

View File

@@ -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};