Commit 1e4d655e authored by Patrick Mochel's avatar Patrick Mochel

sysfs: hardcode file size of regular files to PAGE_SIZE.

This makes the files easily accessible in some graphical file browsers (since
they can automatically handle regular files with a size > 0).

Though not all files have a size that large, that is the size that we allocate
for reading and writing, so it makes sense.
parent 891b187e
......@@ -72,6 +72,7 @@ static struct inode *sysfs_get_inode(struct super_block *sb, int mode, int dev)
init_special_inode(inode, mode, dev);
break;
case S_IFREG:
inode->i_size = PAGE_SIZE;
inode->i_fop = &sysfs_file_operations;
break;
case S_IFDIR:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment