aboutsummaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorzsugabubus <zsugabubus@users.noreply.github.com>2020-01-30 16:17:25 +0000
committerGitHub <noreply@github.com>2020-01-30 11:17:25 -0500
commit81ab7d8c8c3e9524d93a0459b72e6950347135ac (patch)
tree8c696aac67b2ba210765499e93e97fa703a3c27e /example
parent38c9cb43787bf83ca4e9c9af707e82165de99008 (diff)
downloadlibfuse-81ab7d8c8c3e9524d93a0459b72e6950347135ac.tar.gz
examples: mark ops variables constant (#496)
Diffstat (limited to 'example')
-rw-r--r--example/hello.c2
-rw-r--r--example/hello_ll.c2
-rw-r--r--example/invalidate_path.c2
-rw-r--r--example/ioctl.c2
-rw-r--r--example/notify_inval_entry.c2
-rw-r--r--example/notify_inval_inode.c2
-rw-r--r--example/notify_store_retrieve.c2
-rw-r--r--example/null.c2
-rw-r--r--example/passthrough.c2
-rw-r--r--example/passthrough_fh.c2
-rw-r--r--example/passthrough_ll.c2
-rw-r--r--example/poll.c2
-rw-r--r--example/printcap.c2
13 files changed, 13 insertions, 13 deletions
diff --git a/example/hello.c b/example/hello.c
index f307bf2..dd08ef6 100644
--- a/example/hello.c
+++ b/example/hello.c
@@ -128,7 +128,7 @@ static int hello_read(const char *path, char *buf, size_t size, off_t offset,
return size;
}
-static struct fuse_operations hello_oper = {
+static const struct fuse_operations hello_oper = {
.init = hello_init,
.getattr = hello_getattr,
.readdir = hello_readdir,
diff --git a/example/hello_ll.c b/example/hello_ll.c
index 51b452c..73cd78d 100644
--- a/example/hello_ll.c
+++ b/example/hello_ll.c
@@ -153,7 +153,7 @@ static void hello_ll_read(fuse_req_t req, fuse_ino_t ino, size_t size,
reply_buf_limited(req, hello_str, strlen(hello_str), off, size);
}
-static struct fuse_lowlevel_ops hello_ll_oper = {
+static const struct fuse_lowlevel_ops hello_ll_oper = {
.lookup = hello_ll_lookup,
.getattr = hello_ll_getattr,
.readdir = hello_ll_readdir,
diff --git a/example/invalidate_path.c b/example/invalidate_path.c
index 74c83c3..9e2754b 100644
--- a/example/invalidate_path.c
+++ b/example/invalidate_path.c
@@ -153,7 +153,7 @@ static int xmp_read(const char *path, char *buf, size_t size, off_t offset,
}
}
-static struct fuse_operations xmp_oper = {
+static const struct fuse_operations xmp_oper = {
.init = xmp_init,
.getattr = xmp_getattr,
.readdir = xmp_readdir,
diff --git a/example/ioctl.c b/example/ioctl.c
index 8fdd8f6..5297323 100644
--- a/example/ioctl.c
+++ b/example/ioctl.c
@@ -214,7 +214,7 @@ static int fioc_ioctl(const char *path, unsigned int cmd, void *arg,
return -EINVAL;
}
-static struct fuse_operations fioc_oper = {
+static const struct fuse_operations fioc_oper = {
.getattr = fioc_getattr,
.readdir = fioc_readdir,
.truncate = fioc_truncate,
diff --git a/example/notify_inval_entry.c b/example/notify_inval_entry.c
index aef5f0f..6f13bdb 100644
--- a/example/notify_inval_entry.c
+++ b/example/notify_inval_entry.c
@@ -222,7 +222,7 @@ static void tfs_readdir(fuse_req_t req, fuse_ino_t ino, size_t size,
}
}
-static struct fuse_lowlevel_ops tfs_oper = {
+static const struct fuse_lowlevel_ops tfs_oper = {
.lookup = tfs_lookup,
.getattr = tfs_getattr,
.readdir = tfs_readdir,
diff --git a/example/notify_inval_inode.c b/example/notify_inval_inode.c
index cdea82d..fcf17dc 100644
--- a/example/notify_inval_inode.c
+++ b/example/notify_inval_inode.c
@@ -239,7 +239,7 @@ static void tfs_read(fuse_req_t req, fuse_ino_t ino, size_t size,
reply_buf_limited(req, file_contents, file_size, off, size);
}
-static struct fuse_lowlevel_ops tfs_oper = {
+static const struct fuse_lowlevel_ops tfs_oper = {
.lookup = tfs_lookup,
.getattr = tfs_getattr,
.readdir = tfs_readdir,
diff --git a/example/notify_store_retrieve.c b/example/notify_store_retrieve.c
index 56cb8b7..4795a4b 100644
--- a/example/notify_store_retrieve.c
+++ b/example/notify_store_retrieve.c
@@ -269,7 +269,7 @@ static void tfs_retrieve_reply(fuse_req_t req, void *cookie, fuse_ino_t ino,
}
-static struct fuse_lowlevel_ops tfs_oper = {
+static const struct fuse_lowlevel_ops tfs_oper = {
.lookup = tfs_lookup,
.getattr = tfs_getattr,
.readdir = tfs_readdir,
diff --git a/example/null.c b/example/null.c
index ed68c0b..4cd5351 100644
--- a/example/null.c
+++ b/example/null.c
@@ -104,7 +104,7 @@ static int null_write(const char *path, const char *buf, size_t size,
return size;
}
-static struct fuse_operations null_oper = {
+static const struct fuse_operations null_oper = {
.getattr = null_getattr,
.truncate = null_truncate,
.open = null_open,
diff --git a/example/passthrough.c b/example/passthrough.c
index 012bd31..ec2f872 100644
--- a/example/passthrough.c
+++ b/example/passthrough.c
@@ -506,7 +506,7 @@ static off_t xmp_lseek(const char *path, off_t off, int whence, struct fuse_file
return res;
}
-static struct fuse_operations xmp_oper = {
+static const struct fuse_operations xmp_oper = {
.init = xmp_init,
.getattr = xmp_getattr,
.access = xmp_access,
diff --git a/example/passthrough_fh.c b/example/passthrough_fh.c
index 13eb41e..7e62a7b 100644
--- a/example/passthrough_fh.c
+++ b/example/passthrough_fh.c
@@ -608,7 +608,7 @@ static off_t xmp_lseek(const char *path, off_t off, int whence, struct fuse_file
return res;
}
-static struct fuse_operations xmp_oper = {
+static const struct fuse_operations xmp_oper = {
.init = xmp_init,
.getattr = xmp_getattr,
.access = xmp_access,
diff --git a/example/passthrough_ll.c b/example/passthrough_ll.c
index c31dbe5..8165515 100644
--- a/example/passthrough_ll.c
+++ b/example/passthrough_ll.c
@@ -1174,7 +1174,7 @@ static void lo_lseek(fuse_req_t req, fuse_ino_t ino, off_t off, int whence,
fuse_reply_err(req, errno);
}
-static struct fuse_lowlevel_ops lo_oper = {
+static const struct fuse_lowlevel_ops lo_oper = {
.init = lo_init,
.lookup = lo_lookup,
.mkdir = lo_mkdir,
diff --git a/example/poll.c b/example/poll.c
index 64917cc..6bc3879 100644
--- a/example/poll.c
+++ b/example/poll.c
@@ -206,7 +206,7 @@ static int fsel_poll(const char *path, struct fuse_file_info *fi,
return 0;
}
-static struct fuse_operations fsel_oper = {
+static const struct fuse_operations fsel_oper = {
.getattr = fsel_getattr,
.readdir = fsel_readdir,
.open = fsel_open,
diff --git a/example/printcap.c b/example/printcap.c
index 904542f..6c2482d 100644
--- a/example/printcap.c
+++ b/example/printcap.c
@@ -85,7 +85,7 @@ static void pc_init(void *userdata,
}
-static struct fuse_lowlevel_ops pc_oper = {
+static const struct fuse_lowlevel_ops pc_oper = {
.init = pc_init,
};