diff options
author | damien <damien@mandriva.com> | 2000-11-28 16:56:52 +0000 |
---|---|---|
committer | damien <damien@mandriva.com> | 2000-11-28 16:56:52 +0000 |
commit | 0880c7ba8ce88e87fa600aeb367a8f88a3ae71e7 (patch) | |
tree | 33f7ac905998f9ad6d85090f777ee4c0d0c67032 /perl-install/resize_fat/info_sector.pm | |
parent | d5c526273db473a7d87a26000585900fc10dda7d (diff) | |
download | drakx-0880c7ba8ce88e87fa600aeb367a8f88a3ae71e7.tar drakx-0880c7ba8ce88e87fa600aeb367a8f88a3ae71e7.tar.gz drakx-0880c7ba8ce88e87fa600aeb367a8f88a3ae71e7.tar.bz2 drakx-0880c7ba8ce88e87fa600aeb367a8f88a3ae71e7.tar.xz drakx-0880c7ba8ce88e87fa600aeb367a8f88a3ae71e7.zip |
branch to build the firewall install.topic/unlabeled-1.1.1
Diffstat (limited to 'perl-install/resize_fat/info_sector.pm')
-rw-r--r-- | perl-install/resize_fat/info_sector.pm | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/perl-install/resize_fat/info_sector.pm b/perl-install/resize_fat/info_sector.pm index c46ae15fc..1d9c1690a 100644 --- a/perl-install/resize_fat/info_sector.pm +++ b/perl-install/resize_fat/info_sector.pm @@ -1,4 +1,4 @@ -package resize_fat::info_sector; +package resize_fat::info_sector; # $Id$ use diagnostics; use strict; @@ -6,12 +6,13 @@ use strict; use common qw(:system); use resize_fat::io; +#- Oops, this will be unresizable on big-endian machine. trapped by signature. my $format = "a484 I I I a16"; my @fields = ( 'unused', - 'signature', # should be 0x61417272 - 'free_clusters', # -1 for unknown - 'next_cluster', # most recently allocated cluster + 'signature', #- should be 0x61417272 + 'free_clusters', #- -1 for unknown + 'next_cluster', #- most recently allocated cluster 'unused2', ); @@ -20,15 +21,15 @@ my @fields = ( sub read($) { my ($fs) = @_; - my $info = resize_fat::io::read($fs, $fs->{offset}, psizeof($format)); + my $info = resize_fat::io::read($fs, $fs->{info_offset}, psizeof($format)); @{$fs->{info_sector}}{@fields} = unpack $format, $info; - $fs->{info_sector}->{signature} == 0x61417272 or die "Invalid information sector signature\n"; + $fs->{info_sector}{signature} == 0x61417272 or die "Invalid information sector signature\n"; } sub write($) { my ($fs) = @_; - $fs->{info_sector}->{free_clusters} = $fs->{clusters}->{count}->{free}; - $fs->{info_sector}->{next_cluster} = 2; + $fs->{info_sector}{free_clusters} = $fs->{clusters}->{count}->{free}; + $fs->{info_sector}{next_cluster} = 2; my $info = pack $format, @{$fs->{info_sector}}{@fields}; |