app: Change argument parsing and error handling

This modifies the way the application parses arguments and performs
error handling when invalid options are passed. There is no functional
change to the application aside from the error message that is printed
when incorrect options are passed.

If you do not pass a VPD file:

$ openpower-read-vpd --fru BMC --object /system/chassis/motherboard/bmc
VPD file required (--vpd=<filename>)

If you pass a VPD but no --object or --fru options:

$ openpower-read-vpd --vpd vpdfile
No task to perform

  Update FRU: --fru <type> --object <path>
              --fru <type1>,<type2> --object <path1>,<path2>

Signed-off-by: Joel Stanley <joel@jms.id.au>
Change-Id: I4d41b55d37516bbc0557127fcb441f6fd29698bf
1 file changed