lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 11 Feb 2008 07:25:42 -0800
From:	Greg KH <greg@...ah.com>
To:	Rodolfo Giometti <giometti@...eenne.com>
Cc:	linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	David Woodhouse <dwmw2@...radead.org>,
	Dave Jones <davej@...hat.com>
Subject: Re: [PATCH 1/8] LinuxPPS core support.

On Mon, Feb 11, 2008 at 10:53:46AM +0100, Rodolfo Giometti wrote:
> On Fri, Feb 08, 2008 at 10:45:31PM -0800, Greg KH wrote:
> > 
> > As you are adding sysfs files, please also describe them in
> > Documentation/ABI/ in this same series of patches.
> 
> Ok. I'm going to add them under "testing".
> 
> > Why not use a default attribute group?
> > 
> > That way the files are created before the uevent is issued, and the
> > amount of code you have to write is much smaller.
> 
> What do you mean exactly? I don't understand what you wish. :'(

If you use a 'struct device' you can use a default attribute group for
that device to be created whenever it is added.

However you are not using the driver core that way, you are just calling
device_create(), which doesn't work that way.

But you can just use an attribute group instead, which still saves you a
lot of code, try using that instead (sysfs_create_group()).

Or go all the way and embed a 'struct device' in your structure, and
create a bus, then you can use the default attribute group, although
that might be a bit more work :)

thanks,

greg k-h
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ