summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-02-14 13:53:43 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-02-14 13:53:43 +0000
commitb665d3c80aa66b6f440ead49ac606e0702ffefd9 (patch)
treef9d2f8565a2aae01502b65760d91adf10c73a6fa /perl-install
parent625c6a2b2ad64ea930f2c444bed180b106732985 (diff)
downloaddrakx-b665d3c80aa66b6f440ead49ac606e0702ffefd9.tar
drakx-b665d3c80aa66b6f440ead49ac606e0702ffefd9.tar.gz
drakx-b665d3c80aa66b6f440ead49ac606e0702ffefd9.tar.bz2
drakx-b665d3c80aa66b6f440ead49ac606e0702ffefd9.tar.xz
drakx-b665d3c80aa66b6f440ead49ac606e0702ffefd9.zip
no_comment
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/c/stuff.xs.pm12
-rw-r--r--perl-install/commands.pm15
-rw-r--r--perl-install/install_any.pm2
-rw-r--r--perl-install/interactive_newt.pm2
-rw-r--r--perl-install/modules.pm5
-rw-r--r--perl-install/partition_table_raw.pm8
6 files changed, 32 insertions, 12 deletions
diff --git a/perl-install/c/stuff.xs.pm b/perl-install/c/stuff.xs.pm
index 69e7f2d78..fbdc8bf09 100644
--- a/perl-install/c/stuff.xs.pm
+++ b/perl-install/c/stuff.xs.pm
@@ -96,6 +96,18 @@ lseek_sector(fd, sector, offset)
OUTPUT:
RETVAL
+unsigned int
+total_sectors(fd)
+ int fd
+ CODE:
+ {
+ struct hd_driveid s;
+ ioctl(fd, HDIO_GET_IDENTITY, &s);
+ RETVAL = s.lba_capacity;
+ }
+ OUTPUT:
+ RETVAL
+
void
openlog(ident)
char *ident
diff --git a/perl-install/commands.pm b/perl-install/commands.pm
index bb3c6e04b..8fd032fa3 100644
--- a/perl-install/commands.pm
+++ b/perl-install/commands.pm
@@ -64,18 +64,20 @@ sub tr_ {
sub mount {
@_ or return cat("/proc/mounts");
- my ($t) = getopts(\@_, qw(t));
+ my ($t, $r) = getopts(\@_, qw(tr));
my $fs = $t && shift;
- @_ == 2 or die "usage: mount [-t <fs>] <device> <dir>\n",
+ @_ == 2 or die "usage: mount [-r] [-t <fs>] <device> <dir>\n",
" (if /dev/ is left off the device name, a temporary node will be created)\n";
my ($dev, $where) = @_;
$fs ||= $where =~ /:/ ? "nfs" :
$dev =~ /fd/ ? "vfat" : "ext2";
- require 'fs.pm';
- fs::mount($dev, $where, $fs, 0, 1);
+ require fs;
+ require modules;
+ modules::load_deps("/modules/modules.dep");
+ fs::mount($dev, $where, $fs, $r);
}
sub umount {
@@ -251,7 +253,10 @@ sub cp {
-d $dest or mkdir $dest, mode($src) or die "mkdir: can't create directory $dest: $!\n";
&$cp(glob_($src), $dest);
} elsif (-l $src) {
- symlink((readlink($src) || die "readlink failed: $!"), $dest) or die "symlink: can't create symlink $dest: $!\n";
+ unless (symlink((readlink($src) || die "readlink failed: $!"), $dest)) {
+ my $msg = "symlink: can't create symlink $dest: $!\n";
+ $force ? warn $msg : die $msg;
+ }
} else {
local (*F, *G);
open F, $src or die "can't open $src for reading: $!\n";
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 027ba0b64..4e6464a2e 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -435,7 +435,7 @@ sub g_auto_install(;$) {
my @fields = qw(mntpoint type size);
$o->{partitions} = [ map { my %l; @l{@fields} = @$_{@fields}; \%l } grep { $_->{mntpoint} } @{$::o->{fstab}} ];
- exists $::o->{$_} and $o->{$_} = $::o->{$_} foreach qw(lang autoSCSI authentication printer mouse wacom netc timezone superuser intf keyboard mkbootdisk base users installClass partitioning isUpgrade manualFstab nomouseprobe crypto modem useSupermount auto_probe_pci); #- TODO modules bootloader
+ exists $::o->{$_} and $o->{$_} = $::o->{$_} foreach qw(lang autoSCSI authentication printer mouse wacom netc timezone superuser intf keyboard mkbootdisk base users installClass partitioning isUpgrade manualFstab nomouseprobe crypto modem useSupermount); #- TODO modules bootloader
if (my $card = $::o->{X}{card}) {
$o->{X}{card}{$_} = $card->{$_} foreach qw(default_depth);
diff --git a/perl-install/interactive_newt.pm b/perl-install/interactive_newt.pm
index d16e3632f..6fbc18d3c 100644
--- a/perl-install/interactive_newt.pm
+++ b/perl-install/interactive_newt.pm
@@ -9,7 +9,7 @@ use vars qw(@ISA);
use interactive;
use common qw(:common :functional);
use log;
-use Newt::Newt;
+use Newt::Newt; #- !! provides Newt and not Newt::Newt
my $width = 80;
my $height = 25;
diff --git a/perl-install/modules.pm b/perl-install/modules.pm
index 1b481883c..57bc2268d 100644
--- a/perl-install/modules.pm
+++ b/perl-install/modules.pm
@@ -61,7 +61,7 @@ arch() =~ /^sparc/ ? (
"ni52" => "NI 5210",
"ni65" => "NI 6510",
"es3210" => "Racal-Interlan ES3210",
- "rcpci45" => "RedCreek PCI45 LAN",
+ "rcpci" => "Red Creek Hardware VPN",
"epic100" => "SMC 83c170 EPIC/100",
"sktr" => "Syskonnect Token ring adaptor",
"smc9194" => "SMC 9000 series",
@@ -71,6 +71,7 @@ arch() =~ /^sparc/ ? (
"via-rhine" => "VIA Rhine",
# "wavelan" => "AT&T WaveLAN & DEC RoamAbout DS", # TODO is a "AT&T GIS WaveLAN ISA" ?
"wd" => "WD8003, WD8013 and compatible",
+ "z85230" => "Z85x30",
"dmfe" => "dmfe",
"fmv18x" => "fmv18x",
@@ -367,7 +368,7 @@ sub load {
$type ||= ($drivers{$name} || { type => 'unknown'})->{type};
- load($_, 'prereq') foreach @{$deps{$name}};
+ eval { load($_, 'prereq') } foreach @{$deps{$name}};
load_raw($name, @options);
}
push @{$loaded{$type}}, $name;
diff --git a/perl-install/partition_table_raw.pm b/perl-install/partition_table_raw.pm
index 41a49d552..d1399f230 100644
--- a/perl-install/partition_table_raw.pm
+++ b/perl-install/partition_table_raw.pm
@@ -73,11 +73,13 @@ sub get_geometry($) {
local *F; sysopen F, $dev, 0 or return;
ioctl(F, c::HDIO_GETGEO(), $g) or return;
-
my %geom; @geom{qw(heads sectors cylinders start)} = unpack "CCSL", $g;
- $geom{totalcylinders} = $geom{cylinders};
- { geom => \%geom, totalsectors => $geom{heads} * $geom{sectors} * $geom{cylinders} };
+ #- $geom{cylinders} is no good (only a ushort, that means less than 2^16 => at best 512MB)
+ my $total = c::total_sectors(fileno F);
+ $geom{totalcylinders} = $total / $geom{heads} * $geom{sectors};
+
+ { geom => \%geom, totalsectors => $total };
}
sub openit($$;$) { sysopen $_[1], $_[0]{file}, $_[2] || 0; }