summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-06-03 07:05:35 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-06-03 07:05:35 +0000
commite842236c2abecc1bdb069a9fa9e96fe89849e36c (patch)
treeec9e89299cfed055765403244e28d0e278181633
parentdf93256cccd635dfbcaffe5d3240956bdd60ecb4 (diff)
downloaddrakx-backup-do-not-use-e842236c2abecc1bdb069a9fa9e96fe89849e36c.tar
drakx-backup-do-not-use-e842236c2abecc1bdb069a9fa9e96fe89849e36c.tar.gz
drakx-backup-do-not-use-e842236c2abecc1bdb069a9fa9e96fe89849e36c.tar.bz2
drakx-backup-do-not-use-e842236c2abecc1bdb069a9fa9e96fe89849e36c.tar.xz
drakx-backup-do-not-use-e842236c2abecc1bdb069a9fa9e96fe89849e36c.zip
drop old unused code
-rw-r--r--perl-install/devices.pm44
-rw-r--r--perl-install/diskdrake/interactive.pm4
2 files changed, 0 insertions, 48 deletions
diff --git a/perl-install/devices.pm b/perl-install/devices.pm
index 513c1714a..c5ee94c04 100644
--- a/perl-install/devices.pm
+++ b/perl-install/devices.pm
@@ -8,31 +8,6 @@ use run_program;
use log;
use c;
-sub size {
- my ($dev) = @_;
- sysopen(my $F, $dev, 0) or log::l("open $dev: $!"), return 0;
-
- my $valid_offset = sub { sysseek($F, $_[0], 0) && sysread($F, my $_a, 1) };
-
- #- first try getting the size nicely
- if (my $size = c::total_sectors(fileno $F)) {
- return $size * $common::SECTORSIZE;
- }
-
- #- sad it did not work, well searching the size using the dichotomy algorithm!
- my $low = 0;
- my ($high, $mid);
-
- #- first find n where 2^n < size <= 2^n+1
- for ($high = 1; $high > 0 && $valid_offset->($high); $high *= 2) { $low = $high }
-
- while ($low < $high - 1) {
- $mid = int(($low + $high) / 2);
- $valid_offset->($mid) ? $low : $high = $mid;
- }
- $low + 1;
-}
-
sub del_loop {
my ($dev) = @_;
run_program::run("losetup", "-d", $dev);
@@ -242,25 +217,6 @@ sub read_proc_partitions_raw() {
} @all;
}
-sub from_devfs {
- my ($dev) = @_;
- my %from_devfs = reverse %to_devfs;
- if (my $r = $from_devfs{$dev}) {
- return $r;
- } elsif ($dev =~ /(.*?)(\d+)$/) {
- my %from_devfs_prefix = reverse %to_devfs_prefix;
- my $r = $from_devfs_prefix{$1};
- return "$r$2" if $r;
- }
- $dev = "/dev/" . $dev;
- if (-e $dev) {
- my ($major, $minor) = unmakedev((stat($dev))[6]);
- my $r = find { $_->{major} == $major && $_->{minor} == $minor } read_proc_partitions_raw();
- $r and return $r->{dev};
- }
- undef;
-}
-
sub simple_partition_scan {
my ($part) = @_;
$part->{device} =~ /([hs]d[a-z])(\d+)$/;
diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm
index 404dd9c79..fb757c6f3 100644
--- a/perl-install/diskdrake/interactive.pm
+++ b/perl-install/diskdrake/interactive.pm
@@ -1105,10 +1105,6 @@ sub write_partitions {
1;
}
-sub unmount {
- my ($_hd, $part) = @_;
- fs::umount_part($part);
-}
sub format_ {
my ($in, $hd, $part, $all_hds) = @_;
write_partitions($in, $_) or return foreach isRAID($part) ? @{$all_hds->{hds}} : $hd;