added comment option
authorHeiko Schlittermann (JUMPER) <hs@schlittermann.de>
Sun, 31 Jul 2011 16:23:14 +0200
changeset 41 6bf98af421f3
parent 40 b8f8ec90c296
child 42 b5db10953648
added comment option
bin/imager.save
--- a/bin/imager.save	Sun Jul 31 16:10:24 2011 +0200
+++ b/bin/imager.save	Sun Jul 31 16:23:14 2011 +0200
@@ -33,6 +33,7 @@
     verbose   => undef,
     blocksize => 4 * MiB,
     pass      => undef,
+    comment   => undef,
 );
 lock_keys(%o);
 
@@ -48,6 +49,7 @@
                 -noperldoc => system("perldoc -V >/dev/null 2>&1")
             );
         },
+	"c|comment=s" => \$o{comment},
         "z|compress:i" => sub { $o{compress} = $_[1] ? $_[1] : Z_BEST_SPEED },
 	"p|pass=s"  => \$o{pass},
         "b|blocksize=s" => sub {
@@ -107,6 +109,8 @@
 devsize: $size
 timestamp: @{[NOW]}
 datetime: @{[DATETIME]}
+comment: @{[$o{comment}//"none"]}
+encryption: @{[$o{pass} ? CIPHER : "none"]}
 
 __EOT
 
@@ -244,6 +248,10 @@
 
 The blocksize used. (may be suffixed with K, M, G). (default: 4 MiB)
 
+=item B<-c> I<comment> | B<--comment>=I<comment>
+
+Comment to be included in the header of the index file. (default: none)
+
 =item B<-p> I<pass> | B<--pass>=I<pass>
 
 Use symmetric encryption for writing the data blocks. This option