Commit 51fc8293 authored by Lukas Braun's avatar Lukas Braun Committed by Simon Ruderich
Browse files

slsm: passtfs: remove unused profiles_read()

parent 909976f2
......@@ -74,52 +74,6 @@ static ssize_t profiles_write(struct file *f, const char __user *buf, size_t siz
}
/**
* profiles_read - called when user reads profiles file
* TODO: dump tree when slsm_dump_tree works
*
* @file:
* @buf: userland buffer
* @count: size of buf
* @ppos: position in file
*/
static ssize_t profiles_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{
#if 0
char *dump_buf;
loff_t pos = *ppos;
loff_t len;
dump_buf = kmalloc(count, GFP_KERNEL);
if (!dump_buf) {
printk(KERN_ERR "slsm: faild to alloc memory for tree dumping \n");
return -ENOMEM;
}
len = slsm_dump_tree(dump_buf, count);
if (!count || pos > count) {
kfree(dump_buf);
return 0;
}
len -= pos;
if (count < len)
len = count;
if (copy_to_user(buf, dump_buf, len)) {
kfree(dump_buf);
return -EFAULT;
}
*ppos += len;
kfree(dump_buf);
return bytes_read;
#endif
return -EPERM;
}
/** profiles_release - called when profiles file is closed
* resets device_open flag.i and kicks off the tree build
*
......@@ -147,7 +101,6 @@ int profiles_release(struct inode *inode, struct file *file)
static const struct file_operations fs_fops_profiles = {
.owner = THIS_MODULE,
.open = profiles_open,
.read = profiles_read,
.write = profiles_write,
.release = profiles_release,
};
......
Supports Markdown
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