/[mdap]/bin/fw-info.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /bin/fw-info.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 16 - (hide annotations)
Mon Apr 23 17:41:34 2007 UTC (16 years, 11 months ago) by dpavlin
Original Path: fw-info.pl
File MIME type: text/plain
File size: 398 byte(s)
output version <tab> and firmware path
1 dpavlin 5 #!/usr/bin/perl -w
2    
3     # fw-info.pl
4     #
5     # 04/22/07 16:33:13 CEST Dobrica Pavlinusic <dpavlin@rot13.org>
6    
7     use strict;
8     use Data::Dump qw/dump/;
9    
10 dpavlin 6 my $path = shift @ARGV || '/srv/tftp/BANT-R'; # die "Usage: $0 firmware.bin\n";
11 dpavlin 5
12     open(my $fh, $path) || die "Can't open $path: $!";
13     my $ver;
14     seek($fh, 32, 0) || die "can't seek to 32: $!";
15 dpavlin 6 read($fh, $ver, 4);
16 dpavlin 16 print join('.',unpack('CCCC', $ver)),"\t$path\n";
17 dpavlin 5

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26