summaryrefslogtreecommitdiffstats
path: root/perl-install/partition_table.pm
Commit message (Expand)AuthorAgeFilesLines
* do not use "local *F", use "my $F" or output() insteadPascal Rigaux2002-12-031-3/+1
* perl_checker adaptationsPascal Rigaux2002-11-281-1/+1
* perl_checker adaptationsPascal Rigaux2002-11-271-2/+2
* make perl_checker happyPascal Rigaux2002-11-141-1/+1
* add/remove some spaces to make perl_checker happyPascal Rigaux2002-11-121-1/+1
* add or remove spaces where need to please perl_checkerPascal Rigaux2002-11-111-8/+8
* - have "local *FILEHANDLE" before each "open FILEHANDLE, ..."Pascal Rigaux2002-11-061-1/+1
* replace complex "unless"s with "if"sPascal Rigaux2002-11-061-1/+1
* replace "_" with "N" and "__" with "N_"Pascal Rigaux2002-11-061-8/+8
* - isUBD can tell wether it is an ubd partitionPascal Rigaux2002-11-051-1/+2
* - add ntfs in isOtherAvailableFSPascal Rigaux2002-09-181-2/+2
* remove associating 0x35 => 'jfs' since it causes types_rev to associate jfs t...Pascal Rigaux2002-08-281-1/+0
* - do not handle clearall in read()Pascal Rigaux2002-08-271-6/+3
* rename LVMname to VG_namePascal Rigaux2002-08-111-1/+1
* make new perl_checker happy (and that's not easy!)Pascal Rigaux2002-07-311-2/+2
* cleanupPascal Rigaux2002-07-291-4/+6
* add 0x35 partition table id meaning JFS (under OS/2) (thank to Mika Laitio)Pascal Rigaux2002-07-251-0/+2
* g Move 2: partition table: hierarchyThierry Vignaud2002-07-231-5/+5
* handling devfs names for cdrom/hds on ide/scsi (needs testing)Pascal Rigaux2002-07-191-4/+9
* for greater symmetry with smb, drop isNfs in favour of isThisFs('nfs', ...)Pascal Rigaux2002-07-071-2/+1
* Allows people having PVs on unpartitioned disks to installPascal Rigaux2002-07-061-1/+1
* cleanupPascal Rigaux2002-07-061-3/+3
* fix a few english stringsGuillaume Cottenceau2002-04-081-1/+1
* better name for windobe new 0x42 special id (their own LVM marker)Pascal Rigaux2002-03-021-1/+1
* warn if partitions have been renumbered due to a partition being added or rem...Pascal Rigaux2002-01-281-3/+11
* remove unused auto_win_extended stuffPascal Rigaux2002-01-221-4/+2
* handle extended partitions with no partitions inside (esp. for the first hda5...Pascal Rigaux2002-01-221-17/+33
* Journalled filesystems for PPC now too.Stew Benedict2001-11-091-1/+5
* add methods first_usable_sector and last_usable_sectorPascal Rigaux2001-10-241-2/+2
* - s/Win98 FAT32/FAT32/Gwenolé Beauchesne2001-10-191-4/+4
* handle empty $hd->{primary}{raw} (happens with no partitions on ia64)Pascal Rigaux2001-10-191-2/+6
* - raw_add, can_raw_add moved to partition_table_rawPascal Rigaux2001-10-191-18/+3
* read part of GPT partition table workingPascal Rigaux2001-10-181-1/+5
* shorter GPT namePascal Rigaux2001-10-181-1/+1
* make perl_checker happyPascal Rigaux2001-10-091-3/+4
* yet a few other ataraid casesPascal Rigaux2001-10-081-1/+1
* updates to accomodate IBM PPC systems with DOS partition tableStew Benedict2001-10-061-1/+2
* - partition_table.pm: Add XFS suggestion for IA-64Gwenolé Beauchesne2001-09-261-1/+2
* - Add ReiserFS and Ext3fs entries for IA-64Gwenolé Beauchesne2001-09-251-0/+4
* (adjust_main_extended): do not use linux extendedPascal Rigaux2001-09-171-0/+1
* BLKPG_ADD_PARTITION support (aka adding partition on the fly without rebootin...Pascal Rigaux2001-09-131-5/+18
* (get_normal_parts_and_holes): remove only small holes, not small partitionsPascal Rigaux2001-09-091-1/+1
* add xfsPascal Rigaux2001-09-071-2/+2
* re-add JFSPascal Rigaux2001-09-041-5/+3
* fix switching to 0x85 extended when remove_empty_extended is calledPascal Rigaux2001-09-031-3/+3
* (write): do not die when real_mntpoint fs fail to unmount/remount, just logPascal Rigaux2001-08-241-2/+2
* (write): unmount+remount real_mntpoint before doing the kernel_readPascal Rigaux2001-08-241-0/+8
* remove JFS from @important_types (too broken for the moment)Pascal Rigaux2001-08-191-1/+1
* remove isSupermount (was unused)Pascal Rigaux2001-08-191-3/+2
* fixes and function prototype removingPascal Rigaux2001-08-181-24/+23
="hl str">'t' => [91,64], }}{$1} or die "unknown device $_" }; $minor += $2 || 0; } elsif (/^ram(.*)/) { $type = c::S_IFBLK(); $major = 1; $minor = $1 eq '' ? 1 : $1; } elsif (m|^rd/c(\d+)d(\d+)(p(\d+))?|) { # dac 960 "rd/cXdXXpX" $type = c::S_IFBLK(); $major = 48 + $1; $minor = 8 * $2 + $4; } elsif (m,(ida|cciss)/c(\d+)d(\d+)(?:p(\d+))?,) { # Compaq Smart Array "ida/c0d0{p1}" $type = c::S_IFBLK(); $major = ($1 eq 'ida' ? 72 : 104) + $2; $minor = 16 * $3 + ($4 || 0); } elsif (m,(ataraid)/d(\d+)(?:p(\d+))?,) { # ATA raid "ataraid/d0{p1}" $type = c::S_IFBLK(); $major = 114; $minor = 16 * $1 + ($2 || 0); } elsif (/(.*?)(\d+)$/) { ($type, $major, $minor) = @{ ${{"fd" => [ c::S_IFBLK(), 2, 0 ], "hidbp-mse-" => [ c::S_IFCHR(), 10, 32 ], "lp" => [ c::S_IFCHR(), 6, 0 ], "usb/lp" => [ c::S_IFCHR(), 180, 0 ], "input/event" => [ c::S_IFCHR(), 13, 64 ], "loop" => [ c::S_IFBLK(), 7, 0 ], "md" => [ c::S_IFBLK(), 9, 0 ], "nst" => [ c::S_IFCHR(), 9, 128], "scd" => [ c::S_IFBLK(), 11, 0 ], "ttyS" => [ c::S_IFCHR(), 4, 64 ], }}{$1}}; $minor += $2; } unless ($type) { ($type, $major, $minor) = @{ ${{"aztcd" => [ c::S_IFBLK(), 29, 0 ], "bpcd" => [ c::S_IFBLK(), 41, 0 ], "cdu31a" => [ c::S_IFBLK(), 15, 0 ], "cdu535" => [ c::S_IFBLK(), 24, 0 ], "cm206cd" => [ c::S_IFBLK(), 32, 0 ], "gscd" => [ c::S_IFBLK(), 16, 0 ], "mcd" => [ c::S_IFBLK(), 23, 0 ], "mcdx" => [ c::S_IFBLK(), 20, 0 ], "mem" => [ c::S_IFCHR(), 1, 1 ], "optcd" => [ c::S_IFBLK(), 17, 0 ], "kbd" => [ c::S_IFCHR(), 11, 0 ], "psaux" => [ c::S_IFCHR(), 10, 1 ], "atibm" => [ c::S_IFCHR(), 10, 3 ], "random" => [ c::S_IFCHR(), 1, 8 ], "sbpcd" => [ c::S_IFBLK(), 25, 0 ], "sjcd" => [ c::S_IFBLK(), 18, 0 ], "tty" => [ c::S_IFCHR(), 5, 0 ], "usbmouse"=> [ c::S_IFCHR(), 13, 63], #- aka /dev/input/mice "adbmouse"=> [ c::S_IFCHR(), 10, 10], #- PPC "zero" => [ c::S_IFCHR(), 1, 5 ], }}{$_} or die "unknown device $_ (caller is " . join(":", caller()) . ")" }; } ($type, $major, $minor); } sub make($) { local $_ = my $file = $_[0]; if (m,^(.*/(?:dev|tmp))/(.*),) { $_ = $2; } else { $file =~ m|^/| && -e $file or $file = "/tmp/$_"; $file =~ m|^/| && -e $file or $file = "/dev/$_"; } -e $file and return $file; #- assume nobody takes fun at creating files named as device my ($type, $major, $minor) = eval { entry($_) }; $@ and die "unknown device $_ (caller is " . join(":", caller()) . ")"; if ($file =~ m|/dev/| && -e '/dev/.devfsd') { #- argh, creating devices is no good with devfs... #- return the file even if the device file doesn't exist #- the caller will fail or not, better compatibility than raising an exception here return $file; } #- make a directory for this inode if needed. mkdir dirname($file), 0755; syscall_('mknod', $file, $type | 0600, makedev($major, $minor)) or die "mknod failed (dev $_): $!"; $file; } 1;