From b201464a18c990ea6df0f2878e532618d4936c53 Mon Sep 17 00:00:00 2001 From: Jeremy Kerr Date: Tue, 1 Oct 2013 10:42:04 +0800 Subject: discover: Allow for already-mounted devices When we start the discover server, we may find that devices are already mounted. In this case, mount_device will fail, and we'll abort the parse. This change uses /proc/self/mounts to check if new devices are already mounted, and uses the existing mount point. Signed-off-by: Jeremy Kerr --- discover/device-handler.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'discover/device-handler.h') diff --git a/discover/device-handler.h b/discover/device-handler.h index 854be48..9d477db 100644 --- a/discover/device-handler.h +++ b/discover/device-handler.h @@ -33,8 +33,10 @@ struct discover_device { const char *uuid; const char *label; - const char *mount_path; + char *mount_path; const char *device_path; + bool mounted; + bool unmount; bool notified; -- cgit v1.2.1