Two more cros_config features |
||||
Issue description1. Allow access to non-root nodes in cros_config cros_config /firmware bcs-overlay currently it says 'cannot access non-root node /firmware' 2. Allow -m as an alias for --model in cros_config_host it is shorter!
,
Sep 30 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/da6972a833e6d319c9571f1157e0e373f80f8f21 commit da6972a833e6d319c9571f1157e0e373f80f8f21 Author: Alec Thilenius <athilenius@chromium.org> Date: Sat Sep 30 06:25:32 2017 chromeos-config: Added support for non-root paths in GetString You can now pass in a non-root string to both cros_config and cros_config_host to access any subnode of the Init*() model. For example `cros_config /firmware bcs-overlay`. BUG= chromium:769918 TEST=Ran all unit tests including newly added Change-Id: I6387d028cff7419772d8d944b7151e73df14b136 Reviewed-on: https://chromium-review.googlesource.com/692557 Commit-Ready: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> [modify] https://crrev.com/da6972a833e6d319c9571f1157e0e373f80f8f21/chromeos-config/libcros_config/cros_config_unittest.cc [modify] https://crrev.com/da6972a833e6d319c9571f1157e0e373f80f8f21/chromeos-config/cros_config_main_unittest.cc [modify] https://crrev.com/da6972a833e6d319c9571f1157e0e373f80f8f21/chromeos-config/cros_config_host_main_unittest.cc [modify] https://crrev.com/da6972a833e6d319c9571f1157e0e373f80f8f21/chromeos-config/libcros_config/cros_config.cc
,
Oct 1 2017
I am sure there is a better library, but it seems to be the standard for Chrome OS. I suggest checking with derat on this as we need code to be consistent.
,
Oct 1 2017
If cros_config needs to use base::CommandLine, then flag_helper.h from libbrillo is the only option that I know of. If you wanted to add additional features to it, like the ability to register an alias for an already-registered flag or the ability to precede values with whitespace instead of with '=', I wouldn't complain. Not sure if it's worth the effort to avoid typing --model, though.
,
Oct 2 2017
We've mentioned this before, but given that there's interest to keep improving libbrillo, we should just put it back in platform2. I agree with Dan here: is it really worth it to add new functionality to flag_helper just for this use in cros_config?
,
Oct 2 2017
OK, well it's not worth bringing in a new library for -m. Let's drop that feature.
,
Oct 6 2017
|
||||
►
Sign in to add a comment |
||||
Comment 1 by athilenius@chromium.org
, Sep 29 2017