summaryrefslogtreecommitdiffstats
path: root/perl-install/resize_fat/boot_sector.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/resize_fat/boot_sector.pm')
-rw-r--r--perl-install/resize_fat/boot_sector.pm10
1 files changed, 5 insertions, 5 deletions
diff --git a/perl-install/resize_fat/boot_sector.pm b/perl-install/resize_fat/boot_sector.pm
index c87328637..f93647579 100644
--- a/perl-install/resize_fat/boot_sector.pm
+++ b/perl-install/resize_fat/boot_sector.pm
@@ -1,4 +1,4 @@
-package resize_fat::boot_sector; # $Id$
+package resize_fat::boot_sector;
use diagnostics;
use strict;
@@ -51,13 +51,13 @@ sub read($) {
my ($fs) = @_;
my $boot = eval { resize_fat::io::read($fs, 0, $SECTORSIZE) }; $@ and die "reading boot sector failed on device $fs->{fs_name}";
- @{$fs}{@fields} = unpack $format, $boot;
+ @$fs{@fields} = unpack $format, $boot;
$fs->{nb_sectors} = $fs->{small_nb_sectors} || $fs->{big_nb_sectors};
$fs->{cluster_size} = $fs->{cluster_size_in_sectors} * $fs->{sector_size};
$fs->{boot_sign} == 0xAA55 or die "Invalid signature for a MS-based filesystem.\n";
- $fs->{nb_sectors} < 32 and die "Too few sectors for viable file system\n";
+ $fs->{nb_sectors} < 32 and die "Too few sectors for viable filesystem\n";
$fs->{nb_fats} == 2 or cdie "Weird number of FATs: $fs->{nb_fats}, not 2.\n";
$fs->{sector_size} == 512 or cdie "Strange sector_size != 512\n";
@@ -87,7 +87,7 @@ sub read($) {
$fs->{nb_fat_entries} = divide($fs->{fat_size}, $fs->{fs_type_size} / 8);
- #- - 2 because clusters 0 & 1 doesn't exist
+ #- - 2 because clusters 0 & 1 does not exist
$fs->{nb_clusters} = divide($fs->{nb_sectors} * $fs->{sector_size} - $fs->{cluster_offset}, $fs->{cluster_size}) - 2;
$fs->{dir_entries_per_cluster} = divide($fs->{cluster_size}, psizeof($format));
@@ -98,7 +98,7 @@ sub read($) {
sub write($) {
my ($fs) = @_;
- my $boot = pack($format, @{$fs}{@fields});
+ my $boot = pack($format, @$fs{@fields});
eval { resize_fat::io::write($fs, 0, $SECTORSIZE, $boot) }; $@ and die "writing the boot sector failed on device $fs->{fs_name}";