Sfoglia il codice sorgente

Quick utility to pad floppy disk images for vmware/qemu

tags/v0.9.3
Michael Brown 18 anni fa
parent
commit
cddf8df8d4
1 ha cambiato i file con 12 aggiunte e 0 eliminazioni
  1. 12
    0
      src/util/dskpad.pl

+ 12
- 0
src/util/dskpad.pl Vedi File

@@ -0,0 +1,12 @@
1
+#!/usr/bin/perl -w
2
+
3
+use strict;
4
+use warnings;
5
+
6
+use constant FLOPPYSIZE => 1440 * 1024;
7
+
8
+while ( my $filename = shift ) {
9
+  die "$filename is not a file\n" unless -f $filename;
10
+  die "$filename is too large\n" unless ( -s $filename <= FLOPPYSIZE );
11
+  truncate $filename, FLOPPYSIZE or die "Could not truncate: $!\n";
12
+}

Loading…
Annulla
Salva