Skip to content

Commit

Permalink
Fix some inconsistent whitespace (libfuse#192)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelforney authored and Nikratio committed Nov 23, 2019
1 parent 6935b49 commit 4d86652
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ static void *cache_init(struct fuse_conn_info *conn,
res = cache.next_oper->init(conn, cfg);

// Cache requires a path for each request
cfg->nullpath_ok = 0;
cfg->nullpath_ok = 0;

return res;
}
Expand Down
52 changes: 26 additions & 26 deletions sshfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 4d86652

Please sign in to comment.