print size of unmodified bin file

git-svn-id: http://svn.code.sf.net/p/netboot65/code@63 93682198-c243-4bdb-bd91-e943c89aac3b
This commit is contained in:
jonnosan 2009-03-27 13:16:58 +00:00
parent 02338db04a
commit 3d4ee4ecf2

View File

@ -11,8 +11,9 @@ if filename.nil? then
exit
end
puts "fixing length of #{filename} to #{FILE_LENGTH} bytes"
infile=File.open(filename,"rb").read
puts "fixing length of #{filename} from #{infile.length} to #{FILE_LENGTH} bytes"
outfile=File.open(filename,"wb")
outfile<<infile
outfile<<PAD_BYTE*(FILE_LENGTH-infile.length)