lscpu: (arm) reuse parsed vendor ID
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
10b71aede2
commit
76b6666c0e
|
@ -225,9 +225,16 @@ static int parse_id(const char *str)
|
|||
return id;
|
||||
}
|
||||
|
||||
#define parse_implementer_id(_cxt) (parse_id((_cxt)->vendor))
|
||||
#define parse_model_id(_cxt) (parse_id((_cxt)->model))
|
||||
|
||||
static inline int parse_implementer_id(struct lscpu_cputype *ct)
|
||||
{
|
||||
if (ct->vendor_id)
|
||||
return ct->vendor_id;
|
||||
ct->vendor_id = parse_id(ct->vendor);
|
||||
return ct->vendor_id;
|
||||
}
|
||||
|
||||
/*
|
||||
* Use model and vendor IDs to decode to human readable names.
|
||||
*/
|
||||
|
|
|
@ -57,6 +57,7 @@ struct lscpu_cputype {
|
|||
int refcount;
|
||||
|
||||
char *vendor;
|
||||
int vendor_id; /* created by lscpu_decode_arm() */
|
||||
char *machinetype; /* s390 */
|
||||
char *family;
|
||||
char *model;
|
||||
|
|
Loading…
Reference in New Issue