Merged in masayuki2009/nuttx.nuttx/bug_fix_by_sony (pull request #334)
procfs: Fix incorrect uptime with CONFIG_SYSTEM_TIME64
This commit is contained in:
commit
7ded9dffe2
1 changed files with 4 additions and 0 deletions
|
|
@ -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 */
|
||||
|
||||
#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);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/* Save the linesize in case we are re-entered with f_pos > 0 */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue