Quick utility to pad floppy disk images for vmware/qemu

pull/1/head
Michael Brown 2006-08-23 03:07:41 +00:00
parent dccb8358bd
commit cddf8df8d4
1 changed files with 12 additions and 0 deletions

12
src/util/dskpad.pl 100755
View File

@ -0,0 +1,12 @@
#!/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";
}