projects
/
Biblio-RFID.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4d393c8
)
added --afi to set security after writing blocks
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Tue, 3 Aug 2010 11:06:22 +0000
(13:06 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Tue, 3 Aug 2010 11:06:22 +0000
(13:06 +0200)
scripts/program.pl
patch
|
blob
|
history
diff --git
a/scripts/program.pl
b/scripts/program.pl
index
d7d5629
..
122a81a
100755
(executable)
--- a/
scripts/program.pl
+++ b/
scripts/program.pl
@@
-10,9
+10,11
@@
use RFID::Biblio::Readers;
use RFID::Biblio::RFID501;
my $reader;
+my $afi;
GetOptions(
'reader=s', => \$reader,
+ 'afi=i', => \$afi,
) || die $!;
my ( $sid, $content ) = @ARGV;
@@
-26,6
+28,7
@@
foreach my $rfid ( @rfid ) {
next unless $tag eq $sid;
warn "PROGRAM $tag with $content\n";
$rfid->write_blocks( $tag => RFID::Biblio::RFID501->from_hash({ content => $content }) );
+ $rfid->write_afi( $tag => chr($afi) ) if $afi;
}
}