Re: [PATCH v1 00/25] lib, rtc: Print rtc_time via %pt[dt][rv]

From: Andy Shevchenko
Date: Thu Jul 20 2017 - 06:33:53 EST


On Tue, 2017-07-18 at 12:57 -0700, Mark Salyzyn wrote:
> On 07/18/2017 10:50 AM, Joe Perches wrote:
> > On Thu, 2017-06-08 at 16:47 +0300, Andy Shevchenko wrote:
> > > Recently I have noticed too many users of struct rtc_time that
> > > printing
> > > its content field by field.
> > >
> > > In this series I introduce %pt[dt][rv] specifier to make life a
> > > bit
> > > easier.
> >
> > Hey Andy.
> >
> > I just saw a patch with a printk for rtc time from Mark Salyzyn.
> > https://lkml.org/lkml/2017/7/18/885
> >
> > Any idea if you want to push this extension?
> >
> > I like the concept and still think it could be extended a bit more.
> >
> > from: https://lkml.org/lkml/2017/6/8/1134
> >
> > My preference would be for %pt[type]<output style>
> > where <type> is mandatory and could be:
> >
> > ÂÂÂÂÂÂÂÂÂr for struct rtc_time
> > ÂÂÂÂÂÂÂÂÂ6 for time64_t
> > ÂÂÂÂÂÂÂÂÂk for ktime_t
> > ÂÂÂÂÂÂÂÂÂT for struct timespec64
> > ÂÂÂÂÂÂÂÂÂetc
> >
> > and <output style> has an unspecified default of
> > YYYY-MM-DD:hh:mm:ss
> >
> > Perhaps use the "date" formats without the leading
> > % uses for <output style> for additional styles.
> >
>
> YYYY-MM-DD hh:mm:ss.nnnnnnnnn ?

As a separate modifier, yes.

See my answer to subthread in patch 4.

--
Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Intel Finland Oy