aboutsummaryrefslogtreecommitdiff
path: root/sshfs.c
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2008-06-24 15:24:01 +0000
committerMiklos Szeredi <miklos@szeredi.hu>2008-06-24 15:24:01 +0000
commit1abdbe64a33eaefe24708e8c020a3ca2bba0c6c0 (patch)
tree94e6fc66f1ad913ad5fa760c7da68946f1a1c1b5 /sshfs.c
parent4b28b15c34f0969e47fbbfd81c4f63e6e6f16203 (diff)
downloadsshfs-1abdbe64a33eaefe24708e8c020a3ca2bba0c6c0.tar
sshfs-1abdbe64a33eaefe24708e8c020a3ca2bba0c6c0.tar.gz
sshfs-1abdbe64a33eaefe24708e8c020a3ca2bba0c6c0.tar.bz2
sshfs-1abdbe64a33eaefe24708e8c020a3ca2bba0c6c0.zip
Add '-F' option to specify the ssh config file
Diffstat (limited to 'sshfs.c')
-rw-r--r--sshfs.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sshfs.c b/sshfs.c
index 6f5c256..1d59a0f 100644
--- a/sshfs.c
+++ b/sshfs.c
@@ -288,6 +288,7 @@ enum {
KEY_HELP,
KEY_VERSION,
KEY_FOREGROUND,
+ KEY_CONFIGFILE,
};
#define SSHFS_OPT(t, p, v) { t, offsetof(struct sshfs, p), v }
@@ -321,6 +322,7 @@ static struct fuse_opt sshfs_opts[] = {
FUSE_OPT_KEY("debug", KEY_FOREGROUND),
FUSE_OPT_KEY("-d", KEY_FOREGROUND),
FUSE_OPT_KEY("-f", KEY_FOREGROUND),
+ FUSE_OPT_KEY("-F ", KEY_CONFIGFILE),
FUSE_OPT_END
};
@@ -2834,6 +2836,7 @@ static void usage(const char *progname)
"SSHFS options:\n"
" -p PORT equivalent to '-o port=PORT'\n"
" -C equivalent to '-o compression=yes'\n"
+" -F ssh_configfile specifies alternative ssh configuration file\n"
" -1 equivalent to '-o ssh_protocol=1'\n"
" -o reconnect reconnect to server\n"
" -o sshfs_sync synchronous writes\n"
@@ -2924,6 +2927,12 @@ static int sshfs_opt_proc(void *data, const char *arg, int key,
ssh_add_arg("-oCompression=yes");
return 0;
+ case KEY_CONFIGFILE:
+ tmp = g_strdup_printf("-F%s", arg + 2);
+ ssh_add_arg(tmp);
+ g_free(tmp);
+ return 0;
+
case KEY_HELP:
usage(outargs->argv[0]);
fuse_opt_add_arg(outargs, "-ho");