summaryrefslogtreecommitdiffstats
path: root/perl-install/swap.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-07-24 23:53:47 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-07-24 23:53:47 +0000
commitee0a30f1cc747b64d28731c07253d9eb04c0e028 (patch)
tree7a8a76d20e83008c67409ce880fcad85cb8fbd70 /perl-install/swap.pm
parentcfd1f7291b42cede75112ed811053612fa1f2c1c (diff)
downloaddrakx-ee0a30f1cc747b64d28731c07253d9eb04c0e028.tar
drakx-ee0a30f1cc747b64d28731c07253d9eb04c0e028.tar.gz
drakx-ee0a30f1cc747b64d28731c07253d9eb04c0e028.tar.bz2
drakx-ee0a30f1cc747b64d28731c07253d9eb04c0e028.tar.xz
drakx-ee0a30f1cc747b64d28731c07253d9eb04c0e028.zip
temporary hack to have at least good UTF-8 based locales (otherwise rpmlib segfaults)
Diffstat (limited to 'perl-install/swap.pm')
-rw-r--r--perl-install/swap.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/perl-install/swap.pm b/perl-install/swap.pm
index 2c26485ea..7b7597c10 100644
--- a/perl-install/swap.pm
+++ b/perl-install/swap.pm
@@ -3,6 +3,7 @@ package swap; # $Id$
use diagnostics;
use strict;
+use MDK::Common::DataStructure;
use common;
use log;
use devices;
@@ -100,14 +101,14 @@ sub make($;$) {
$version == 0 and !vec($signature_page, 0, 1) and die "bad block on first page";
vec($signature_page, 0, 1) = 0;
- $version == 1 and strcpy($signature_page, pack($signature_format_v1, $version, $nbpages - 1, $badpages));
+ $version == 1 and MDK::Common::DataStructure::strcpy($signature_page, pack($signature_format_v1, $version, $nbpages - 1, $badpages));
my $goodpages = $nbpages - $badpages - 1;
$goodpages > 0 or die "all blocks are bad";
log::l("Setting up swapspace on $devicename version $version, size = " . $goodpages * $pagesize . " bytes");
- strcpy($signature_page, $version == 0 ? "SWAP-SPACE" : "SWAPSPACE2", $pagesize - 10);
+ MDK::Common::DataStructure::strcpy($signature_page, $version == 0 ? "SWAP-SPACE" : "SWAPSPACE2", $pagesize - 10);
my $offset = ($version == 0) ? 0 : 1024;
sysseek(F, $offset, 0) or die "unable to rewind swap-device: $!";