summaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
authorMichael Brown2006-08-23 05:07:41 +0200
committerMichael Brown2006-08-23 05:07:41 +0200
commitcddf8df8d4522f2fbc42520e9bfde9325caf0f56 (patch)
treedb9a6fc1324e0f514a685df210dde1fa9363e938 /src/util
parentFixed a bug in the TCP state machine. Added a transition from ESTABLISHED to ... (diff)
downloadipxe-cddf8df8d4522f2fbc42520e9bfde9325caf0f56.tar.gz
ipxe-cddf8df8d4522f2fbc42520e9bfde9325caf0f56.tar.xz
ipxe-cddf8df8d4522f2fbc42520e9bfde9325caf0f56.zip
Quick utility to pad floppy disk images for vmware/qemu
Diffstat (limited to 'src/util')
-rwxr-xr-xsrc/util/dskpad.pl12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/util/dskpad.pl b/src/util/dskpad.pl
new file mode 100755
index 00000000..3ae325eb
--- /dev/null
+++ b/src/util/dskpad.pl
@@ -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";
+}