summaryrefslogtreecommitdiff
path: root/src/lib/cross_osx.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-04-09 00:58:42 +0200
committerCarl Hetherington <cth@carlh.net>2020-04-13 00:23:41 +0200
commit350afcbc40fffd8c8780180e153a2ee91088f562 (patch)
treeccbabb8b91239555ed01ca762d2f56b02858a8cf /src/lib/cross_osx.cc
parenta16523af5f70b60f4890f198f6214177077a9c1d (diff)
Tidy up nanomsg class API; add unmounting for Linux.
Diffstat (limited to 'src/lib/cross_osx.cc')
-rw-r--r--src/lib/cross_osx.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/cross_osx.cc b/src/lib/cross_osx.cc
index c52dfc434..a363f0570 100644
--- a/src/lib/cross_osx.cc
+++ b/src/lib/cross_osx.cc
@@ -485,3 +485,12 @@ config_path ()
p /= "2";
return p;
}
+
+bool
+unmount_device (string device)
+{
+ int const r = umount(device.c_str());
+ LOG_DISK("Tried to unmount %1 and got %2 and %3", device, r, errno);
+ return r == 0;
+
+}