You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2016/11/10 22:38:31 UTC
[19/50] incubator-mynewt-newt git commit: newt - fix syscfg
restriction error text
newt - fix syscfg restriction error text
When a syscfg restriction was violated, the setting history was
incorrect. All req settings appears as though they had the base
setting's history.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/commit/c2fe8057
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/tree/c2fe8057
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/diff/c2fe8057
Branch: refs/heads/master
Commit: c2fe805780b0e272de92ada431693e2f675cc69e
Parents: 4219606
Author: Christopher Collins <cc...@apache.org>
Authored: Sun Oct 30 15:38:34 2016 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Sun Oct 30 15:38:34 2016 -0700
----------------------------------------------------------------------
newt/syscfg/syscfg.go | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/c2fe8057/newt/syscfg/syscfg.go
----------------------------------------------------------------------
diff --git a/newt/syscfg/syscfg.go b/newt/syscfg/syscfg.go
index fd4a4f5..7b4b00e 100644
--- a/newt/syscfg/syscfg.go
+++ b/newt/syscfg/syscfg.go
@@ -511,12 +511,14 @@ func (cfg *Cfg) ErrorText() string {
if len(cfg.Violations) > 0 {
str += "Syscfg restriction violations detected:\n"
for settingName, rslice := range cfg.Violations {
- entry := cfg.Settings[settingName]
+ baseEntry := cfg.Settings[settingName]
+ historyMap[settingName] = baseEntry.History
for _, r := range rslice {
for _, name := range r.relevantSettingNames() {
- historyMap[name] = entry.History
+ reqEntry := cfg.Settings[name]
+ historyMap[name] = reqEntry.History
}
- str += " " + cfg.violationText(entry, r) + "\n"
+ str += " " + cfg.violationText(baseEntry, r) + "\n"
}
}
}