Requires patch #14 (for kernel). Also check for number of entries read be
at least required, not exactly equal for forward compatibility.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
And do not use strcpy, better to stick with strncpy.
Moreover, to be on a safe side make proc internal
buffer big enough even for "(%16s)" format, it's
hardly possible that the kernel ever change stat
format but just to be on a safe side.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
We will later need other fields of this file, so let's parse it right
now in a way, that allows to easily get new fields.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>