From feb64890a302565974abf5178284965e788c698c Mon Sep 17 00:00:00 2001 From: Michael Olbrich Date: Sun, 11 Sep 2016 20:28:31 +0200 Subject: barebox-state: fall back to /state if there is no alias defined state_get() already supports this if no state name is given. This just removes the default state name to make use of this feature. Without this, an alias named 'state' is needed for barebox-state work without specifying the state node. Signed-off-by: Michael Olbrich --- src/barebox-state.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/barebox-state.c b/src/barebox-state.c index e0902ab..64831df 100644 --- a/src/barebox-state.c +++ b/src/barebox-state.c @@ -429,7 +429,6 @@ int main(int argc, char *argv[]) int lock_fd; int nr_states = 0; bool readonly = true; - const char *default_state = "state"; INIT_LIST_HEAD(&sg_list); INIT_LIST_HEAD(&state_list.list); @@ -488,7 +487,7 @@ int main(int argc, char *argv[]) struct state_list *new_state; new_state = xzalloc(sizeof(*new_state)); - new_state->name = default_state; + new_state->name = NULL; list_add_tail(&new_state->list, &state_list.list); ++nr_states; -- cgit v1.2.3