utils/chsmack: fix hazardous option parsing
authorJosé Bollo <jose.bollo@eurogiciel.fr>
Mon, 21 Oct 2013 10:18:50 +0000 (12:18 +0200)
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Wed, 23 Oct 2013 05:41:32 +0000 (08:41 +0300)
commitb7df87836ea1249ee15fb66de8fa9cb5ccc70430
tree3bd8b4a1525650fe7d74be6ec10e0471908c4cd1
parentb5693576f06eea0c7a925f75a1aafdd79186884f
utils/chsmack: fix hazardous option parsing

The variable option_index was only set to a proper value if the
given option is a long option. There was also exit() missing on
error condition if SMACK label was invalid.

This patch removes option_index, parameter name from corresponding
error message and adds exit() call when the error condition
realizes.

[jarkko.sakkinen@linux.intel.com: rewrote patch description]
(cherry picked from commit 18ebc2fe71da94599e45029d7b26144c6bbe7cb4)
utils/chsmack.c