From 925042de9e66233bab28c4986b5e5c9131aac78c Mon Sep 17 00:00:00 2001 From: freesource Date: Thu, 2 Aug 2001 17:43:12 +0000 Subject: [PATCH] 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. --- BootRoot/Yard.pm | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/BootRoot/Yard.pm b/BootRoot/Yard.pm index 9906f70..5647029 100644 --- a/BootRoot/Yard.pm +++ b/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"; } }