Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=fw32.git;a=commitdiff;h=c9d1b8407c54e5d82038e67e59a119edcae649ae

commit c9d1b8407c54e5d82038e67e59a119edcae649ae
Author: James Buren <r...@frugalware.org>
Date:   Thu Nov 3 00:06:25 2011 -0500

fw32.c: add umount_directory function

diff --git a/fw32.c b/fw32.c
index dc911fb..4320d10 100644
--- a/fw32.c
+++ b/fw32.c
@@ -127,5 +127,13 @@ mount_directory(const char *src)
error("Failed to mount directory: %s: %s\n",dst,strerror(errno));
}

+static void
+umount_directory(const char *path)
+{
+  assert(path);
+
+  if(umount2(path,UMOUNT_NOFOLLOW) && errno != EINVAL)
+    error("Failed to umount directory: %s: %s\n",path,strerror(errno));
+}

-int main(int argc,char **argv) { mkdir_parents(argv[1]); }
+int main(int argc,char **argv) { umount_directory(argv[1]); }
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to