diff options
| author | Mystery Man <unknown@mandriva.org> | 2002-07-08 07:45:08 +0000 |
|---|---|---|
| committer | Mystery Man <unknown@mandriva.org> | 2002-07-08 07:45:08 +0000 |
| commit | 93fcd1d443d69857dc3c5d859a73f593d4e12d70 (patch) | |
| tree | c1fd7550aaa100db9c8cafab358531978b6386d8 /perl-install/resize_fat/info_sector.pm | |
| parent | 9555bb791920e8feace953f90cf908e864451b59 (diff) | |
| download | drakx-93fcd1d443d69857dc3c5d859a73f593d4e12d70.tar drakx-93fcd1d443d69857dc3c5d859a73f593d4e12d70.tar.gz drakx-93fcd1d443d69857dc3c5d859a73f593d4e12d70.tar.bz2 drakx-93fcd1d443d69857dc3c5d859a73f593d4e12d70.tar.xz drakx-93fcd1d443d69857dc3c5d859a73f593d4e12d70.zip | |
This commit was manufactured by cvs2svn to create tag 'V1_1_8_1mdk'.V1_1_8_1mdk
Diffstat (limited to 'perl-install/resize_fat/info_sector.pm')
| -rw-r--r-- | perl-install/resize_fat/info_sector.pm | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/perl-install/resize_fat/info_sector.pm b/perl-install/resize_fat/info_sector.pm deleted file mode 100644 index 35449cedc..000000000 --- a/perl-install/resize_fat/info_sector.pm +++ /dev/null @@ -1,37 +0,0 @@ -package resize_fat::info_sector; # $Id$ - -use diagnostics; -use strict; - -use common; -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 - 'unused2', -); - -1; - - -sub read($) { - my ($fs) = @_; - 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"; -} - -sub write($) { - my ($fs) = @_; - $fs->{info_sector}{free_clusters} = $fs->{clusters}->{count}->{free}; - $fs->{info_sector}{next_cluster} = 2; - - my $info = pack $format, @{$fs->{info_sector}}{@fields}; - - resize_fat::io::write($fs, $fs->{info_offset}, psizeof($format), $info); -} |
