[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120511181848.GA16984@mwanda>
Date: Fri, 11 May 2012 21:18:48 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Ian Abbott <abbotti@....co.uk>
Cc: "devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
"fmhess@...rs.sourceforge.net" <fmhess@...rs.sourceforge.net>,
Ian Abbott <ian.abbott@....co.uk>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
Linux Kernel <linux-kernel@...r.kernel.org>,
H Hartley Sweeten <hartleys@...ionengravers.com>
Subject: Re: [PATCH] staging: comedi: register sysfs device attributes with
driver core
On Fri, May 11, 2012 at 02:14:02PM +0100, Ian Abbott wrote:
> On 2012-05-11 07:16, Dan Carpenter wrote:
> >On Thu, May 10, 2012 at 06:05:28PM -0700, H Hartley Sweeten wrote:
> >>-static const struct attribute_group comedi_sysfs_files = {
> >>- .attrs = comedi_attrs,
> >>+static struct device_attribute comedi_dev_attrs[] = {
> >>+ __ATTR(max_read_buffer_kb, S_IRUGO | S_IWUSR,
> >>+ show_max_read_buffer_kb, store_max_read_buffer_kb),
> >>+ __ATTR(read_buffer_kb, S_IRUGO | S_IWUSR | S_IWGRP,
> >>+ show_read_buffer_kb, store_read_buffer_kb),
> >>+ __ATTR(max_write_buffer_kb, S_IRUGO | S_IWUSR,
> >>+ show_max_write_buffer_kb, store_max_write_buffer_kb),
> >>+ __ATTR(write_buffer_kb, S_IRUGO | S_IWUSR | S_IWGRP,
> >>+ show_write_buffer_kb, store_write_buffer_kb),
> >>+ __ATTR_NULL
> >
> >Some of these are group writable and some are only user writable so
> >it's not consistent. Probably just make them user writeable.
> >
> >I guess this was in the original code too, but it's just more
> >obvious now that they're grouped together.
>
> Is it possible to change (group) ownership of these attribute files
> using udev rules? Ideally, users in the group that has group
> ownership on the /dev/comedi* files should be able to modify the
> read_buffer_kb and write_buffer_kb attribute files as well, but only
> super-users should be able to modify the max_read_buffer_kb and
> max_write_buffer_kb files.
>
Oh. Ok that's fine then. I didn't understand what was going on.
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists