u-root / u-bmc

Open-source firmware for your baseboard management controller (BMC)
https://u-bmc.readthedocs.io
BSD 3-Clause "New" or "Revised" License
275 stars 32 forks source link

pkg/aspeed/lpc_mem.go arguments end up everywhere #185

Open osresearch opened 5 years ago

osresearch commented 5 years ago

For some reason the --lpc_cache and --print_lpc_stats command line arguments from pkg/aspeed/lpc_mem.go are ending up in every command. For example:

~# pwd --help
Usage of pwd [-LP]:
  -L    don't follow any symlinks (default true)
  -P    follow all symlinks (avoid all symlinks)
  -lpc_cache
        Do not write values that match cached view of LPC2AHB F0-9 registers
  -print_lpc_stats
        At the end of the run, print LPC statistics

or

~# date --help
Usage of date [-u] [-d FILE] [+format] | date [-u] [-d FILE] [MMDDhhmm[CC]YY[.ss]]:
  -lpc_cache
        Do not write values that match cached view of LPC2AHB F0-9 registers
  -print_lpc_stats
        At the end of the run, print LPC statistics
  -r string
        Display the last midification time of FILE
  -u    Coordinated Universal Time (UTC)
bluecmd commented 5 years ago

It's an artifact from the way I used to do flags. Those are legacy anyway, so we should just remove them.