On Tue, Sep 12, 2006 at 04:08:04PM -0700, Duncan Laurie wrote:
> On 9/12/06, Steffen Grunewald <[EMAIL PROTECTED]> wrote:
> >
> >Here's a temporary patch to make "sel time set" functionality work again,
> >while being standard compliant:
> >
> >--- lib/ipmi_sel.c.ORIG 2006-08-22 15:50:13.000000000 +0200
> >+++ lib/ipmi_sel.c      2006-09-12 14:55:29.505018222 +0200
> >@@ -1533,7 +1533,7 @@
> >        struct tm            tm;
> >        time_t               t;
> >        uint32_t             timei;
> >-       const char *         time_format = "%m/%d/%Y %H:%M:%S";
> >+       const char *         time_format = "%m/%d/%YT%H:%M:%S";
> >
> >        memset(&req, 0, sizeof(req));
> >        req.msg.netfn    = IPMI_NETFN_STORAGE;
> >
> >(since this was taken from another mail, and edited by hand, take care of
> >blanks and tabs)
> >
> >Of course the input format must be adjusted (T instead of blank as
> >separator)
> 
> 
> 
> Anyone know why this is breaking?  Whitespace parsing in strptime() should
> be matching 0+ whitespace characters, but I don't know how the handling may
> be affected by locale or other settings.

For some reason including a blank in the time string didn't work for me,
but it might be related to the special setup I'm using (the commands are
run within a script, with a shell function wrapped around them for logging).
That's why I tried using quotes as well as escaping the blank with a varying
number of backslashes, to no avail.

Looking into the code, I found the "now" special time string (is this 
documented? didn't spot it in the man page a while ago) which does exactly
what I need, so for a while I don't depend on the formatting issue any longer.

Summary: problem solved for me, but issue still present. Input syntax should
not rely on non-separating whitespace (i.e. inside a single argument).

> Along that same line, does it work if %n or %t were used instead of a space
> in the format string?  These both say they match "Arbitrary Whitespace"
> according to the manpage.

0+ whitespace - would this mean that 09/13/200612:00:00 would have worked?!?
I somehow refuse to believe this... did you mean 1+?

Cheers,
 Steffen

-- 
Steffen Grunewald * MPI Grav.Phys.(AEI) * Am Mühlenberg 1, D-14476 Potsdam
Cluster Admin * http://pandora.aei.mpg.de/merlin/ * http://www.aei.mpg.de/
* e-mail: steffen.grunewald(*)aei.mpg.de * +49-331-567-{fon:7233,fax:7298}
No Word/PPT mails - http://www.gnu.org/philosophy/no-word-attachments.html


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Ipmitool-devel mailing list
Ipmitool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipmitool-devel

Reply via email to