summaryrefslogtreecommitdiffstats
path: root/perl-install/swap.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-07-23 02:00:02 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-07-23 02:00:02 +0000
commit073e42bbfcd75d102a71e328f12b3ab3eeb7d047 (patch)
tree9d231c54862926160aa220972612c95920089709 /perl-install/swap.pm
parent7a399c64f3a1ea29198e94dec585271c20861a1b (diff)
downloaddrakx-073e42bbfcd75d102a71e328f12b3ab3eeb7d047.tar
drakx-073e42bbfcd75d102a71e328f12b3ab3eeb7d047.tar.gz
drakx-073e42bbfcd75d102a71e328f12b3ab3eeb7d047.tar.bz2
drakx-073e42bbfcd75d102a71e328f12b3ab3eeb7d047.tar.xz
drakx-073e42bbfcd75d102a71e328f12b3ab3eeb7d047.zip
- move format related functions out of fs.pm to new module fs/format.pm
- remove swap.pm, moving its few functions to fs/format.pm or fs.pm
Diffstat (limited to 'perl-install/swap.pm')
-rw-r--r--perl-install/swap.pm32
1 files changed, 0 insertions, 32 deletions
diff --git a/perl-install/swap.pm b/perl-install/swap.pm
deleted file mode 100644
index 564513ad9..000000000
--- a/perl-install/swap.pm
+++ /dev/null
@@ -1,32 +0,0 @@
-package swap; # $Id$
-
-use diagnostics;
-use strict;
-
-use common;
-use log;
-use devices;
-
-sub make {
- my ($dev, $checkBlocks) = @_;
- run_program::raw({ timeout => 60 * 60 }, "mkswap", if_($checkBlocks, '-c'), devices::make($dev)) or die N("%s formatting of %s failed", 'swap', $dev);
-}
-
-sub enable {
- my ($dev, $checkBlocks) = @_;
- make($dev, $checkBlocks);
- swapon($dev);
-}
-
-sub swapon {
- my ($dev) = @_;
- log::l("swapon called with $dev");
- syscall_('swapon', devices::make($dev), 0) or die "swapon($dev) failed: $!";
-}
-
-sub swapoff($) {
- my ($dev) = @_;
- syscall_('swapoff', devices::make($dev)) or die "swapoff($dev) failed: $!";
-}
-
-1;