Re: Standard handling of boolean attributes in sysfs.

From: Greg KH
Date: Mon Mar 21 2011 - 16:14:36 EST


On Mon, Mar 21, 2011 at 08:02:40PM +0000, Jonathan Cameron wrote:
> Hi All,
>
> Just wondering what the feeling would be about having
> a utility function similar to sysfs_streq to provide a
> consistent option for all those sysfs attributes out there
> where
>
> 1, on, true -> 1
> 0, off, false -> 0
>
> Or does such a beast already exist and I'm just being unobservant?

We have the one in debugfs that I think people use for sysfs. Have you
looked at that?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/