Browse Source

* This makes -> literal, before it was backwards. So /bin/sh -> bash works,

before it had to be /bin/bash -> /bin/sh, so now the ls -l interpretation
  is correct.
* Fixes unitialized values in onto_proc_filesystem.
master
freesource 24 years ago
parent
commit
01cb23d3d7
  1. 22
      BootRoot/Yard.pm

22
BootRoot/Yard.pm

@ -177,7 +177,13 @@ sub read_contents_file {
cf_warn($line, "Can't use wildcards in link specification!"); cf_warn($line, "Can't use wildcards in link specification!");
next LINE; next LINE;
} }
my($file, $link) = $line =~ /^(\S+)\s*->\s*(\S+)\s*$/;
## I decided to switch this from ($file,$link) to ($link,$file)
## to make this more intuitive for users so something like
## ls -l /bin/sh which ='s /bin/sh -> /bin/bash is literal
## .. before it was backwards.
my($link, $file) = $line =~ /^(\S+)\s*->\s*(\S+)\s*$/;
if (!defined($link)) { if (!defined($link)) {
cf_warn($line, "Can't parse this link"); cf_warn($line, "Can't parse this link");
next LINE; next LINE;
@ -185,7 +191,10 @@ sub read_contents_file {
##### The '->' supersedes file structure on the disk, so don't ##### The '->' supersedes file structure on the disk, so don't
##### call include_file until pass two after all explicit links ##### call include_file until pass two after all explicit links
##### have been seen. ##### have been seen.
my($abs_file) = find_file_in_path($file);
## find_file_in_path($file) changed to find_file_in_path($link)
my($abs_file) = find_file_in_path($link);
$Included{$abs_file} = 1 if $abs_file; $Included{$abs_file} = 1 if $abs_file;
#### Have to be careful here. Record the rel link for use #### Have to be careful here. Record the rel link for use
#### in setting up the root fs, but use the abs_link in @files #### in setting up the root fs, but use the abs_link in @files
@ -1650,7 +1659,14 @@ sub onto_proc_filesystem {
my($file) = @_; my($file) = @_;
my($sdev) = (stat($file))[0]; my($sdev) = (stat($file))[0];
my($ldev) = (lstat($file))[0]; my($ldev) = (lstat($file))[0];
$sdev == $proc_dev or $ldev == $proc_dev
if ($sdev) {
$sdev = $proc_dev;
}
elsif ($ldev) {
$ldev = $proc_dev;
}
} }

Loading…
Cancel
Save