summaryrefslogtreecommitdiffstats
path: root/perl-install/fs.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-11-06 13:20:21 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-11-06 13:20:21 +0000
commit9091151d546e5d749b47e2efce3ff651784fcc8c (patch)
tree2be2bec5e60f21ffe431eeef74095896ae5efe7f /perl-install/fs.pm
parent68a1a2a6f2b9fdb1fd0c833cd9b3d8dcb9d8fd5c (diff)
downloaddrakx-backup-do-not-use-9091151d546e5d749b47e2efce3ff651784fcc8c.tar
drakx-backup-do-not-use-9091151d546e5d749b47e2efce3ff651784fcc8c.tar.gz
drakx-backup-do-not-use-9091151d546e5d749b47e2efce3ff651784fcc8c.tar.bz2
drakx-backup-do-not-use-9091151d546e5d749b47e2efce3ff651784fcc8c.tar.xz
drakx-backup-do-not-use-9091151d546e5d749b47e2efce3ff651784fcc8c.zip
replace "_" with "N" and "__" with "N_"
rationale: - currently, we use _("xxx") as a shorthand for gettext("xxx"). It also used to call xgettext with --keyword=_ - alas, function &_ is global and not by package (notice esp. that _ is not exported in common.pm) - this lead to big ugly pb with packages defining their own &_, overriding common.pm's &_ - a fix is to set @::textdomains to add a new domain (the default being "libDrakX") but relying on the global "_" is still dangerous!
Diffstat (limited to 'perl-install/fs.pm')
-rw-r--r--perl-install/fs.pm22
1 files changed, 11 insertions, 11 deletions
diff --git a/perl-install/fs.pm b/perl-install/fs.pm
index 57e1cfb26..67a56c609 100644
--- a/perl-install/fs.pm
+++ b/perl-install/fs.pm
@@ -544,8 +544,8 @@ sub format_ext2($@) {
my ($dev, @options) = @_;
$dev =~ m,(rd|ida|cciss)/, and push @options, qw(-b 4096 -R stride=16); #- For RAID only.
push @options, qw(-b 1024 -O none) if arch() =~ /alpha/;
- run_program::run('mke2fs', '-F', @options, devices::make($dev)) or die _("%s formatting of %s failed", "ext2", $dev);
- run_program::run('mke2fs', '-F', @options, devices::make($dev)) or die _("%s formatting of %s failed", grep { $_ eq '-j' } @options ? "ext3" : "ext2", $dev);
+ run_program::run('mke2fs', '-F', @options, devices::make($dev)) or die N("%s formatting of %s failed", "ext2", $dev);
+ run_program::run('mke2fs', '-F', @options, devices::make($dev)) or die N("%s formatting of %s failed", grep { $_ eq '-j' } @options ? "ext3" : "ext2", $dev);
}
sub format_ext3 {
my ($dev, @options) = @_;
@@ -555,23 +555,23 @@ sub format_ext3 {
sub format_reiserfs {
my ($dev, @options) = @_;
#TODO add -h tea
- run_program::run("mkreiserfs", "-ff", @options, devices::make($dev)) or die _("%s formatting of %s failed", "reiserfs", $dev);
+ run_program::run("mkreiserfs", "-ff", @options, devices::make($dev)) or die N("%s formatting of %s failed", "reiserfs", $dev);
}
sub format_xfs {
my ($dev, @options) = @_;
- run_program::run("mkfs.xfs", "-f", "-q", @options, devices::make($dev)) or die _("%s formatting of %s failed", "xfs", $dev);
+ run_program::run("mkfs.xfs", "-f", "-q", @options, devices::make($dev)) or die N("%s formatting of %s failed", "xfs", $dev);
}
sub format_jfs {
my ($dev, @options) = @_;
- run_program::run("mkfs.jfs", "-f", @options, devices::make($dev)) or die _("%s formatting of %s failed", "jfs", $dev);
+ run_program::run("mkfs.jfs", "-f", @options, devices::make($dev)) or die N("%s formatting of %s failed", "jfs", $dev);
}
sub format_dos {
my ($dev, @options) = @_;
- run_program::run("mkdosfs", @options, devices::make($dev)) or die _("%s formatting of %s failed", "dos", $dev);
+ run_program::run("mkdosfs", @options, devices::make($dev)) or die N("%s formatting of %s failed", "dos", $dev);
}
sub format_hfs {
my ($dev, @options) = @_;
- run_program::run("hformat", @options, devices::make($dev)) or die _("%s formatting of %s failed", "HFS", $dev);
+ run_program::run("hformat", @options, devices::make($dev)) or die N("%s formatting of %s failed", "HFS", $dev);
}
sub real_format_part {
my ($part) = @_;
@@ -608,7 +608,7 @@ sub real_format_part {
my $check_blocks = grep { /^-c$/ } @options;
swap::make($dev, $check_blocks);
} else {
- die _("I don't know how to format %s in type %s", $part->{device}, type2name($part->{type}));
+ die N("I don't know how to format %s in type %s", $part->{device}, type2name($part->{type}));
}
$part->{isFormatted} = 1;
}
@@ -682,7 +682,7 @@ sub mount {
my @fs_modules = qw(vfat hfs romfs ufs reiserfs xfs jfs ext3);
if (member($fs, 'smb', 'smbfs', 'nfs', 'davfs', 'ntfs') && $::isStandalone) {
- system('mount', '-t', $fs, $dev, $where, if_($options, '-o', $options)) == 0 or die _("mounting partition %s in directory %s failed", $dev, $where);
+ system('mount', '-t', $fs, $dev, $where, if_($options, '-o', $options)) == 0 or die N("mounting partition %s in directory %s failed", $dev, $where);
return; #- do not update mtab, already done by mount(8)
} elsif (member($fs, 'ext2', 'proc', 'usbdevfs', 'iso9660', @fs_modules)) {
$where =~ s|/$||;
@@ -725,7 +725,7 @@ sub mount {
eval { modules::load('isofs') };
}
log::l("calling mount($dev, $where, $fs, $flag, $mount_opt)");
- syscall_('mount', $dev, $where, $fs, $flag, $mount_opt) or die _("mounting partition %s in directory %s failed", $dev, $where) . " ($!)";
+ syscall_('mount', $dev, $where, $fs, $flag, $mount_opt) or die N("mounting partition %s in directory %s failed", $dev, $where) . " ($!)";
} else {
log::l("skipping mounting $fs partition");
return;
@@ -740,7 +740,7 @@ sub umount {
my ($mntpoint) = @_;
$mntpoint =~ s|/$||;
log::l("calling umount($mntpoint)");
- syscall_('umount', $mntpoint) or die _("error unmounting %s: %s", $mntpoint, "$!");
+ syscall_('umount', $mntpoint) or die N("error unmounting %s: %s", $mntpoint, "$!");
substInFile { $_ = '' if /(^|\s)$mntpoint\s/ } '/etc/mtab'; #- don't care about error, if we can't read, we won't manage to write... (and mess mtab)
}