From 801a5f65fa83f03eb8627875c670652cf8c30e4b Mon Sep 17 00:00:00 2001 From: Jiri Denemark Date: Tue, 29 Mar 2016 15:35:19 +0200 Subject: [PATCH] qemu: Fix /proc/**/stat parsing Since commit v1.3.2-119-g1e34a8f which enabled debug-threads in QEMU qemuGetProcessInfo would fail to parse stats for any thread with a space in its name. https://bugzilla.redhat.com/show_bug.cgi?id=1316803 Signed-off-by: Jiri Denemark --- src/qemu/qemu_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index f3503200e3..a0a33a499b 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -1460,7 +1460,7 @@ qemuGetProcessInfo(unsigned long long *cpuTime, int *lastCpu, long *vm_rss, if (!pidinfo || fscanf(pidinfo, /* pid -> stime */ - "%*d %*s %*c %*d %*d %*d %*d %*d %*u %*u %*u %*u %*u %llu %llu" + "%*d (%*[^)]) %*c %*d %*d %*d %*d %*d %*u %*u %*u %*u %*u %llu %llu" /* cutime -> endcode */ "%*d %*d %*d %*d %*d %*d %*u %*u %ld %*u %*u %*u" /* startstack -> processor */