mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-21 19:02:25 +00:00
cpu-parse: Move model name detection to new script
Signed-off-by: Tim Wiederhake <twiederh@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
2933047c02
commit
29584c4a48
@ -196,6 +196,7 @@ def parse(args):
|
||||
data = json.load(sys.stdin)
|
||||
|
||||
os.environ["CPU_GATHER_PY"] = "true"
|
||||
os.environ["model"] = data["name"]
|
||||
output = subprocess.check_output(
|
||||
"./cpu-parse.sh",
|
||||
input=output_to_text(data),
|
||||
|
@ -7,8 +7,6 @@ fi
|
||||
|
||||
data=`cat`
|
||||
|
||||
model=`sed -ne '/^model name[ ]*:/ {s/^[^:]*: \(.*\)/\1/p; q}' <<<"$data"`
|
||||
|
||||
fname=`sed -e 's/^ *//;
|
||||
s/ *$//;
|
||||
s/[ -]\+ \+/ /g;
|
||||
|
Loading…
x
Reference in New Issue
Block a user