http://git.etherboot.org
/
people
/
mcb30
/
gpxe.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dccb835
)
Quick utility to pad floppy disk images for vmware/qemu
author
Michael Brown
<mcb30@etherboot.org>
Wed, 23 Aug 2006 03:07:41 +0000
(
03:07
+0000)
committer
Michael Brown
<mcb30@etherboot.org>
Wed, 23 Aug 2006 03:07:41 +0000
(
03:07
+0000)
src/util/dskpad.pl
[new file with mode: 0755]
patch
|
blob
diff --git a/src/util/dskpad.pl
b/src/util/dskpad.pl
new file mode 100755
(executable)
index 0000000..
3ae325e
--- /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";
+}