mirror of
https://github.com/xcat2/xNBA.git
synced 2024-11-25 19:08:35 +00:00
Quick utility to pad floppy disk images for vmware/qemu
This commit is contained in:
parent
dccb8358bd
commit
cddf8df8d4
12
src/util/dskpad.pl
Executable file
12
src/util/dskpad.pl
Executable 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";
|
||||
}
|
Loading…
Reference in New Issue
Block a user