]> git.proxmox.com Git - mirror_lxcfs.git/commitdiff
remove unused function
authorYafei Bao <baoyafei@gmail.com>
Tue, 9 Apr 2019 02:37:29 +0000 (10:37 +0800)
committerYafei Bao <baoyafei@gmail.com>
Tue, 9 Apr 2019 02:37:29 +0000 (10:37 +0800)
Signed-off-by: Yafei Bao <baoyafei@gmail.com>
sysfs_fuse.c

index 51ea89224cdbc3d257e0cccb9b6453c5129a85eb..32a59b74cf6d4cde6674e7b0aab927e4f1d0d899 100644 (file)
 #include "config.h" // for VERSION
 #include "sysfs_fuse.h"
 
-static int sys_devices_system_cpu_read(char *buf, size_t size, off_t offset,
-                                      struct fuse_file_info *fi)
-{
-       struct file_info *d = (struct file_info *)fi->fh;
-       char *cache = d->buf;
-       ssize_t total_len = 0;
-
-       if (offset) {
-               if (!d->cached)
-                       return 0;
-               if (offset > d->size)
-                       return -EINVAL;
-               int left = d->size - offset;
-               total_len = left > size ? size : left;
-               memcpy(buf, cache + offset, total_len);
-               return total_len;
-       }
-
-       total_len = snprintf(d->buf, d->buflen, "0-1\n");
-       if (total_len < 0 || total_len >= d->buflen) {
-               lxcfs_error("%s\n", "failed to write to cache");
-               return 0;
-       }
-
-       d->size = (int)total_len;
-       d->cached = 1;
-
-       if (total_len > size)
-               total_len = size;
-
-       memcpy(buf, d->buf, total_len);
-       return total_len;
-}
-
 static int sys_devices_system_cpu_online_read(char *buf, size_t size,
                                              off_t offset,
                                              struct fuse_file_info *fi)