Commit 4ee50534 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

proc: Drop parse_cpuinfo_features helper

We use native cpuid, so this one is no longer used.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent ba743509
......@@ -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);
......
......@@ -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)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment