aboutsummaryrefslogtreecommitdiff
path: root/libnetfs/fsys-syncfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'libnetfs/fsys-syncfs.c')
-rw-r--r--libnetfs/fsys-syncfs.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/libnetfs/fsys-syncfs.c b/libnetfs/fsys-syncfs.c
index e232936e..904e9246 100644
--- a/libnetfs/fsys-syncfs.c
+++ b/libnetfs/fsys-syncfs.c
@@ -20,6 +20,21 @@
#include "netfs.h"
#include "fsys_S.h"
+#include <hurd/fsys.h>
+
+struct args
+{
+ int wait;
+};
+
+static error_t
+helper (void *cookie, const char *name, mach_port_t control)
+{
+ struct args *args = cookie;
+ (void) name;
+ fsys_syncfs (control, args->wait, 1);
+ return 0;
+}
error_t
netfs_S_fsys_syncfs (struct netfs_control *cntl,
@@ -30,6 +45,13 @@ netfs_S_fsys_syncfs (struct netfs_control *cntl,
{
struct iouser *cred;
error_t err;
+ struct args args = { wait };
+
+ if (! cntl)
+ return EOPNOTSUPP;
+
+ if (children)
+ fshelp_map_active_translators (helper, &args);
err = iohelp_create_simple_iouser (&cred, 0, 0);
if (err)