srp_daemon: pr_err date format bug
PATCH 1/1 srp_daemon: pr_err date format bug
The pr_err macro used by srp_daemon to log errors prints the incorrect date (month). The month is one less than the actual month since a tm_mon is the number of months since January (0 - 11) and not the
actual month number (1 - 12). Easily fixed by adding 1 to thetm_mon value.
Also opened OpenFabrics Bug 2281
(http://bugs.openfabrics.org/bugzilla/show_bug?id=2281) for this issue.
[Aside: It would be nice if the srptools tree was public. The
README also contains reference to outdated openib mailing lists!]
Signed-off-by Brian Ginsbach <[email protected]>
---
srp_daemon.h renamed from srp_daemon.h.orig +1 -1
@@ -406,7 +406,7 @@struct tm *t =localtime (&tt); \sprintf (str, arg); \fprintf (stderr,"%02d/%02d/%02d %02d:%02d:%02d : %s" , \ - t->tm_mday, t->tm_mon, t->tm_year%100 , \ + t->tm_mday, t->tm_mon+1 , t->tm_year%100 , \ t->tm_hour, t->tm_min, t->tm_sec, str); \ }while (0 )