Add parameter name back to the chsmack error message
authorJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Tue, 22 Oct 2013 19:26:26 +0000 (22:26 +0300)
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Wed, 23 Oct 2013 05:41:45 +0000 (08:41 +0300)
commita7912aa1423314fe3a7d49352f306993b9778f8a
tree2f16edd02735d24161c8aeb2bfa3588e72366cf8
parentb7df87836ea1249ee15fb66de8fa9cb5ccc70430
Add parameter name back to the chsmack error message

This patch add parameter name back to the error message. Instead
of relaying on hazardous longindex parameter of getopt_long(), a
look-up table is constructed to map short option to the corresponding
struct option entry.

Additionally, the basename of the application is added to the error
message. Also usage message is converted to use basename instead of
the full path name.
(cherry picked from commit d98a04ff7ccbcfcf36d9d4d43de68448b70da9fa)
utils/chsmack.c