aboutsummaryrefslogtreecommitdiffstats
path: root/fusepro.c
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2001-10-30 15:06:52 +0000
committerMiklos Szeredi <miklos@szeredi.hu>2001-10-30 15:06:52 +0000
commit19dff1ba9dfe6f474d22224267a7407c949d6803 (patch)
tree5e150c70866bc04869930c402bf80b6a99540489 /fusepro.c
parentb483c93623dd64eb5f1dcf23f32adb32f616ee0e (diff)
downloadlibfuse-19dff1ba9dfe6f474d22224267a7407c949d6803.tar.gz
x
Diffstat (limited to 'fusepro.c')
-rw-r--r--fusepro.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/fusepro.c b/fusepro.c
index cbe80aa..4f593e7 100644
--- a/fusepro.c
+++ b/fusepro.c
@@ -108,6 +108,28 @@ static int pro_rmdir(const char *path)
return 0;
}
+static int pro_rename(const char *from, const char *to)
+{
+ int res;
+
+ res = rename(from, to);
+ if(res == -1)
+ return -errno;
+
+ return 0;
+}
+
+static int pro_link(const char *from, const char *to)
+{
+ int res;
+
+ res = link(from, to);
+ if(res == -1)
+ return -errno;
+
+ return 0;
+}
+
static void exit_handler()
{
exit(0);
@@ -152,6 +174,8 @@ static struct fuse_operations pro_oper = {
symlink: pro_symlink,
unlink: pro_unlink,
rmdir: pro_rmdir,
+ rename: pro_rename,
+ link: pro_link,
};
int main(int argc, char *argv[])