diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2001-05-14 15:51:07 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2001-05-14 15:51:07 +0000 |
commit | 66d1e6bad40cf330f250d9a542f1a6bf47cedfeb (patch) | |
tree | 1f1663434b475983076a3f3bde50319e9ba55703 | |
parent | cd4bc31805e33fc1c6019ca4608196720541b6da (diff) | |
download | drakx-66d1e6bad40cf330f250d9a542f1a6bf47cedfeb.tar drakx-66d1e6bad40cf330f250d9a542f1a6bf47cedfeb.tar.gz drakx-66d1e6bad40cf330f250d9a542f1a6bf47cedfeb.tar.bz2 drakx-66d1e6bad40cf330f250d9a542f1a6bf47cedfeb.tar.xz drakx-66d1e6bad40cf330f250d9a542f1a6bf47cedfeb.zip |
basic xfs handling
-rw-r--r-- | perl-install/fs.pm | 10 | ||||
-rw-r--r-- | perl-install/fsedit.pm | 1 | ||||
-rw-r--r-- | perl-install/install_any.pm | 1 | ||||
-rw-r--r-- | perl-install/partition_table.pm | 8 |
4 files changed, 16 insertions, 4 deletions
diff --git a/perl-install/fs.pm b/perl-install/fs.pm index 0dd353022..a45607069 100644 --- a/perl-install/fs.pm +++ b/perl-install/fs.pm @@ -95,6 +95,12 @@ sub format_reiserfs($@) { run_program::run("mkreiserfs", "-f", "-q", @options, devices::make($dev)) or die _("%s formatting of %s failed", "reiserfs", $dev); } +sub format_xfs($@) { + my ($dev, @options) = @_; + + run_program::run("mkxfs", "-f", "-q", @options, devices::make($dev)) or die _("%s formatting of %s failed", "xfs", $dev); +} + sub format_dos($@) { my ($dev, @options) = @_; @@ -120,6 +126,8 @@ sub real_format_part { format_ext2($part->{device}, @options); } elsif (isReiserfs($part)) { format_reiserfs($part->{device}, @options, if_(c::kernel_version() =~ /^\Q2.2/, "-v", "1")); + } elsif (isXfs($part)) { + format_xfs($part->{device}, @options); } elsif (isDos($part)) { format_dos($part->{device}, @options); } elsif (isWin($part)) { @@ -206,6 +214,8 @@ sub mount($$$;$) { eval { modules::load('msdos') } if $@; #- otherwise msdos... } elsif ($fs eq 'ufs') { eval { modules::load('ufs') }; + } elsif ($fs eq 'xfs') { + eval { modules::load('xfs') }; } elsif ($fs eq 'reiserfs') { #- could be better if we knew if there is a /boot or not #- without knowing it, / is forced to be mounted with notail diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm index 4d525a749..bc2182255 100644 --- a/perl-install/fsedit.pm +++ b/perl-install/fsedit.pm @@ -44,6 +44,7 @@ my @partitions_signatures = ( [ 0x83, 0x438, "\x53\xEF" ], [ 0x183, 0x10034, "ReIsErFs" ], [ 0x183, 0x10034, "ReIsEr2Fs" ], + [ 0x283, 0, 'XFSB', 0x200, 'XAGF', 0x400, 'XAGI' ], [ 0x82, 4086, "SWAP-SPACE" ], [ 0x7, 0x1FE, "\x55\xAA", 0x3, "NTFS" ], [ 0xc, 0x1FE, "\x55\xAA", 0x52, "FAT32" ], diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index 9e600104a..c304558ef 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -328,6 +328,7 @@ sub setPackages { push @{$o->{default_packages}}, "lvm" if -e '/etc/lvmtab'; push @{$o->{default_packages}}, "usbd" if modules::get_alias("usb-interface"); push @{$o->{default_packages}}, "reiserfsprogs" if grep { isReiserfs($_) } @{$o->{fstab}}; + push @{$o->{default_packages}}, "xfsprogs" if grep { isXfs($_) } @{$o->{fstab}}; push @{$o->{default_packages}}, "alsa", "alsa-utils" if modules::get_alias("sound-slot-0") =~ /^snd-card-/; push @{$o->{default_packages}}, "imwheel" if $o->{mouse}{nbuttons} > 3; diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm index 5fb8368fa..ea5edda77 100644 --- a/perl-install/partition_table.pm +++ b/perl-install/partition_table.pm @@ -6,7 +6,7 @@ package partition_table; # $Id$ @ISA = qw(Exporter); %EXPORT_TAGS = ( - types => [ qw(type2name type2fs name2type fs2type isExtended isExt2 isReiserfs isTrueFS isSwap isDos isWin isFat isSunOS isOtherAvailableFS isPrimary isNfs isSupermount isLVM isRAID isMDRAID isLVMBased isHFS isNT isMountableRW isNonMountable isApplePartMap isLoopback isApple isAppleBootstrap) ], + types => [ qw(type2name type2fs name2type fs2type isExtended isExt2 isReiserfs isXfs isTrueFS isSwap isDos isWin isFat isSunOS isOtherAvailableFS isPrimary isNfs isSupermount isLVM isRAID isMDRAID isLVMBased isHFS isNT isMountableRW isNonMountable isApplePartMap isLoopback isApple isAppleBootstrap) ], ); @EXPORT_OK = map { @$_ } values %EXPORT_TAGS; @@ -32,8 +32,6 @@ arch() =~ /^ppc/ ? ( 0x401 => 'Apple Partition', 0x401 => 'Apple Bootstrap', 0x402 => 'Apple HFS Partition', -) : arch() =~ /^i.86/ ? ( - 0x183 => 'ReiserFS', ) : arch() =~ /^sparc/ ? ( 0x1 => 'SunOS boot', 0x2 => 'SunOS root', @@ -187,6 +185,7 @@ arch() !~ /sparc/ ? ( 0x82 => 'swap', 0x83 => 'ext2', 0x183=> 'reiserfs', + 0x283=> 'xfs', 0x401 => 'apple', 0x402 => 'hfs', nfs => 'nfs', #- hack @@ -220,6 +219,7 @@ sub isLVMBased { $_[0]{LVMname} } sub isSwap($) { $type2fs{$_[0]{type}} eq 'swap' } sub isExt2($) { $type2fs{$_[0]{type}} eq 'ext2' } sub isReiserfs($) { $type2fs{$_[0]{type}} eq 'reiserfs' } +sub isXfs($) { $type2fs{$_[0]{type}} eq 'xfs' } sub isDos($) { arch() !~ /^sparc/ && $ {{ 1=>1, 4=>1, 6=>1 }}{$_[0]{type}} } sub isWin($) { $ {{ 0xb=>1, 0xc=>1, 0xe=>1, 0x1b=>1, 0x1c=>1, 0x1e=>1 }}{$_[0]{type}} } sub isFat($) { isDos($_[0]) || isWin($_[0]) } @@ -234,7 +234,7 @@ sub isApple($) { $type2fs{$_[0]{type}} eq 'apple' && defined $_[0]{isDriver} } sub isAppleBootstrap($) { $type2fs{$_[0]{type}} eq 'apple' && defined $_[0]{isBoot} } sub isHiddenMacPart { defined $_[0]{isMap} } sub isLoopback { defined $_[0]{loopback_file} } -sub isTrueFS { isExt2($_[0]) || isReiserfs($_[0]) } +sub isTrueFS { isExt2($_[0]) || isReiserfs($_[0]) || isXfs($_[0]) } sub isMountableRW { isTrueFS($_[0]) || isOtherAvailableFS($_[0]) } sub isNonMountable { isRAID($_[0]) || isLVM($_[0]) } |