diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-08-03 05:41:59 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-08-03 05:41:59 +0000 |
commit | f8d30c05a05c1c01b3f8a758c54f4af07d7b114e (patch) | |
tree | 195d64c8532c126b49c0e71f649d08fbfe8f330b /perl-install/diskdrake | |
parent | 607de8e2fa2b83e8b9cefd4ced24d3b4e24fc007 (diff) | |
download | drakx-backup-do-not-use-f8d30c05a05c1c01b3f8a758c54f4af07d7b114e.tar drakx-backup-do-not-use-f8d30c05a05c1c01b3f8a758c54f4af07d7b114e.tar.gz drakx-backup-do-not-use-f8d30c05a05c1c01b3f8a758c54f4af07d7b114e.tar.bz2 drakx-backup-do-not-use-f8d30c05a05c1c01b3f8a758c54f4af07d7b114e.tar.xz drakx-backup-do-not-use-f8d30c05a05c1c01b3f8a758c54f4af07d7b114e.zip |
many functions in fsedit don't modify anything, they are simply accessors.
create fs::get and move them into it
- device2part(), up_mount_point() moved from fs to fs::get
- part2hd(), file2part(), has_mntpoint(), mntpoint2part(), empty_all_hds() moved from fsedit to fs::get
- fsedit::get_root() -> fs::get::root()
- fsedit::get_root_() -> fs::get::root_()
- fsedit::get_really_all_fstab() -> fs::get::really_all_fstab()
- fsedit::get_all_fstab_and_holes() -> fs::get::fstab_and_holes()
- fsedit::get_all_fstab() -> fs::get::fstab()
- fsedit::get_all_holes() -> fs::get::holes()
- fsedit::all_free_space -> fs::get::free_space()
- fsedit::get_really_all_fstab() -> fs::get::really_all_fstab()
- fsedit::get_fstab_and_holes() -> fs::get::hds_fstab_and_holes()
- fsedit::get_holes() -> fs::get::hds_holes()
- fsedit::get_fstab() -> fs::get::hds_fstab()
- fsedit::free_space() -> fs::get::hds_free_space()
- fsedit::get_visible_fstab() unused, removed
Diffstat (limited to 'perl-install/diskdrake')
-rw-r--r-- | perl-install/diskdrake/dav.pm | 2 | ||||
-rw-r--r-- | perl-install/diskdrake/hd_gtk.pm | 7 | ||||
-rw-r--r-- | perl-install/diskdrake/interactive.pm | 13 | ||||
-rw-r--r-- | perl-install/diskdrake/removable.pm | 1 | ||||
-rw-r--r-- | perl-install/diskdrake/smbnfs_gtk.pm | 4 |
5 files changed, 11 insertions, 16 deletions
diff --git a/perl-install/diskdrake/dav.pm b/perl-install/diskdrake/dav.pm index 7481cb631..1229d5f3f 100644 --- a/perl-install/diskdrake/dav.pm +++ b/perl-install/diskdrake/dav.pm @@ -4,8 +4,6 @@ use diagnostics; use strict; use diskdrake::interactive; use common; -use fsedit; -use fs; sub main { my ($in, $all_hds) = @_; diff --git a/perl-install/diskdrake/hd_gtk.pm b/perl-install/diskdrake/hd_gtk.pm index 8aff39d06..4af2a36a1 100644 --- a/perl-install/diskdrake/hd_gtk.pm +++ b/perl-install/diskdrake/hd_gtk.pm @@ -16,7 +16,6 @@ use raid; use any; use log; use fsedit; -use fs; my ($width, $height, $minwidth) = (400, 50, 5); my ($all_hds, $in, $do_force_reload, $current_kind, $current_entry, $update_all); @@ -76,7 +75,7 @@ sub main { $update_all = sub { $lock and return; $lock = 1; - partition_table::assign_device_numbers($_) foreach fsedit::all_hds($all_hds); + partition_table::assign_device_numbers($_) foreach fs::get::hds($all_hds); create_automatic_notebooks($notebook_widget); general_action_box($general_action_box, $nowizard, $interactive_help); per_kind_action_box($per_kind_action_box, $current_kind); @@ -217,7 +216,7 @@ sub current_kind_changed { my $v = $kind->{val}; my @parts = $kind->{type} eq 'raid' ? grep { $_ } @$v : - $kind->{type} eq 'loopback' ? @$v : fsedit::get_fstab_and_holes($v); + $kind->{type} eq 'loopback' ? @$v : fs::get::hds_fstab_and_holes($v); my $totalsectors = $kind->{type} =~ /raid|loopback/ ? sum(map { $_->{size} } @parts) : $v->{totalsectors}; create_buttons4partitions($kind, $totalsectors, @parts); @@ -341,7 +340,7 @@ sub filesystems_button_box() { sub createOrChangeType { my ($in, $fs_type, $hd, $part, $all_hds) = @_; - $part ||= !fsedit::get_fstab($hd) && + $part ||= !fs::get::hds_fstab($hd) && { pt_type => 0, start => 1, size => $hd->{totalsectors} - 1 }; $part or return; if ($fs_type eq 'other') { diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm index 53f006b87..5bf3e436c 100644 --- a/perl-install/diskdrake/interactive.pm +++ b/perl-install/diskdrake/interactive.pm @@ -15,7 +15,6 @@ use fsedit; use raid; use any; use log; -use fs; =begin @@ -184,14 +183,14 @@ sub main { while (1) { my $choose_txt = $current_part ? N_("Choose another partition") : N_("Choose a partition"); - my $parts_and_holes = [ fsedit::get_all_fstab_and_holes($all_hds) ]; + my $parts_and_holes = [ fs::get::fstab_and_holes($all_hds) ]; my $choose_part = sub { $current_part = $in->ask_from_listf('diskdrake', translate($choose_txt), sub { - my $hd = fsedit::part2hd($_[0] || return, $all_hds); + my $hd = fs::get::part2hd($_[0] || return, $all_hds); format_part_info_short($hd, $_[0]); }, $parts_and_holes, $current_part) || return; - $current_hd = fsedit::part2hd($current_part, $all_hds); + $current_hd = fs::get::part2hd($current_part, $all_hds); }; $choose_part->() if !$current_part; @@ -228,7 +227,7 @@ sub main { } else { $choose_part->(); } - partition_table::assign_device_numbers($_) foreach fsedit::all_hds($all_hds); + partition_table::assign_device_numbers($_) foreach fs::get::hds($all_hds); } return if eval { Done($in, $all_hds) }; if (my $err = $@) { @@ -604,7 +603,7 @@ sub Mount_point { my $mntpoint = $part->{mntpoint} || do { my $part_ = { %$part }; if (fsedit::suggest_part($part_, $all_hds)) { - fsedit::has_mntpoint('/', $all_hds) || $part_->{mntpoint} eq '/boot' ? $part_->{mntpoint} : '/'; + fs::get::has_mntpoint('/', $all_hds) || $part_->{mntpoint} eq '/boot' ? $part_->{mntpoint} : '/'; } else { '' } }; $in->ask_from_({ messages => @@ -973,7 +972,7 @@ sub Options { sub is_part_existing { my ($part, $all_hds) = @_; - $part && any { fsedit::are_same_partitions($part, $_) } fsedit::get_all_fstab_and_holes($all_hds); + $part && any { fsedit::are_same_partitions($part, $_) } fs::get::fstab_and_holes($all_hds); } sub modifyRAID { diff --git a/perl-install/diskdrake/removable.pm b/perl-install/diskdrake/removable.pm index d2c7ad32c..14eb26772 100644 --- a/perl-install/diskdrake/removable.pm +++ b/perl-install/diskdrake/removable.pm @@ -4,7 +4,6 @@ use diagnostics; use strict; use diskdrake::interactive; use common; -use fsedit; use fs; sub main { diff --git a/perl-install/diskdrake/smbnfs_gtk.pm b/perl-install/diskdrake/smbnfs_gtk.pm index 393245a8f..01b0074a1 100644 --- a/perl-install/diskdrake/smbnfs_gtk.pm +++ b/perl-install/diskdrake/smbnfs_gtk.pm @@ -4,7 +4,7 @@ use diagnostics; use strict; use any; -use fs; +use fs::get; use diskdrake::interactive; use common; use interactive; @@ -47,7 +47,7 @@ sub try_ { sub raw_hd_options { my ($in, $raw_hd) = @_; - diskdrake::interactive::Options($in, {}, $raw_hd, fsedit::empty_all_hds()); + diskdrake::interactive::Options($in, {}, $raw_hd, fs::get::empty_all_hds()); } sub raw_hd_mount_point { my ($in, $raw_hd) = @_; |