diff options
author | Ulrich Ölmann <u.oelmann@pengutronix.de> | 2018-12-18 14:57:40 +0100 |
---|---|---|
committer | Roland Hieber <rhi@pengutronix.de> | 2019-01-07 12:26:50 +0100 |
commit | d74c4e26d50538c92c90d42effe1a7e2c78a1298 (patch) | |
tree | 9b6938f7bd0e8a9433eb547b5c22a076b4e92e84 | |
parent | c795f59a89c2b485ededacba3a2e048409b82a60 (diff) | |
download | dt-utils-d74c4e26d50538c92c90d42effe1a7e2c78a1298.tar.gz dt-utils-d74c4e26d50538c92c90d42effe1a7e2c78a1298.tar.xz |
state: backend: always pass backend type to Linux dtb
This ports the following barebox commit:
| commit 119f92b27e131a0cb506fe8d8bffe8010fb14a3d
| Author: Sascha Hauer <s.hauer@pengutronix.de>
| Date: Fri Jun 23 12:43:14 2017 +0200
|
| state: backend: always pass backend type to Linux dtb
|
| When the "backend-storage-type" property is unset in the barebox dtb
| then barebox will use the default. Instead of leaving the property
| unset in the Linux dtb, set it to the value we used as default. By
| making the default explicit to Linux we force Linux to the same backend
| type, even when the defaults may differ.
|
| Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
-rw-r--r-- | src/barebox-state/backend_storage.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/barebox-state/backend_storage.c b/src/barebox-state/backend_storage.c index 8812d73..823fe69 100644 --- a/src/barebox-state/backend_storage.c +++ b/src/barebox-state/backend_storage.c @@ -368,7 +368,6 @@ int state_storage_init(struct state *state, const char *path, INIT_LIST_HEAD(&storage->buckets); storage->dev = &state->dev; - storage->name = storagetype; storage->stridesize = stridesize; storage->offset = offset; storage->max_size = max_size; @@ -378,8 +377,10 @@ int state_storage_init(struct state *state, const char *path, if (!ret && !(meminfo.flags & MTD_NO_ERASE)) { bool circular; if (!storagetype || !strcmp(storagetype, "circular")) { + storage->name = "circular"; circular = true; } else if (!strcmp(storagetype, "noncircular")) { + storage->name = "noncircular"; dev_warn(storage->dev, "using old format circular storage type.\n"); circular = false; } else { |