[CRIU] [PATCH] proc: Drop parse_cpuinfo_features helper

Cyrill Gorcunov gorcunov at openvz.org
Mon Jul 27 15:47:17 PDT 2015


We use native cpuid, so this one is no longer used.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 include/proc_parse.h |  1 -
 proc_parse.c         | 27 ---------------------------
 2 files changed, 28 deletions(-)

diff --git a/include/proc_parse.h b/include/proc_parse.h
index e9b60eebaf00..20bd5bcdc9e2 100644
--- a/include/proc_parse.h
+++ b/include/proc_parse.h
@@ -210,7 +210,6 @@ extern int parse_fdinfo(int fd, int type,
 		int (*cb)(union fdinfo_entries *e, void *arg), void *arg);
 extern int parse_fdinfo_pid(int pid, int fd, int type,
 		int (*cb)(union fdinfo_entries *e, void *arg), void *arg);
-extern int parse_cpuinfo_features(int (*handler)(char *tok));
 extern int parse_file_locks(void);
 extern int get_fd_mntid(int fd, int *mnt_id);
 
diff --git a/proc_parse.c b/proc_parse.c
index 8a03fea40ef2..5b44f72ed4bf 100644
--- a/proc_parse.c
+++ b/proc_parse.c
@@ -50,33 +50,6 @@ static char *buf = __buf.buf;
 
 #define AIO_FNAME	"/[aio]"
 
-int parse_cpuinfo_features(int (*handler)(char *tok))
-{
-	FILE *cpuinfo;
-
-	cpuinfo = fopen_proc(PROC_GEN, "cpuinfo");
-	if (!cpuinfo) {
-		pr_perror("Can't open cpuinfo file");
-		return -1;
-	}
-
-	while (fgets(buf, BUF_SIZE, cpuinfo)) {
-		char *tok;
-
-		if (strncmp(buf, "flags\t\t:", 8))
-			continue;
-
-		for (tok = strtok(buf, " \t\n"); tok;
-		     tok = strtok(NULL, " \t\n")) {
-			if (handler(tok) < 0)
-				break;
-		}
-	}
-
-	fclose(cpuinfo);
-	return 0;
-}
-
 /* check the @line starts with "%lx-%lx" format */
 static bool is_vma_range_fmt(char *line)
 {
-- 
2.4.3



More information about the CRIU mailing list