mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 14:53:47 +08:00
procfs: Fix incorrect uptime with CONFIG_SYSTEM_TIME64
Jira: PDFW15IS-45 Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
This commit is contained in:
committed by
Masayuki Ishikawa
parent
795b4e963d
commit
ae8d5821e0
@@ -265,7 +265,11 @@ static ssize_t uptime_read(FAR struct file *filep, FAR char *buffer,
|
|||||||
|
|
||||||
/* Convert the seconds + hundredths of seconds to a string */
|
/* Convert the seconds + hundredths of seconds to a string */
|
||||||
|
|
||||||
|
#ifdef CONFIG_SYSTEM_TIME64
|
||||||
|
linesize = snprintf(attr->line, UPTIME_LINELEN, "%7llu.%02u\n", sec, csec);
|
||||||
|
#else
|
||||||
linesize = snprintf(attr->line, UPTIME_LINELEN, "%7lu.%02u\n", sec, csec);
|
linesize = snprintf(attr->line, UPTIME_LINELEN, "%7lu.%02u\n", sec, csec);
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
/* Save the linesize in case we are re-entered with f_pos > 0 */
|
/* Save the linesize in case we are re-entered with f_pos > 0 */
|
||||||
|
|||||||
Reference in New Issue
Block a user