diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2014-01-08 12:31:18 +0100 |
---|---|---|
committer | Miklos Szeredi <mszeredi@suse.cz> | 2014-01-08 12:31:18 +0100 |
commit | 334e9e6a27949a2660317278d4f096da11f5b330 (patch) | |
tree | 1f267030a63b72d8d583d29ffce465d486d54228 | |
parent | 91c1f2ba9e02a0eacb2ac46e87230a2709df2038 (diff) | |
download | sshfs-334e9e6a27949a2660317278d4f096da11f5b330.tar sshfs-334e9e6a27949a2660317278d4f096da11f5b330.tar.gz sshfs-334e9e6a27949a2660317278d4f096da11f5b330.tar.bz2 sshfs-334e9e6a27949a2660317278d4f096da11f5b330.zip |
Add -o disable_hardlink option (debian bug #670926)
Reported by Louis-David Mitterrand
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | sshfs.1 | 5 | ||||
-rw-r--r-- | sshfs.c | 5 |
3 files changed, 14 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2014-01-08 Miklos Szeredi <miklos@szeredi.hu> + + * Add -o disable_hardlink option (debian bug #670926). Reported + by Louis-David Mitterrand + 2014-01-07 Miklos Szeredi <miklos@szeredi.hu> * Map SSH2_FX_FAILURE to ENOTEMPTY for rmdir. Reported by Ross @@ -142,6 +142,11 @@ directly connect to PORT bypassing ssh \fB\-o\fR slave communicate over stdin and stdout bypassing network .TP +\fB\-o\fR disable_hardlink +link(2) will return with errno set to ENOSYS. Hard links don't currently work +perfectly on sshfs, and this confuses some programs. If that happens try +disabling hard links with this option. +.TP \fB\-o\fR transform_symlinks transform absolute symlinks to relative .TP @@ -203,6 +203,7 @@ struct sshfs { int detect_uid; int idmap; int nomap; + int disable_hardlink; char *uid_file; char *gid_file; GHashTable *uid_map; @@ -358,6 +359,7 @@ static struct fuse_opt sshfs_opts[] = { SSHFS_OPT("password_stdin", password_stdin, 1), SSHFS_OPT("delay_connect", delay_connect, 1), SSHFS_OPT("slave", slave, 1), + SSHFS_OPT("disable_hardlink", disable_hardlink, 1), FUSE_OPT_KEY("-p ", KEY_PORT), FUSE_OPT_KEY("-C", KEY_COMPRESS), @@ -2199,7 +2201,7 @@ static int sshfs_link(const char *from, const char *to) { int err = -ENOSYS; - if (sshfs.ext_hardlink) { + if (sshfs.ext_hardlink && !sshfs.disable_hardlink) { struct buffer buf; buf_init(&buf, 0); @@ -3197,6 +3199,7 @@ static void usage(const char *progname) " -o sftp_server=SERV path to sftp server or subsystem (default: sftp)\n" " -o directport=PORT directly connect to PORT bypassing ssh\n" " -o slave communicate over stdin and stdout bypassing network\n" +" -o disable_hardlink link(2) will return with errno set to ENOSYS\n" " -o transform_symlinks transform absolute symlinks to relative\n" " -o follow_symlinks follow symlinks on the server\n" " -o no_check_root don't check for existence of 'dir' on server\n" |