]> git.proxmox.com Git - mirror_lxcfs.git/commit - lxcfs.c
Change "uptime" format
authorBernhard Miklautz <bernhard.miklautz@shacknet.at>
Wed, 28 Oct 2015 13:07:28 +0000 (14:07 +0100)
committerBernhard Miklautz <bernhard.miklautz@shacknet.at>
Wed, 28 Oct 2015 13:07:28 +0000 (14:07 +0100)
commit38056ebc7a27b1dd576ceb4088519a26f1629bf0
treebb8a958b81a95a6f2c1f471b1f991db55819c868
parent6745e13dd52b85357922e5c779f9a724231daa62
Change "uptime" format

/proc/uptime has the format %lu.%02lu %lu.%02lu. The format used by
lxcfs doesn't consider the nano second portion of the uptime which might
cause programs that rely on that format to fail.

This commit adapts the uptime format to match the kernels by adding
trailing dummy values (.0) to the uptime and idle time values.
The parsing of /proc/uptime was updated.

Signed-off-by: Bernhard Miklautz <bernhard.miklautz@shacknet.at>
lxcfs.c
tests/test_proc