summaryrefslogtreecommitdiffstats
path: root/perl-install/resize_fat/info_sector.pm
diff options
context:
space:
mode:
authorMystery Man <unknown@mandriva.org>1999-09-29 14:13:47 +0000
committerMystery Man <unknown@mandriva.org>1999-09-29 14:13:47 +0000
commit229435ccf04db72401bb5df7d3b015565952fcc5 (patch)
tree16ffcdb570219012938b771f1b9ab064114d2b5f /perl-install/resize_fat/info_sector.pm
parentec5cc80aff948eceee5b322bc19cf3e4e65a7c3a (diff)
downloaddrakx-backup-do-not-use-229435ccf04db72401bb5df7d3b015565952fcc5.tar
drakx-backup-do-not-use-229435ccf04db72401bb5df7d3b015565952fcc5.tar.gz
drakx-backup-do-not-use-229435ccf04db72401bb5df7d3b015565952fcc5.tar.bz2
drakx-backup-do-not-use-229435ccf04db72401bb5df7d3b015565952fcc5.tar.xz
drakx-backup-do-not-use-229435ccf04db72401bb5df7d3b015565952fcc5.zip
This commit was manufactured by cvs2svn to create tag 'V1_0'.V1_0
Diffstat (limited to 'perl-install/resize_fat/info_sector.pm')
-rw-r--r--perl-install/resize_fat/info_sector.pm36
1 files changed, 0 insertions, 36 deletions
diff --git a/perl-install/resize_fat/info_sector.pm b/perl-install/resize_fat/info_sector.pm
deleted file mode 100644
index 3a6f7cfed..000000000
--- a/perl-install/resize_fat/info_sector.pm
+++ /dev/null
@@ -1,36 +0,0 @@
-package resize_fat::info_sector;
-
-use diagnostics;
-use strict;
-
-use common qw(:system);
-use resize_fat::io;
-
-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);
-}