[CRIU] [PATCH] proc_parse: don't parse the same line in a second time
Andrey Vagin
avagin at openvz.org
Sun Nov 15 04:07:20 PST 2015
From: Andrew Vagin <avagin at virtuozzo.com>
Signed-off-by: Andrew Vagin <avagin at virtuozzo.com>
---
proc_parse.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/proc_parse.c b/proc_parse.c
index 4f45cc3..65d1338 100644
--- a/proc_parse.c
+++ b/proc_parse.c
@@ -778,6 +778,7 @@ int parse_pid_status(pid_t pid, struct proc_status_creds *cr)
if (!strncmp(str, "State:", 6)) {
cr->state = str[7];
done++;
+ continue;
}
if (!strncmp(str, "PPid:", 5)) {
@@ -786,6 +787,7 @@ int parse_pid_status(pid_t pid, struct proc_status_creds *cr)
goto err_parse;
}
done++;
+ continue;
}
if (!strncmp(str, "Uid:", 4)) {
@@ -793,6 +795,7 @@ int parse_pid_status(pid_t pid, struct proc_status_creds *cr)
goto err_parse;
done++;
+ continue;
}
if (!strncmp(str, "Gid:", 4)) {
@@ -800,6 +803,7 @@ int parse_pid_status(pid_t pid, struct proc_status_creds *cr)
goto err_parse;
done++;
+ continue;
}
if (!strncmp(str, "CapInh:", 7)) {
@@ -807,6 +811,7 @@ int parse_pid_status(pid_t pid, struct proc_status_creds *cr)
goto err_parse;
done++;
+ continue;
}
if (!strncmp(str, "CapEff:", 7)) {
@@ -814,6 +819,7 @@ int parse_pid_status(pid_t pid, struct proc_status_creds *cr)
goto err_parse;
done++;
+ continue;
}
if (!strncmp(str, "CapPrm:", 7)) {
@@ -821,6 +827,7 @@ int parse_pid_status(pid_t pid, struct proc_status_creds *cr)
goto err_parse;
done++;
+ continue;
}
if (!strncmp(str, "CapBnd:", 7)) {
@@ -828,6 +835,7 @@ int parse_pid_status(pid_t pid, struct proc_status_creds *cr)
goto err_parse;
done++;
+ continue;
}
if (!strncmp(str, "Seccomp:", 8)) {
@@ -841,6 +849,7 @@ int parse_pid_status(pid_t pid, struct proc_status_creds *cr)
}
done++;
+ continue;
}
}
--
2.4.3
More information about the CRIU
mailing list