diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2001-10-29 14:57:57 +0000 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2001-10-29 14:57:57 +0000 |
commit | b483c93623dd64eb5f1dcf23f32adb32f616ee0e (patch) | |
tree | 63818a8154d98c143d8bbb63d444818dced3caac /fusepro.c | |
parent | 85c74fcdfd9e67d411c3e1734b34effd0d73fa4d (diff) | |
download | libfuse-b483c93623dd64eb5f1dcf23f32adb32f616ee0e.tar.gz |
x
Diffstat (limited to 'fusepro.c')
-rw-r--r-- | fusepro.c | 48 |
1 files changed, 48 insertions, 0 deletions
@@ -64,6 +64,50 @@ static int pro_mknod(const char *path, int mode, int rdev) return 0; } +static int pro_symlink(const char *from, const char *to) +{ + int res; + + res = symlink(from, to); + if(res == -1) + return -errno; + + return 0; +} + +static int pro_mkdir(const char *path, int mode) +{ + int res; + + res = mkdir(path, mode); + if(res == -1) + return -errno; + + return 0; +} + +static int pro_unlink(const char *path) +{ + int res; + + res = unlink(path); + if(res == -1) + return -errno; + + return 0; +} + +static int pro_rmdir(const char *path) +{ + int res; + + res = rmdir(path); + if(res == -1) + return -errno; + + return 0; +} + static void exit_handler() { exit(0); @@ -104,6 +148,10 @@ static struct fuse_operations pro_oper = { readlink: pro_readlink, getdir: pro_getdir, mknod: pro_mknod, + mkdir: pro_mkdir, + symlink: pro_symlink, + unlink: pro_unlink, + rmdir: pro_rmdir, }; int main(int argc, char *argv[]) |