From: Ben Pfaff Date: Tue, 14 Sep 2004 21:33:57 +0000 (+0000) Subject: No longer needed. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=699cc55d013247b637f8871172406c3d9b6df52d;p=pintos-anon No longer needed. --- diff --git a/src/pad b/src/pad deleted file mode 100755 index 82f35d3..0000000 --- a/src/pad +++ /dev/null @@ -1,20 +0,0 @@ -#! /usr/bin/perl - -if (@ARGV != 1) { - print STDERR "pad, for padding a file out to an even block size\n"; - print STDERR "usage: pad BLOCKSIZE < INPUT > OUTPUT\n\n"; - print STDERR "pad copies its input to its output, then writes\n"; - print STDERR "zeroes to its output as necessary to make the\n"; - print STDERR "output size an even multiple of BLOCKSIZE bytes\n"; - exit 1; -} - -$blocksize = $ARGV[0]; -$input_size = 0; -while (read (STDIN, $input, 4096)) { - $input_size += length ($input); - print $input; -} - -$odd_bytes = $input_size % $blocksize; -print "\0" x ($blocksize - $odd_bytes) if $odd_bytes != 0;