In fuse2, the apparant file size is always 4k, however in fuse3
the file size is actually obeyed, so we need to same something
bigger than 0 to get clients to be able to read the file contents.
Signed-off-by: Scott Parlane <scott.parlane@alliedtelesis.co.nz>
sb->st_nlink = 1;
sb->st_uid = k->uid;
sb->st_gid = k->gid;
- sb->st_size = 0;
+ sb->st_size = 4096;
free_key(k);
if (!caller_is_in_ancestor(initpid, controller, path1, NULL)) {
ret = -ENOENT;
strcmp(path, "/proc/diskstats") == 0 ||
strcmp(path, "/proc/swaps") == 0 ||
strcmp(path, "/proc/loadavg") == 0) {
- sb->st_size = 0;
+ sb->st_size = 4096;
sb->st_mode = S_IFREG | 00444;
sb->st_nlink = 1;
return 0;
}
if (strcmp(path, "/sys/devices/system/cpu/online") == 0) {
- sb->st_size = 0;
+ sb->st_size = 4096;
sb->st_mode = S_IFREG | 00444;
sb->st_nlink = 1;
return 0;