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, 21 Jan 2013 23:41:35 +0100
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:	ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>,
	"Kristen C. Accardi" <kristen.c.accardi@...el.com>,
	Len Brown <lenb@...nel.org>
Subject: Re: [RFC][Update 2][PATCH 3/4] sysfs: Functions for adding/removing symlinks to/from attribute groups

On Monday, January 21, 2013 12:58:20 PM Greg Kroah-Hartman wrote:
> On Mon, Jan 21, 2013 at 02:06:27PM +0100, Rafael J. Wysocki wrote:
> > From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> > 
> > The most convenient way to expose ACPI power resources lists of a
> > device is to put symbolic links to sysfs directories representing
> > those resources into special attribute groups in the device's sysfs
> > directory.  For this purpose, it is necessary to be able to add
> > symbolic links to attribute groups.
> > 
> > For this reason, add sysfs helper functions for adding/removing
> > symbolic links to/from attribute groups, sysfs_add_link_to_group()
> > and sysfs_remove_link_from_group(), respectively.
> 
> Those functions are fine, but why sysfs_add_link()?

Do you mean the helper?  I couldn't invent a better name. :-)

Would sysfs_create_link_sd() be better?

> It looks identical to sysfs_create_link(), why would you call one and not
> the other?

Because sysfs_create_link() takes a kobject as the first argument and I want
a sysfs_dirent.

> Why would anything outside of the sysfs core code ever have a pointer to a
> sysfs_dirent?

I don't see a reason and that sysfs_add_link() really is internal (it shouldn't
be exported then, yes).

I need to make a link from an attribute group under a kobject and not from the
kobject itself, that's all.

Thanks,
Rafael


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
--
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