summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-02-11 13:36:33 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-02-11 13:36:33 +0000
commit64ca82b757c600bc6e582ff018e2306c06070ed8 (patch)
tree1bc12545df5a7d25740f9ef5c3ede4757b561308
parent38c2ce5c558db850d4a85c95255f43d593904d55 (diff)
downloaddrakx-64ca82b757c600bc6e582ff018e2306c06070ed8.tar
drakx-64ca82b757c600bc6e582ff018e2306c06070ed8.tar.gz
drakx-64ca82b757c600bc6e582ff018e2306c06070ed8.tar.bz2
drakx-64ca82b757c600bc6e582ff018e2306c06070ed8.tar.xz
drakx-64ca82b757c600bc6e582ff018e2306c06070ed8.zip
handle 0x7 partition table id specially since it can be both hpfs or ntfs.
so adding 0x107 being really ntfs. hopefully this change won't break too much things (but things were already broken, since it assigned a mount point with type ntfs to some hpfs partitions) (fixes bug #1455)
-rw-r--r--perl-install/fsedit.pm4
-rw-r--r--perl-install/partition_table.pm6
2 files changed, 6 insertions, 4 deletions
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm
index 62196cd34..fb52c0db0 100644
--- a/perl-install/fsedit.pm
+++ b/perl-install/fsedit.pm
@@ -57,7 +57,7 @@ my @partitions_signatures = (
[ 0x383, 0x8000, 'JFS1' ],
[ 0x82, 4086, "SWAP-SPACE" ],
[ 0x82, 4086, "SWAPSPACE2" ],
- [ 0x7, 0x1FE, "\x55\xAA", 0x3, "NTFS" ],
+ [ 0x107, 0x1FE, "\x55\xAA", 0x3, "NTFS" ],
[ 0xc, 0x1FE, "\x55\xAA", 0x52, "FAT32" ],
if_(arch() !~ /^sparc/,
[ 0x6, 0x1FE, "\x55\xAA", 0x36, "FAT" ],
@@ -211,7 +211,7 @@ sub hds {
$_->{type} = typeOfPart($_->{device}) || 0x100 foreach grep { $_->{type} == 0x100 } partition_table::get_normal_parts($hd);
#- special case for type overloading (eg: reiserfs is 0x183)
- foreach (grep { isExt2($_) } partition_table::get_normal_parts($hd)) {
+ foreach (grep { isExt2($_) || $_->{type} == 0x7 } partition_table::get_normal_parts($hd)) {
my $type = typeOfPart($_->{device});
$_->{type} = $type if $type > 0x100 || $type && $hd->isa('partition_table::gpt');
}
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm
index 5e26718ab..8051142a8 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -37,6 +37,7 @@ if_(arch() =~ /^ppc/,
0x401 => 'Apple Bootstrap',
0x402 => 'Apple HFS Partition',
), if_(arch() =~ /^i.86/,
+ 0x107 => 'NTFS',
0x183 => 'Journalised FS: ReiserFS',
0x283 => 'Journalised FS: XFS',
0x383 => 'Journalised FS: JFS',
@@ -62,7 +63,7 @@ if_(arch() =~ /^ppc/,
0x4 => 'DOS 16-bit FAT (up to 32M)',
0x5 => 'DOS 3.3+ Extended Partition',
0x6 => 'DOS FAT16',
- 0x7 => 'NTFS',
+ 0x7 => 'NTFS (or HPFS)',
0x8 => 'OS/2 (v1.0-1.3 only) / AIX boot partition / SplitDrive / Commodore DOS / DELL partition spanning multiple drives / QNX 1.x and 2.x ("qny")',
),
0x9 => 'AIX data partition / Coherent filesystem / QNX 1.x and 2.x ("qnz")',
@@ -199,6 +200,7 @@ arch() !~ /sparc/ ? (
0x1e => 'vfat',
0x82 => 'swap',
0x83 => 'ext2',
+ 0x107 => 'ntfs',
0x183 => 'reiserfs',
0x283 => 'xfs',
0x383 => 'jfs',
@@ -235,7 +237,7 @@ sub isExt2 { type2fs($_[0]) eq 'ext2' }
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]) }
-sub isFat_or_NTFS { isDos($_[0]) || isWin($_[0]) || $_[0]{type} == 0x7 }
+sub isFat_or_NTFS { isDos($_[0]) || isWin($_[0]) || $_[0]{type} == 0x107 }
sub isSunOS { arch() =~ /sparc/ && ${{ 0x1 => 1, 0x2 => 1, 0x4 => 1, 0x6 => 1, 0x7 => 1, 0x8 => 1 }}{$_[0]{type}} }
sub isApple { type2fs($_[0]) eq 'apple' && defined $_[0]{isDriver} }
sub isAppleBootstrap { type2fs($_[0]) eq 'apple' && defined $_[0]{isBoot} }