summaryrefslogtreecommitdiffstats
path: root/common/bbu.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2019-05-10 18:15:50 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-05-10 18:15:50 +0200
commite7dad8c88a19e7130b4241bfe1f251620850ce4b (patch)
treea75ceec92f5e08744f09fc0a4acda4b21d3c21c4 /common/bbu.c
parentf33d27e9715a7ff077d603162b1def42cd408317 (diff)
parent51d850a0a8e736d6883f981bbea108dd9e110b0a (diff)
downloadbarebox-e7dad8c88a19e7130b4241bfe1f251620850ce4b.tar.gz
barebox-e7dad8c88a19e7130b4241bfe1f251620850ce4b.tar.xz
Merge branch 'for-next/layerscape'
Diffstat (limited to 'common/bbu.c')
-rw-r--r--common/bbu.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/common/bbu.c b/common/bbu.c
index 5cb09e4eb0..00bec32a86 100644
--- a/common/bbu.c
+++ b/common/bbu.c
@@ -299,6 +299,8 @@ static int bbu_std_file_handler(struct bbu_handler *handler,
return -EINVAL;
}
+ device_detect_by_name(devpath_to_name(data->devicefile));
+
ret = stat(data->devicefile, &s);
if (ret) {
oflags |= O_CREAT;
@@ -361,7 +363,7 @@ err_close:
* Return: 0 if successful, negative error code otherwise
*/
int bbu_register_std_file_update(const char *name, unsigned long flags,
- char *devicefile, enum filetype imagetype)
+ const char *devicefile, enum filetype imagetype)
{
struct bbu_std *std;
struct bbu_handler *handler;