]> git.proxmox.com Git - mirror_lxcfs.git/commit - lxcfs.c
fix corner cases in uptime and diskstat read
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Wed, 28 Oct 2015 20:41:45 +0000 (20:41 +0000)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Wed, 28 Oct 2015 22:19:20 +0000 (17:19 -0500)
commitb5ad2d219adb18dbaa7f35b766f01775a87ebda7
tree7c8d9daf37bf9ea2732aa02700980b74ddd5b675
parentcbde18f42669632596734a5b58b8192b695656f4
fix corner cases in uptime and diskstat read

Closes #33

The code for these (a shortcut version of the other proc_*_read ones) was
doing snprintf(buf, size, ...).  If the user only requests one byte, we
just served them a trailing 0.  Fix that.

We weren't handling reads with offset in these cases either.  Fix that.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
lxcfs.c