Browse Source

Removed inode_size and replaced with $main::makefs, and made fs_type local

to create() since it is really only for informational purposes only.  Now a
user can manipulate the filesystem creation command.
master
freesource 24 years ago
parent
commit
925042de9e
  1. 13
      BootRoot/Yard.pm

13
BootRoot/Yard.pm

@ -749,7 +749,7 @@ sub space_check {
sub create_filesystem {
my ($filename, $fs_size, $fs_type, $inode_size, $mnt, $strip_lib,
my ($filename, $fs_size, $mnt, $strip_lib,
$strip_bin, $strip_module, $obj_count) = @_;
$device = "$mnt/$filename";
@ -771,15 +771,18 @@ sub create_filesystem {
##### device. Use -F switch in mke2fs so it won't complain.
## Options here can be changed.
## Originally, this was -b 1024 switched with the inode approach.
if (sys("mke2fs -F -m 0 -i $inode_size $device $fs_size") !~
if (sys("$main::makefs $device $fs_size") !~
/^0$/ ) {
$error = error("Can not make $fs_type filesystem");
my $fs_type = (split(/\s/,$main::makefs))[0];
$error = error("Can not $fs_type filesystem");
return "ERROR" if $error && $error eq "ERROR";
}
} else {
if (sys("mke2fs -m 0 -i $inode_size $device $fs_size") !~
if (sys("$main::makefs $device $fs_size") !~
/^0$/ ) {
$error = error("Can not make $fs_type filesystem");
my $fs_type = (split(/\s/,$main::makefs))[0];
$error = error("Can not $fs_type filesystem");
return "ERROR" if $error && $error eq "ERROR";
}
}

Loading…
Cancel
Save