From 62c578c22f9d87ab9a7b686dece913861cf34c34 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Fri, 27 Dec 2019 13:09:11 +0100 Subject: [PATCH] blockd: report "target" path as "mount" for autofs available mounts MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Devices handled with autofs should be seen as available even if currently unmounted. Mounting is handled on demand and transparently for users. Signed-off-by: Rafał Miłecki --- blockd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/blockd.c b/blockd.c index a04ea5b..84bea6e 100644 --- a/blockd.c +++ b/blockd.c @@ -283,6 +283,8 @@ block_info(struct ubus_context *ctx, struct ubus_object *obj, if (mp) { blobmsg_add_string(&bb, "mount", mp); free(mp); + } else if (device->autofs && device->target) { + blobmsg_add_string(&bb, "mount", device->target); } blobmsg_close_table(&bb, t); } -- 2.25.1