From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Date: Tue, 13 Jan 2004 19:32:09 +0000 Subject: Re: [PATCH] udev - introduce format escape char Message-Id: <20040113193209.GA3483@kroah.com> List-Id: References: <20040113021932.GA9850@vrfy.org> In-Reply-To: <20040113021932.GA9850@vrfy.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Tue, Jan 13, 2004 at 08:25:50PM +0100, Kay Sievers wrote: > On Tue, Jan 13, 2004 at 10:42:35AM -0800, Greg KH wrote: > > On Tue, Jan 13, 2004 at 03:19:32AM +0100, Kay Sievers wrote: > > > This patch adds a '%' to the format char list, so that a external > > > program may called with a non expanded '%' like: > > > > > > PROGRAM="/bin/date +%%s" > > > > > > Olaf Hering asked for the feature. > > > A tricky test is also added :) > > > > Hm, does this mean that we can't pass a "%n" to a program as it is > > something we intrepret (your test seems to verify this)? > > No, it wasn't possible before. That's why we have the escape now. > If you want to pass any '%' down to a program, you need to ecape it > by '%%', otherwise we try to expand it with our own format char list. > > I will put in the man page, later today. > > In my stupid test, the program returns a '%n' and this is expanded > inside the '%c' to the kernel number. I found it funny... :) Ah, that makes more sense now, thanks. I need to wake up today... greg k-h ------------------------------------------------------- This SF.net email is sponsored by: Perforce Software. Perforce is the Fast Software Configuration Management System offering advanced branching capabilities and atomic changes on 50+ platforms. Free Eval! http://www.perforce.com/perforce/loadprog.html _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel