From cc63933faedd8d4fcdabb872cf4661ac04fe4ba2 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Wed, 28 Jul 2021 19:20:56 +0100 Subject: [PATCH] blockd: send mount.ready when startup has completed Emmit mount.ready notification when 'block autofs start' has completed. Signed-off-by: Daniel Golle --- blockd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/blockd.c b/blockd.c index bf15f10..1e11c88 100644 --- a/blockd.c +++ b/blockd.c @@ -507,7 +507,9 @@ static int send_block_notification(struct ubus_context *ctx, const char *action, strncat(evname, action, sizeof(evname) - 1); blob_buf_init(&buf, 0); - blobmsg_add_string(&buf, "devname", devname); + + if (devname) + blobmsg_add_string(&buf, "devname", devname); err = ubus_notify(ctx, &block_object, evname, buf.head, -1); @@ -626,6 +628,7 @@ static int autofs_mount(void) static void blockd_startup(struct uloop_timeout *t) { block("autofs", "start", NULL); + send_block_notification(&conn.ctx, "ready", NULL); } struct uloop_timeout startup = { -- 2.30.2