openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/util-linux/2.33.2-r0/util-linux-2.33.2/sys-utils/hwclock.c
static int read_hardware_clock(const struct hwclock_control* ctl, int* valid_p,
                               time_t* systime_p)
{
    struct tm tm;
    int err;

    err = ur->read_hardware_clock(ctl, &tm);
    if (err)
        return err;

    if (ctl->verbose)
        printf(
            _("Time read from Hardware Clock: %4d/%.2d/%.2d %02d:%02d:%02d\n"),
            tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min,
            tm.tm_sec);
    *valid_p = mktime_tz(ctl, tm, systime_p);

    return 0;
}
/*
 * Read the hardware clock and return the current time via <tm> argument.
 *
 * Use the method indicated by <method> argument to access the hardware
 * clock.
 */
Read the hardware clock and return the current time via  argument.
Use the method indicated by  argument to access the hardware
clock.
Read the hardware clock and return the current time via argument . Use the method indicated by argument to access the hardware clock .
static int read_hardware_clock(const struct hwclock_control* ctl, int* valid_p,
                               time_t* systime_p)
{
    struct tm tm;
    int err;
    err = ur->read_hardware_clock(ctl, &tm);
    if (err)
        return err;
    if (ctl->verbose)
        printf(
            _("Time read from Hardware Clock: %4d/%.2d/%.2d %02d:%02d:%02d\n"),
            tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, tm.tm_hour, tm.tm_min,
            tm.tm_sec);
    *valid_p = mktime_tz(ctl, tm, systime_p);
    return 0;
}
static int read_hardware_clock ( const struct hwclock_control * ctl , int * valid_p , time_t * systime_p ) { struct tm tm ; int err ; err = ur -> read_hardware_clock ( ctl , & tm ) ; if ( err ) return err ; if ( ctl -> verbose ) printf ( _ ( " \n " ) , tm . tm_year + 1900 , tm . tm_mon + 1 , tm . tm_mday , tm . tm_hour , tm . tm_min , tm . tm_sec ) ; * valid_p = mktime_tz ( ctl , tm , systime_p ) ; return 0 ; }
Read the hardware clock and return the current time via <tm> argument.
Read the hardware clock and return the current time via <tm > argument .