Hi Haiku-Team I have found that the parameters to the _kern_create-Functions for linking have the wrong order. The attached patch fixes this. Jens On Mon, 13 Jul 2009 09:17:39 +0200 Jens Arm <Jens.Arm@xxxxxx> wrote: > Hi Haiku-Team > > > At the weeekend I was testing the bfs_fuse on many different disks > (dvdram/usb-stick/...). > > The only error I got was, that it is impossible to create symlinks (hardlinks > not tested). > It is saying, that the file exits already: > > tux@tux:~/media/bfs/myfs/test$ ls -lsa > total 14 > 6 drwxr-xr-x 1 root root 2048 Jul 13 09:07 . > 4 drwxr-xr-x 1 root root 2048 Jul 12 12:52 .. > 4 -rw-r--r-- 1 root root 30 Jul 13 09:08 test.txt > > tux@tux:~/media/bfs/myfs/test$ ln -s test.txt t.t > ln: creating symbolic link `t.t' to `test.txt': File exists > > tux@tux:~/media/bfs/myfs/test$ ls -lsa > total 14 > 6 drwxr-xr-x 1 root root 2048 Jul 13 09:07 . > 4 drwxr-xr-x 1 root root 2048 Jul 12 12:52 .. > 4 -rw-r--r-- 1 root root 30 Jul 13 09:08 test.txt > > > This is the output from the console where bfs_fuse is started: > > unique: 1081, opcode: LOOKUP (1), nodeid: 37, insize: 44 > LOOKUP /myfs/test/t.t > ##getattr > GETATTR returned: -2147459069 > unique: 1081, error: -2 (No such file or directory), outsize: 16 > unique: 1082, opcode: LOOKUP (1), nodeid: 37, insize: 44 > LOOKUP /myfs/test/t.t > ##getattr > GETATTR returned: -2147459069 > unique: 1082, error: -2 (No such file or directory), outsize: 16 > unique: 1083, opcode: SYMLINK (6), nodeid: 37, insize: 53 > SYMLINK /myfs/test/t.t > ##symlink > unique: 1083, error: -17 (File exists), outsize: 16 > > > Jens
diff -Nur old/fuse.cpp new/fuse.cpp --- old/fuse.cpp 2009-07-20 07:53:55.000000000 +0200 +++ new/fuse.cpp 2009-07-20 07:54:48.000000000 +0200 @@ -228,7 +228,7 @@ fuse_symlink(const char* from, const char* to) { PRINTD("##symlink\n"); - return _ERR(_kern_create_symlink(-1, from, to, + return _ERR(_kern_create_symlink(-1, to, from, FSSH_S_IRWXU | FSSH_S_IRWXG | FSSH_S_IRWXO)); } @@ -261,7 +261,7 @@ fuse_link(const char* from, const char* to) { PRINTD("##link\n"); - return _ERR(_kern_create_link(from, to)); + return _ERR(_kern_create_link(to, from)); }