Hey, On 11/02/2011 Olivier Berger wrote: > Hi. > > luksformat --help is unsupported. > > Still, it happens to invoke cryptsetup --help somehow, which won't report the > same as man luksformat. This is troublesome. > > Would it be possible to add a --help option that just reports the help/pod > message ? > > Thanks in advance.
attached patch fixes luksformat to invoke usage() when --help is given. it will be fixed with the next upload of cryptsetup. greetings, jonas
--- /usr/sbin/luksformat.orig 2011-01-14 00:01:00.000000000 +0100 +++ /usr/sbin/luksformat 2011-02-13 14:23:19.000000000 +0100 @@ -10,7 +10,7 @@ use Getopt::Long qw(:config pass_through); -sub help() { +sub usage() { print "luksformat - Create and format an encrypted LUKS device Usage: luksformat [-t <file system>] <device> [ mkfs options ]\n"; exit 1; @@ -20,7 +20,10 @@ $fs = 'vfat'; exit 1 unless GetOptions ('t|type=s' => \$fs); -help() if $#ARGV < 0; +GetOptions ('help', \$help); +if (($#ARGV < 0) || ($help)) { + usage(); +} if ($> != 0) { print STDERR "This program needs to be started as root\n";
signature.asc
Description: Digital signature