Merge tag 'upstream/3.3.1'
[debian/amanda] / device-src / amdevcheck.pl
index fe47f3a3352839b4720d441f041bdb2ddf9a11f3..78392643d378bc6d555307cd3c2a8b56121ed19f 100644 (file)
@@ -1,5 +1,5 @@
 #! @PERL@
-# Copyright (c) 2009 Zmanda, Inc.  All Rights Reserved.
+# Copyright (c) 2009, 2010 Zmanda, Inc.  All Rights Reserved.
 #
 # This program is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License version 2 as published
@@ -21,6 +21,7 @@ use lib '@amperldir@';
 use Getopt::Long;
 
 use strict;
+use warnings;
 use Amanda::Device qw( :constants );
 use Amanda::Config qw( :getconf :init );
 use Amanda::Debug qw( :logging );
@@ -78,7 +79,7 @@ sub print_result {
 
 sub usage {
     print <<EOF;
-Usage: amdevcheck <config> [ <device name> ] [ --properties {prop1,prop2,prop3} ]
+Usage: amdevcheck [--label] [--properties {prop1,prop2,prop3}] [-o configoption]* <config> [<device name>]
 EOF
     exit(1);
 }
@@ -92,8 +93,10 @@ my $getproplist;
 my $device_name;
 my $print_label;
 
+debug("Arguments: " . join(' ', @ARGV));
 Getopt::Long::Configure(qw(bundling));
 GetOptions(
+    'version' => \&Amanda::Util::version_opt,
     'help|usage|?' => \&usage,
     'o=s' => sub { add_config_override_opt($config_overrides, $_[1]); },
     'properties:s' => \$getproplist,