[OpenWrt-Devel] [PATCH fstools] blockd: report "target" path as "mount" for autofs available mounts

Rafał Miłecki zajec5 at gmail.com
Fri Dec 27 07:09:11 EST 2019


From: Rafał Miłecki <rafal at milecki.pl>

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 <rafal at milecki.pl>
---
 blockd.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/blockd.c b/blockd.c
index e07530c..ba4afdd 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.21.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list