On Tue, Jul 21, 2015 at 09:55:35AM -0400, Benjamin Romer wrote:
> static ssize_t enable_ints_write(struct file *file,
> const char __user *buffer,
> size_t count, loff_t *ppos)
> {
> - char buf[4];
> - int i, new_value;
> - struct visornic_devdata *devdata;
> -
> - if (count >= ARRAY_SIZE(buf))
> - return -EINVAL;
> -
> - buf[count] = '\0';
> - if (copy_from_user(buf, buffer, count))
> - return -EFAULT;
> -
> - i = kstrtoint(buf, 10, &new_value);
> - if (i != 0)
> - return -EFAULT;
> -
> - /* set all counts to new_value usually 0 */
> - for (i = 0; i < VISORNICSOPENMAX; i++) {
> - if (num_visornic_open[i]) {
> - devdata = netdev_priv(num_visornic_open[i]);
> - /* TODO update features bit in channel */
> - }
> - }
> -
> + /*
> + * Don't want to break ABI here by having a debugfs
> + * file that no longer exists or is writable, so
> + * lets just make this a vestigual function
> + */
> return count;
> }
Are there scripts which will break if we just remove the file?
Userspace does all kinds of silly things but does it really rely on a
writeable debugfs?
regards,
dan carpenter
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel