1234567891011121314151617181920212223242526272829303132333435363738 |
- $OpenBSD: patch-encfs_main_cpp,v 1.3 2015/05/09 12:18:24 jca Exp $
- --- encfs/main.cpp.orig Sun Nov 29 23:04:12 2009
- +++ encfs/main.cpp Thu May 7 19:19:29 2015
- @@ -28,6 +28,8 @@
- #include <cstdio>
- #include <unistd.h>
- #include <sys/time.h>
- +#include <sys/param.h>
- +#include <sys/mount.h>
- #include <cerrno>
- #include <cstring>
-
- @@ -51,11 +53,6 @@
-
- #include "openssl.h"
-
- -// Fuse version >= 26 requires another argument to fuse_unmount, which we
- -// don't have. So use the backward compatible call instead..
- -extern "C" void fuse_unmount_compat22(const char *mountpoint);
- -# define fuse_unmount fuse_unmount_compat22
- -
- #include <locale.h>
-
- #include "i18n.h"
- @@ -756,7 +753,11 @@ static bool unmountFS(EncFS_Context *ctx)
- // xgroup(diag)
- rWarning(_("Unmounting filesystem %s due to inactivity"),
- arg->mountPoint.c_str());
- - fuse_unmount( arg->mountPoint.c_str() );
- + if (unmount( arg->mountPoint.c_str(), MNT_FORCE ) != 0)
- + {
- + rWarning(_("Unmounting filesystem %s failed: %s"),
- + arg->mountPoint.c_str(), strerror(errno) );
- + }
- return true;
- }
- }
|