summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-06-14 08:29:14 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-06-14 08:29:14 +0000
commit4542b277aca1cbe20cb121fb97e07647f13e49bf (patch)
tree7167d195d1c3ae73bb54b3af77853b4c53a8c18e /perl-install
parent0ef292ec5453e0b367975ae22f046457c390f23c (diff)
downloaddrakx-backup-do-not-use-4542b277aca1cbe20cb121fb97e07647f13e49bf.tar
drakx-backup-do-not-use-4542b277aca1cbe20cb121fb97e07647f13e49bf.tar.gz
drakx-backup-do-not-use-4542b277aca1cbe20cb121fb97e07647f13e49bf.tar.bz2
drakx-backup-do-not-use-4542b277aca1cbe20cb121fb97e07647f13e49bf.tar.xz
drakx-backup-do-not-use-4542b277aca1cbe20cb121fb97e07647f13e49bf.zip
display more data about hard disks (geometry, number of primary/extended
partitions)
Diffstat (limited to 'perl-install')
-rwxr-xr-xperl-install/standalone/harddrake214
1 files changed, 14 insertions, 0 deletions
diff --git a/perl-install/standalone/harddrake2 b/perl-install/standalone/harddrake2
index 9afdcf78a..76aac7220 100755
--- a/perl-install/standalone/harddrake2
+++ b/perl-install/standalone/harddrake2
@@ -44,12 +44,14 @@ my %fields =
N("new dynamic device name generated by core kernel devfs") ],
#-PO Translators, here "module" is the "jargon term" for a kernel driver
"driver" => [ N("Module"), N("the module of the GNU/Linux kernel that handles the device") ],
+ "extended_partitions" => [ N("Extended partitions"), N("the number of extended partitions") ],
"flags" => [ N("Flags"), N("CPU flags reported by the kernel") ],
"fdiv_bug" => [ N("Fdiv bug"),
N("Early Intel Pentium chips manufactured have a bug in their floating point processor which did not achieve the required precision when performing a Floating point DIVision (FDIV)") ],
"fpu" => [ N("Is FPU present"), N("yes means the processor has an arithmetic coprocessor") ],
"fpu_exception" => [ N("Whether the FPU has an irq vector"), N("yes means the arithmetic coprocessor has an exception vector attached") ],
"f00f_bug" => [N("F00f bug"), N("early pentiums were buggy and freezed when decoding the F00F bytecode")],
+ "geometry" => [N("Geometry"), N("Cylinder/head/sectors geometry of the disk")],
"hlt_bug" => [ N("Halt bug"),
N("Some of the early i486DX-100 chips cannot reliably return to operating mode after the \"halt\" instruction is used") ],
@@ -63,6 +65,7 @@ my %fields =
"name" => [ N("Name"), N("the name of the CPU") ],
"port" => [N("Port"), N("network printer port")],
"processor" => [ N("Processor ID"), N("the number of the processor") ],
+ "primary_partitions" => [ N("Primary partitions"), N("the number of the primary partitions") ],
"stepping" => [ N("Model stepping"), N("stepping of the cpu (sub model (generation) number)") ],
"type" => [ N("Type"), N("the type of bus on which the mouse is connected") ],
"Vendor" => [ N("Vendor"), N("the vendor name of the device") ],
@@ -264,6 +267,9 @@ foreach (@classes) {
my $parent_iter = $tree_model->append_set(undef, [ 0 => gtkcreate_pixbuf($icon), 1 => $title, 2 => -1 ]);
+ my $all_hds;
+ $all_hds = fsedit::get_hds() if $Ident eq "HARDDISK";
+
# Fill the graphic tree with a "tree leaf" widget per device
foreach (@devices) {
# we really should test for $title there:
@@ -302,6 +308,14 @@ foreach (@classes) {
my $alternative_drivers = join(':', @$alter) if $alter->[0] ne 'unknown';
$_->{alternative_drivers} = $alternative_drivers if $alternative_drivers;
}
+ if ($Ident eq "HARDDISK") {
+ my $hd = $_;
+ my $info = find { $_->{device} eq $hd->{device} } @{$all_hds->{hds}};
+ $hd->{geometry} = join('/', map { $info->{geom}{$_} } qw(cylinders heads sectors)) . (" (CHS)");
+ $hd->{primary_partitions} = @{$info->{primary}{normal}};
+ $hd->{extended_partitions} = @{$info->{extended}};
+ delete $hd->{extended_partitions} if $hd->{extended_partitions} eq '0';
+ }
rename_field($_, 'usb_description', 'description');
rename_field($_, 'vendor_name', 'Vendor');
rename_field($_, 'usb_driver', 'driver');