rtc_read_time(ops, &tm);  p += sprintf(p, "rtc_time\t: %02d:%02d:%02d\n" "rtc_date\t: %04d-%02d-%02d\n" "rtc_epoch\t: %04lu\n", tm.tm_hour, tm.tm_min, tm.tm_sec, tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, rtc_epoch);
if (rtc_read_time(ops, &tm) == 0) { p += sprintf(p, "rtc_time\t: %02d:%02d:%02d\n" "rtc_date\t: %04d-%02d-%02d\n" "rtc_epoch\t: %04lu\n", tm.tm_hour, tm.tm_min, tm.tm_sec, tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, rtc_epoch); }
static int rtc_read_proc(char *page, char **start, off_t off, int count, int *eof, void *data){	struct rtc_ops *ops = data;	struct rtc_wkalrm alrm;	struct rtc_time tm;	char *p = page;	rtc_read_time(ops, &tm);	p += sprintf(p,		"rtc_time\t: %02d:%02d:%02d\n"		"rtc_date\t: %04d-%02d-%02d\n"		"rtc_epoch\t: %04lu\n",		tm.tm_hour, tm.tm_min, tm.tm_sec,		tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday,		rtc_epoch);	if (rtc_read_alarm(ops, &alrm) == 0) {		p += sprintf(p, "alrm_time\t: ");		if ((unsigned int)alrm.time.tm_hour <= 24)			p += sprintf(p, "%02d:", alrm.time.tm_hour);		else			p += sprintf(p, "**:");		if ((unsigned int)alrm.time.tm_min <= 59)			p += sprintf(p, "%02d:", alrm.time.tm_min);		else			p += sprintf(p, "**:");		if ((unsigned int)alrm.time.tm_sec <= 59)			p += sprintf(p, "%02d\n", alrm.time.tm_sec);		else			p += sprintf(p, "**\n");		p += sprintf(p, "alrm_date\t: ");		if ((unsigned int)alrm.time.tm_year <= 200)			p += sprintf(p, "%04d-", alrm.time.tm_year + 1900);		else			p += sprintf(p, "****-");		if ((unsigned int)alrm.time.tm_mon <= 11)			p += sprintf(p, "%02d-", alrm.time.tm_mon + 1);		else			p += sprintf(p, "**-");		if ((unsigned int)alrm.time.tm_mday <= 31)			p += sprintf(p, "%02d\n", alrm.time.tm_mday);		else			p += sprintf(p, "**\n");		p += sprintf(p, "alrm_wakeup\t: %s\n",			     alrm.enabled ? "yes" : "no");		p += sprintf(p, "alrm_pending\t: %s\n",			     alrm.pending ? "yes" : "no");	}	if (ops->proc)		p += ops->proc(p);	return p - page;}