From 68c3a4476cbac68c99f0a9973b65bf1937b9c4e9 Mon Sep 17 00:00:00 2001 From: freesource Date: Thu, 1 Nov 2001 18:05:05 +0000 Subject: [PATCH] Have the dev logic, now need to build device table. --- BootRoot/Yard.pm | 58 +++++++++++++++++++++++++++++++----------------- 1 file changed, 38 insertions(+), 20 deletions(-) diff --git a/BootRoot/Yard.pm b/BootRoot/Yard.pm index f353ee3..8cc0505 100644 --- a/BootRoot/Yard.pm +++ b/BootRoot/Yard.pm @@ -35,7 +35,7 @@ use Exporter; @ISA = qw(Exporter); @EXPORT = qw(start_logging_output info kernel_version_check verbosity read_contents_file extra_links library_dependencies hard_links - space_check create_filesystem find_file_in_path sys + space_check create_filesystem find_file_in_path sys device_table text_insert error logadj *LOGFILE which_tests create_fstab); use strict; @@ -198,35 +198,45 @@ sub read_contents_file { ,x ) { - my $expr; - my @line; + my ($expr, $tmp_line); for $expr (split(' ', $line)) { - if ( m,^/dev$|^/dev/, ) { + if ( $expr && $expr =~ m,^/dev$|^/dev/, ) { + + # Do something here + my(@globbed) = yard_glob($expr); + if ($#globbed == -1) { + cf_warn($contents_file, $expr, + "Warning: No files matched $expr"); + } elsif (!($#globbed == 0 and $globbed[0] eq $expr)) { + info(1, "Expanding $expr to @globbed\n"); + } - # Do something here + # make device table + device_table(@globbed); } else { - push(@line,$expr); - } + if ( $tmp_line ) { + $tmp_line = $tmp_line . " $expr"; + } + else { + $tmp_line = $expr; + } + + } + } - } - -=pod - my($expr); - for $expr (split(' ', $line)) { - my(@globbed) = yard_glob($expr); - if ($#globbed == -1) { - cf_warn($contents_file, $expr, - "Warning: No files matched $expr"); - } elsif (!($#globbed == 0 and $globbed[0] eq $expr)) { - info(1, "Expanding $expr to @globbed\n"); + if ( $tmp_line ) { + $line = $tmp_line; + info(0,"D $line\n"); + } + else { + next LINE; } - push(@files, @globbed); + } -=cut } @@ -1669,6 +1679,14 @@ sub yard_glob { } # end yard_glob +# build device table for genext2fs +sub device_table { + + + + + +} # end sub device_table sub mount_device {