summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2016-09-11 20:28:31 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2016-09-12 10:10:34 +0200
commitfeb64890a302565974abf5178284965e788c698c (patch)
treed0450cfea973aed7bc53c2170617e774759f1ba2 /src
parent8a2a5d1604012e6d81acf58a1fd0a5df3bb550ee (diff)
downloaddt-utils-feb64890a302565974abf5178284965e788c698c.tar.gz
dt-utils-feb64890a302565974abf5178284965e788c698c.tar.xz
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 <m.olbrich@pengutronix.de>
Diffstat (limited to 'src')
-rw-r--r--src/barebox-state.c3
1 files changed, 1 insertions, 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;