2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-27 12:28:14 +00:00

56 Commits

Author SHA1 Message Date
Cyrill Gorcunov
f80694deed proc_pase: Make sure we may scan up to 15 symbols in name
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>
2012-01-15 22:37:17 +04:00
Cyrill Gorcunov
fd0802ab66 proc_parse: Drop ending ')' from format
%s specificator eats it and matching stream fails.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2012-01-15 01:42:08 +04:00
Cyrill Gorcunov
acfd1d7fc4 crtools: Fix command line parsing in parse_pid_stat
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2012-01-14 02:00:59 +04:00
Cyrill Gorcunov
1e073d05eb crtools: A few style update on proc_parse
No func changes.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2012-01-14 02:00:48 +04:00
Pavel Emelyanov
3202d72f85 crtools: Parse /proc/pid/stat in a more readable way
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>
2012-01-14 02:00:38 +04:00
Pavel Emelyanov
12d4c85410 crtools: Move proc parsing routines to one file
Start with /proc/pid/maps parser

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2012-01-14 02:00:26 +04:00