aboutsummaryrefslogtreecommitdiff
path: root/sshfs.c
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-11-23 03:06:05 -0800
committerNikolaus Rath <Nikolaus@rath.org>2019-11-23 11:06:05 +0000
commit4d866526dcedf356d2fa6e7f349aab62e57bfc91 (patch)
tree9d5bd21d694f66d55b80c148e64429489ffe3c99 /sshfs.c
parent6935b49eea03ae9e6a5cd1cb9cdaa36061ee26ca (diff)
downloadsshfs-4d866526dcedf356d2fa6e7f349aab62e57bfc91.tar
sshfs-4d866526dcedf356d2fa6e7f349aab62e57bfc91.tar.gz
sshfs-4d866526dcedf356d2fa6e7f349aab62e57bfc91.tar.bz2
sshfs-4d866526dcedf356d2fa6e7f349aab62e57bfc91.zip
Fix some inconsistent whitespace (#192)
Diffstat (limited to 'sshfs.c')
-rw-r--r--sshfs.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/sshfs.c b/sshfs.c
index d4d624d..17e90fe 100644
--- a/sshfs.c
+++ b/sshfs.c
@@ -244,7 +244,7 @@ struct sshfs {
int sync_write;
int sync_read;
int sync_readdir;
- int direct_io;
+ int direct_io;
int debug;
int verbose;
int foreground;
@@ -1745,10 +1745,10 @@ static void *sshfs_init(struct fuse_conn_info *conn,
sshfs.sync_read = 1;
// These workarounds require the "path" argument.
- cfg->nullpath_ok = !(sshfs.truncate_workaround || sshfs.fstat_workaround);
+ cfg->nullpath_ok = !(sshfs.truncate_workaround || sshfs.fstat_workaround);
- // Lookup of . and .. is supported
- conn->capable |= FUSE_CAP_EXPORT_SUPPORT;
+ // Lookup of . and .. is supported
+ conn->capable |= FUSE_CAP_EXPORT_SUPPORT;
if (!sshfs.delay_connect)
start_processing_thread();
@@ -2518,8 +2518,8 @@ static int sshfs_open_common(const char *path, mode_t mode,
if (sshfs.dir_cache)
wrctr = cache_get_write_ctr();
- if (sshfs.direct_io)
- fi->direct_io = 1;
+ if (sshfs.direct_io)
+ fi->direct_io = 1;
if ((fi->flags & O_ACCMODE) == O_RDONLY)
pflags = SSH_FXF_READ;
@@ -2632,8 +2632,8 @@ static int sshfs_fsync(const char *path, int isdatasync,
int err;
(void) isdatasync;
- err = sshfs_flush(path, fi);
- if (err)
+ err = sshfs_flush(path, fi);
+ if (err)
return err;
if (!sshfs.ext_fsync)
@@ -3485,19 +3485,19 @@ static int sshfs_opt_proc(void *data, const char *arg, int key,
}
}
#else
- int fd, len;
- if (sscanf(arg, "/dev/fd/%u%n", &fd, &len) == 1 &&
- len == strlen(arg)) {
- /*
- * Allow /dev/fd/N unchanged; it can be
- * use for pre-mounting a generic fuse
- * mountpoint to later be completely
- * unprivileged with libfuse >= 3.3.0.
- */
- sshfs.mountpoint = strdup(arg);
- } else {
- sshfs.mountpoint = realpath(arg, NULL);
- }
+ int fd, len;
+ if (sscanf(arg, "/dev/fd/%u%n", &fd, &len) == 1 &&
+ len == strlen(arg)) {
+ /*
+ * Allow /dev/fd/N unchanged; it can be
+ * use for pre-mounting a generic fuse
+ * mountpoint to later be completely
+ * unprivileged with libfuse >= 3.3.0.
+ */
+ sshfs.mountpoint = strdup(arg);
+ } else {
+ sshfs.mountpoint = realpath(arg, NULL);
+ }
#endif
if (!sshfs.mountpoint) {
fprintf(stderr, "sshfs: bad mount point `%s': %s\n",
@@ -3543,10 +3543,10 @@ static int workaround_opt_proc(void *data, const char *arg, int key,
static int parse_workarounds(void)
{
int res;
- /* Need separate variables because literals are const
- char */
- char argv0[] = "";
- char argv1[] = "-o";
+ /* Need separate variables because literals are const
+ char */
+ char argv0[] = "";
+ char argv1[] = "-o";
char *argv[] = { argv0, argv1, sshfs.workarounds, NULL };
struct fuse_args args = FUSE_ARGS_INIT(3, argv);
char *s = sshfs.workarounds;
@@ -4084,7 +4084,7 @@ int main(int argc, char *argv[])
if (sshfs.max_write > 65536)
sshfs.max_write = 65536;
- fsname = fsname_escape_commas(fsname);
+ fsname = fsname_escape_commas(fsname);
tmp = g_strdup_printf("-osubtype=sshfs,fsname=%s", fsname);
fuse_opt_insert_arg(&args, 1, tmp);
g_free(tmp);