usb-ctrl: fix optional mac-addresses

The `help` usb-ctrl declares the MAC options for ecm|emm|rndis optional.
But if they are skipped, the operation will fail.

The change fixes the problem and the MAC settings can now be safely
omitted.

Tested: each of the commands below works fine:

* `usb-ctrl ecm usb0 on`
* `usb-ctrl ecm usb0 on .`
* `usb-ctrl ecm usb0 on . 5e:e9:8e:01:fa:b4`
* `usb-ctrl ecm usb0 on 5e:e9:8e:01:fa:b3 5e:e9:8e:01:fa:b3`

Change-Id: I7096476656d2f830c32fbc6cb9c784b3ba6bbd2f
Signed-off-by: Igor Kononenko <i.kononenko.e@gmail.com>
1 file changed
tree: 56edcb6364070bd67ba6087e5851db00e477b931
  1. firstboot/
  2. http-redirect/
  3. usb-ctrl/
  4. .gitignore
  5. LICENSE
  6. meson.build
  7. meson_options.txt
  8. OWNERS
  9. README.md
README.md

phosphor-misc

phosphor-misc is a collection of miscellaneous OpenBMC functions that doesn't really fit anywhere else.

Contributing

If you have a new function in mind to be hosted in phosphor-misc, it is usually a good idea to mention it on the OpenBMC mailing list before writing any code. There might already be an implementation of the desired function or the community may suggest alternatives.

phosphor-misc patches are reviewed using the Gerrit instance at https://gerrit.openbmc-project.xyz.

Please submit patches to Gerrit. More information on using Gerrit can be found here. https://github.com/openbmc/phosphor-misc is a hosting mirror only and GitHub pull requests are not monitored and will not be accepted.

Patch checklist. Please ensure patches adhere to the following guidelines:

For questions or help please come join us on the mailing list or in IRC.