summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-02-28 21:23:35 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-02-28 21:23:35 +0000
commitc38c6b14952c25b51b1c0f9fa05aec2d34dc8ddf (patch)
tree6ab9fab8ff9e4273ce051c7947877e38c1c08ea6
parentdbb92fc24abd933eff171909db38d78e1d2f40c6 (diff)
downloaddrakx-backup-do-not-use-c38c6b14952c25b51b1c0f9fa05aec2d34dc8ddf.tar
drakx-backup-do-not-use-c38c6b14952c25b51b1c0f9fa05aec2d34dc8ddf.tar.gz
drakx-backup-do-not-use-c38c6b14952c25b51b1c0f9fa05aec2d34dc8ddf.tar.bz2
drakx-backup-do-not-use-c38c6b14952c25b51b1c0f9fa05aec2d34dc8ddf.tar.xz
drakx-backup-do-not-use-c38c6b14952c25b51b1c0f9fa05aec2d34dc8ddf.zip
no_comment
-rw-r--r--perl-install/ChangeLog11
-rw-r--r--perl-install/c/stuff.xs.pm3
-rw-r--r--perl-install/install2.pm4
-rw-r--r--perl-install/install_steps_auto_install.pm4
-rw-r--r--perl-install/install_steps_gtk.pm3
-rw-r--r--perl-install/modules.pm13
-rw-r--r--perl-install/partition_table_raw.pm7
7 files changed, 35 insertions, 10 deletions
diff --git a/perl-install/ChangeLog b/perl-install/ChangeLog
index d0f571192..aa769c760 100644
--- a/perl-install/ChangeLog
+++ b/perl-install/ChangeLog
@@ -1,5 +1,16 @@
2000-02-28 Pixel <pixel@mandrakesoft.com>
+ * partition_table_raw.pm (get_geometry): when the
+ HDIO_GET_IDENTITY fails, defaults to what GETGEO gave
+
+ * install2.pm (main): use modules::load_multi to increase boot
+ start time
+
+ * modules.pm (load_multi): added this function for loading many
+ modules at once.
+
+ * install_steps_gtk.pm (new): increase time before timeout
+
* detect_devices.pm (cdroms): change the device associated with
ide-burners (hdX -> scdX). Problem is how to know the X in scdX :(
diff --git a/perl-install/c/stuff.xs.pm b/perl-install/c/stuff.xs.pm
index fbdc8bf09..d4a272a53 100644
--- a/perl-install/c/stuff.xs.pm
+++ b/perl-install/c/stuff.xs.pm
@@ -102,8 +102,7 @@ total_sectors(fd)
CODE:
{
struct hd_driveid s;
- ioctl(fd, HDIO_GET_IDENTITY, &s);
- RETVAL = s.lba_capacity;
+ RETVAL = ioctl(fd, HDIO_GET_IDENTITY, &s) == 0 ? s.lba_capacity : 0;
}
OUTPUT:
RETVAL
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index 8f8666f02..a9e22535b 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -619,11 +619,11 @@ sub main {
}
modules::unload($_) foreach qw(vfat msdos fat);
- modules::load_deps("/modules/modules.dep");
+ modules::load_deps(($::testing ? ".." : "") . "/modules/modules.dep");
modules::read_stage1_conf("/tmp/conf.modules");
modules::read_already_loaded();
- eval { modules::load($_, 'prereq') } foreach qw(ide-probe ide-disk ide-cd sd_mod af_packet);
+ modules::load_multi(qw(ide-probe ide-disk ide-cd sd_mod af_packet));
install_any::lnx4win_preinstall() if $o->{lnx4win};
#-the main cycle
diff --git a/perl-install/install_steps_auto_install.pm b/perl-install/install_steps_auto_install.pm
index b6a17f2f9..8367af3b6 100644
--- a/perl-install/install_steps_auto_install.pm
+++ b/perl-install/install_steps_auto_install.pm
@@ -26,14 +26,14 @@ sub ask_warn {
sub errorInStep {
print "error :(\n";
print "switch to console f2 for a shell\n";
- print "press to return to reboot\n";
+ print "Press <Enter> to reboot\n";
<STDIN>;
c::_exit(0);
}
sub exitInstall {
print "Auto installation complete\n";
- print "Press <enter> to reboot\n";
+ print "Press <Enter> to reboot\n";
<STDIN>;
}
diff --git a/perl-install/install_steps_gtk.pm b/perl-install/install_steps_gtk.pm
index 3e05193ab..c04c07214 100644
--- a/perl-install/install_steps_gtk.pm
+++ b/perl-install/install_steps_gtk.pm
@@ -178,11 +178,12 @@ sub new($$) {
unless (fork) {
exec $_[0], "-dpms","-s" ,"240", "-allowMouseOpenFail", "-xf86config", $f or exit 1;
}
- foreach (1..15) {
+ foreach (1..60) {
sleep 1;
return 0 if !$ok;
return 1 if c::Xtest($ENV{DISPLAY});
}
+ log::l("Timeout!!");
0;
};
my @servers = qw(FBDev VGA16); #-)
diff --git a/perl-install/modules.pm b/perl-install/modules.pm
index c82cee6a1..734523fcb 100644
--- a/perl-install/modules.pm
+++ b/perl-install/modules.pm
@@ -379,6 +379,19 @@ sub load {
}
$conf{$name}{options} = join " ", @options if @options;
}
+sub load_multi {
+ my $f; $f = sub { map { $f->(@{$deps{$_}}), $_ } @_ };
+ my %l; my @l =
+ grep { !$conf{$_}{loaded} }
+ grep { my $o = $l{$_}; $l{$_} = 1; !$o }
+ $f->(@_);
+
+ $::testing and log::l("i would install modules @l"), return;
+
+ run_program::run("extract_archive", "/lib/modules.cz2", "/tmp", map { "$_.o" } @l);
+ run_program::run(["insmod_", "insmod"], "/tmp/$_.o") and $conf{$_}{loaded} = 1 foreach @l;
+ unlink map { "/tmp/$_.o" } @l;
+}
sub unload($;$) {
my ($m, $remove_alias) = @_;
diff --git a/perl-install/partition_table_raw.pm b/perl-install/partition_table_raw.pm
index a27947bdd..af73da1d1 100644
--- a/perl-install/partition_table_raw.pm
+++ b/perl-install/partition_table_raw.pm
@@ -76,10 +76,11 @@ sub get_geometry($) {
my %geom; @geom{qw(heads sectors cylinders start)} = unpack "CCSL", $g;
#- $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};
+ if (my $total = c::total_sectors(fileno F)) {
+ $geom{cylinders} = $total / $geom{heads} / $geom{sectors};
+ }
- { geom => \%geom, totalsectors => $total };
+ { geom => \%geom, totalsectors => $geom{heads} * $geom{sectors} * $geom{cylinders} };
}
sub openit($$;$) { sysopen $_[1], $_[0]{file}, $_[2] || 0; }