2
0
mirror of https://github.com/xcat2/xNBA.git synced 2024-12-15 07:41:45 +00:00
xNBA/src/util/dskpad.pl

13 lines
318 B
Perl
Raw Normal View History

#!/usr/bin/perl -w
use strict;
use warnings;
use constant FLOPPYSIZE => 1440 * 1024;
while ( my $filename = shift ) {
die "$filename is not a file\n" unless -f $filename;
die "$filename is too large\n" unless ( -s $filename <= FLOPPYSIZE );
truncate $filename, FLOPPYSIZE or die "Could not truncate: $!\n";
}