[PATCH 01/14] bbu: In bbu_register_std_file_update detect device before accessing it

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The device the standard file update handler writes to may not be present
before detecting it, so as a first step detect it.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 common/bbu.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/common/bbu.c b/common/bbu.c
index 3271d403b7..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;
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux