# HG changeset patch # User Robert Mustacchi # Date 1313106475 25200 # Node ID 2b3b7ee313efe01f2d0c85f5dddbc7a01a35650c # Parent f92414e708c07057bf99e8530399826044ca9a2e 1347 isainfo should indicate presence of vmx/svm support (fix lint) diff -r f92414e708c0 -r 2b3b7ee313ef usr/src/uts/intel/ia32/os/archdep.c --- a/usr/src/uts/intel/ia32/os/archdep.c Thu Aug 11 10:31:52 2011 -0700 +++ b/usr/src/uts/intel/ia32/os/archdep.c Thu Aug 11 16:47:55 2011 -0700 @@ -962,9 +962,24 @@ auxv_hwcap |= AV_386_AHF; #endif - if (auxv_hwcap_include || auxv_hwcap_exclude) - cmn_err(CE_CONT, "?user ABI extensions: %b\n", - auxv_hwcap, FMT_AV_386); + if (auxv_hwcap_include || auxv_hwcap_exclude) { + /* + * The below assignment is regrettably required to get lint + * to accept the validity of our format string. The format + * string is in fact valid, but whatever intelligence in lint + * understands the cmn_err()-specific %b appears to have an + * off-by-one error: it (mistakenly) complains about bit + * number 32 (even though this is explicitly permitted). + * Normally, one would will away such warnings with a "LINTED" + * directive, but for reasons unclear and unknown, lint + * refuses to be assuaged in this case. Fortunately, lint + * doesn't pretend to have solved the Halting Problem -- + * and as soon as the format string is programmatic, it + * knows enough to shut up. + */ + const char *fmt = "?user ABI extensions: %b\n"; + cmn_err(CE_CONT, fmt, auxv_hwcap, FMT_AV_386); + } #if defined(_SYSCALL32_IMPL) auxv_hwcap32 = (auxv_hwcap32_include | cpu_hwcap_flags) & @@ -986,9 +1001,13 @@ auxv_hwcap32 |= AV_386_AHF; #endif - if (auxv_hwcap32_include || auxv_hwcap32_exclude) - cmn_err(CE_CONT, "?32-bit user ABI extensions: %b\n", - auxv_hwcap32, FMT_AV_386); + if (auxv_hwcap32_include || auxv_hwcap32_exclude) { + /* + * See the block comment in the cmn_err() of auxv_hwcap, above. + */ + const char *fmt = "?32-bit user ABI extensions: %b\n"; + cmn_err(CE_CONT, fmt, auxv_hwcap32, FMT_AV_386); + } #endif }