Avoid unaligned accesses in cpu_vendor_intel() and address a few other
nits. No functional change intended.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 50080 Build 46972: arc lint + arc unit
Event Timeline
usr.sbin/bhyvectl/bhyvectl.c | ||
---|---|---|
661 | I think more correct would be to do something along the lines of: u_int v[3]; ... v[0] = regs[1]; v[1] = regs[3]; v[2] = regs[2]; if (memcmp(v, "GenuineIntel", sizeof(v)) == 0) etc. It is always a 12 byte comparison and doesn't vary based on the vendor string length. Instead, vendors always adopt a 12 byte string as their signature. |