How about this instead:
"test/{bar/{x:%d,y:%d,z:%d},foo:%f}"
Now you can apply the well known shell brace expansion rules to get:
"test/bar/x:%d"
"test/bar/y:%d"
"test/bar/z:%d"
"test/foo:%f"
...and now it's consistent with the way devfs entries are created.
(As well as being more flexible).
Though by using a bit of both, you can do another wonderful thing.
Start now with this string:
"test/{bar:{x:%d,y:%d,z:%d},foo:%f}"
That expands to:
"test/bar:x:%d"
"test/bar:y:%d"
"test/bar:z:%d"
"test/foo:%f"
Have you yet imagined the warped, but quite well supported by the kernel
thing I'm imagining? That you may call read() on "test/bar" and it will
dump the contents of x, y and z complete with a standard delimited
format, and atomic snapshot if such a thing is applicable.
have a nice day,
-- Jamie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/