X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=misc%2Ftest_vm%2Fscripts%2Fscan;fp=misc%2Ftest_vm%2Fscripts%2Fscan;h=0000000000000000000000000000000000000000;hp=cbfe6dc9d0c24e3b468be2c69d75db68f5b63d10;hb=a70930549d1b741704dd7af4e6bb0e89f6f8a519;hpb=afb634a80f946634454a5d067a92aa600227bd93 diff --git a/misc/test_vm/scripts/scan b/misc/test_vm/scripts/scan deleted file mode 100755 index cbfe6dc..0000000 --- a/misc/test_vm/scripts/scan +++ /dev/null @@ -1,29 +0,0 @@ -#! /usr/bin/perl - -# Scan a file for a 32-bit word with a particular value. -# $Revision: 1.1 $ - -use strict qw(refs vars); -use FileHandle; - -my $filename = shift @ARGV; -my $word_value = shift @ARGV; - -((defined $filename) && (defined $word_value)) - || die "Usage: scan \n"; - -my $fh = new FileHandle("<$filename"); -my $val = hex($word_value); - -my $buf = ' ' x 4; - -my $offset = 0; -while ( read( $fh, $buf, 4) == 4 ) { - my $out = unpack "V", $buf; - if ( $out == $val ) { - print "Found value $word_value at offset $offset\n"; - exit; - } - $offset += 4; -} -print "Didn't find value $word_value\n";