[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 5/5] [RFC] Traditional console timestamps including milliseconds



>>> On 28.02.14 at 19:57, Andrew Cooper <andrew.cooper3@xxxxxxxxxx> wrote:
> --- a/xen/drivers/char/console.c
> +++ b/xen/drivers/char/console.c
> @@ -53,6 +53,7 @@ enum con_timestamp_mode
>  {
>      TSM_NONE,          /* No timestamps */
>      TSM_DATE,          /* [YYYY-MM-DD HH:MM:SS] */
> +    TSM_DATE_MS,       /* [YYYY-MM-DD HH:MM:SS.mmmmmm] */
>      TSM_SINCE_BOOT     /* [SSSSSS.mmmmmm] */

Just ".mmm".

> @@ -588,6 +592,11 @@ static void printk_start_of_line(const char *prefix)
>              snprintf(tstr, sizeof(tstr), "[%04u-%02u-%02u %02u:%02u:%02u] ",
>                       1900 + tm.tm_year, tm.tm_mon + 1, tm.tm_mday,
>                       tm.tm_hour, tm.tm_min, tm.tm_sec);
> +        else
> +            snprintf(tstr, sizeof(tstr),
> +                     "[%04u-%02u-%02u %02u:%02u:%02u.%06"PRIu64"] ",

And on the same basis just '.%03"PRIu64"]'

> +                     1900 + tm.tm_year, tm.tm_mon + 1, tm.tm_mday,
> +                     tm.tm_hour, tm.tm_min, tm.tm_sec, nsec / 1000);

And finally "nsec / 1000000".

Or is the patch title wrong, and you meant microseconds (in which
case the enumerator should be TSM_DATE_US)?

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.