package partition_table; # $Id$
#use diagnostics;
#use strict;
#use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK @important_types @important_types2 @fields2save);
@ISA = qw(Exporter);
%EXPORT_TAGS = (
types => [ qw(type2name type2fs name2type fs2type isExtended isExt2 isThisFs isTrueFS isSwap isDos isWin isFat isSunOS isOtherAvailableFS isPrimary isNfs isRawLVM isRawRAID isRAID isLVM isNT isMountableRW isNonMountable isPartOfLVM isPartOfRAID isPartOfLoopback isApplePartMap isLoopback isMounted isBusy isSpecial maybeFormatted isApple isAppleBootstrap) ],
);
@EXPORT_OK = map { @$_ } values %EXPORT_TAGS;
use common;
use partition_table_raw;
use log;
@important_types = ('Linux native', 'Linux swap',
if_(arch() =~ /i.86/, 'Journalised FS: ext3', 'Journalised FS: ReiserFS', 'Journalised FS: JFS', 'DOS FAT16', 'Win98 FAT32'),
if_(arch() =~ /ppc/, 'Apple HFS Partition', 'Apple Bootstrap'));
@important_types2 = ('Linux RAID', 'Linux Logical Volume Manager partition');
@fields2save = qw(primary extended totalsectors isDirty needKernelReread);
@bad_types = ('Empty', 'DOS 3.3+ Extended Partition', 'Win95: Extended partition, LBA-mapped', 'Linux extended partition');
my %types = (
0x0 => 'Empty',
if_(arch() =~ /^ppc/,
0x401 => 'Apple Partition',
0x401 => 'Apple Bootstrap',
0x402 => 'Apple HFS Partition',
), if_(arch() =~ /^i.86/,
0x183 => 'Journalised FS: ReiserFS',
# 0x283 => 'Journalised FS: XFS',
0x383 => 'Journalised FS: JFS',
0x483 => 'Journalised FS: ext3',
), if_(arch() =~ /^sparc/,
0x1 => 'SunOS boot',
0x2 => 'SunOS root',
0x3 => 'SunOS swap',
0x4 => 'SunOS usr',
0x5 => 'Whole disk',
0x6 => 'SunOS stand',
0x7 => 'SunOS var',
0x8 => 'SunOS home',
), if_(arch() =~ /^i.86/,
0x1 => 'DOS 12-bit FAT',
0x2 => 'XENIX root',
0x3 => 'XENIX /usr',
0x4 => 'DOS 16-bit FAT (up to 32M)',
0x5 => 'DOS 3.3+ Extended Partition',
0x6 => 'DOS FAT16',
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")',
0xa => 'OS/2 Boot Manager / Coherent swap partition / OPUS',
0xb => 'Win98 FAT32',
0xc => 'Win98 FAT32, LBA-mapped',
0xe => 'Win95: DOS 16-bit FAT, LBA-mapped',
0xf => 'Win95: Extended partition, LBA-mapped',
0x10 => 'OPUS (?)',
0x11 => 'Hidden DOS 12-bit FAT',
0x12 => 'Compaq/HP config partition',
0x14 => 'Hidden DOS 16-bit FAT <32M',
0x16 => 'Hidden DOS 16-bit FAT >=32M',
0x17 => 'Hidden IFS (e.g., HPFS)',
0x18 => 'AST Windows swapfile',
0x1b => 'Hidden WIN95 OSR2 32-bit FAT',
0x1c => 'Hidden WIN95 OSR2 32-bit FAT, LBA-mapped',
0x1e => 'Hidden FAT95',
0x22 => 'Used for Oxygen Extended Partition Table by ekstazya@sprint.ca.',
0x24 => 'NEC DOS 3.x',
0x38 => 'THEOS ver 3.2 2gb partition',
0x39 => 'THEOS ver 4 spanned partition',
0x3a => 'THEOS ver 4 4gb partition',
0x3b => 'THEOS ver 4 extended partition',
0x3c => 'PartitionMagic recovery partition',
|