[CRIU] [PATCH] bfd: timerfd -- Fix parsing typo

Cyrill Gorcunov gorcunov at openvz.org
Tue Sep 30 00:41:36 PDT 2014


While been converting reading of data stream
to bfd the @buf member was left untouched leading
to incorrect data to be read, fix it setting up
proper one, ie @str itself, otherwise dumping
of timerfd files are failing.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 proc_parse.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/proc_parse.c b/proc_parse.c
index 40c30228f711..d63d67755249 100644
--- a/proc_parse.c
+++ b/proc_parse.c
@@ -1102,7 +1102,7 @@ static int parse_timerfd(struct bfd *f, char *str, TimerfdEntry *tfy)
 	 * it_value: (0, 49406829)
 	 * it_interval: (1, 0)
 	 */
-	if (sscanf(buf, "clockid: %d", &tfy->clockid) != 1)
+	if (sscanf(str, "clockid: %d", &tfy->clockid) != 1)
 		goto parse_err;
 
 	str = breadline(f);
-- 
1.9.3



More information about the CRIU mailing list