summaryrefslogtreecommitdiffstats
path: root/discover
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2013-03-12 11:35:31 +0800
committerJeremy Kerr <jk@ozlabs.org>2013-04-29 13:42:10 +1000
commit62c2616b474415a7f2efa38faa4b10dd70003fef (patch)
tree338b328b56ccdd669136c41d804bf42761afc37e /discover
parent21d4959e60b1466992a13a75b310efad0ba11a46 (diff)
downloadtalos-petitboot-62c2616b474415a7f2efa38faa4b10dd70003fef.tar.gz
talos-petitboot-62c2616b474415a7f2efa38faa4b10dd70003fef.zip
device-handler: Don't unmount non-mounted devices
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'discover')
-rw-r--r--discover/device-handler.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/discover/device-handler.c b/discover/device-handler.c
index 08e3d74..6952dde 100644
--- a/discover/device-handler.c
+++ b/discover/device-handler.c
@@ -240,6 +240,9 @@ static int umount_device(struct discover_device *dev)
remove_device_links(dev);
+ if (!dev->mount_path)
+ return 0;
+
pid = fork();
if (pid == -1) {
pb_log("%s: fork failed: %s\n", __func__, strerror(errno));
OpenPOWER on IntegriCloud