Clang doesn't like a nonliteral format string, and some kernel
builds (e.g., freebsd) are done with -Werror. Use the standard
workaround for FreeBSD and UKERNEL builds by calling vsnprintf()
into a fixed buffer.
Remove the !defined(AFS_LINUX26_ENV) check, as it duplicates a
conditional around the entirety of osi_Panic().
Change-Id: If6287dd19604b78150c81febba8a59b73f56783c
Reviewed-on: http://gerrit.openafs.org/9880
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
icmn_err(CE_PANIC, msg, ap);
va_end(ap);
}
-#elif defined(AFS_DARWIN80_ENV) || (defined(AFS_LINUX22_ENV) && !defined(AFS_LINUX_26_ENV))
+#elif defined(AFS_DARWIN80_ENV) || defined(AFS_LINUX22_ENV) || defined(AFS_FBSD_ENV) || defined(UKERNEL)
char buf[256];
va_list ap;
if (!msg)
vsnprintf(buf, sizeof(buf), msg, ap);
va_end(ap);
printf("%s", buf);
- panic(buf);
+ panic("%s", buf);
#else
va_list ap;
if (!msg)