Re: [PATCHSET 4/4] sysfs: implement new features

From: Kyle Moffett
Date: Thu Sep 27 2007 - 18:39:37 EST

On Sep 25, 2007, at 18:50:05, Greg KH wrote:
On Thu, Sep 20, 2007 at 05:31:37PM +0900, Tejun Heo wrote:
* Name-formatting for symlinks. e.g. symlink pointing to /dira/ dirb/leaf can be named as "symlink:%1-%0" and it will show up as "symlink:dirb-leaf". This only applies when new interface is used.

Is this really necessary? It looks like we are adding a "special" type of parser here that no one uses.

IMHO this would be nicer if it could reuse existing sprintf code to handle all the nice shiny sprintf format specifiers. The only challenge would be how to dynamically build a varargs list from an array of component names although perhaps there could be an internal __csprintf function which took a callback for retrieving arguments. Also since all of the path components are strings I don't know that numeric specifiers could be made useful, so perhaps it's not the greatest idea.

I think the primary importance for this functionality is:

* Autorenaming of symlinks according to the name format string when target or one of its ancestors is renamed or moved. This only applies when new interface is used.


Kyle Moffett

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at