#ifdef AFS_GLOBAL_SUNLOCK
-# if defined(AFS_AIX_ENV) || defined(AFS_SGI_ENV)
-#define AFS_ASSERT_GLOCK() \
- do { if (!ISAFS_GLOCK()) osi_Panic("afs global lock not held at %s:%d%s\n", __FILE__, (void *)__LINE__, ""); } while (0)
-# else
#define AFS_ASSERT_GLOCK() \
do { if (!ISAFS_GLOCK()) osi_Panic("afs global lock not held at %s:%d\n", __FILE__, __LINE__); } while (0)
-# endif /* defined(AFS_AIX_ENV) || defined(AFS_SGI_ENV) */
#endif /* AFS_GLOBAL_SUNLOCK */
#ifdef RX_ENABLE_LOCKS
#if defined(AFS_LINUX26_ENV)
# define afs_vprintf(fmt, ap) vprintk(fmt, ap)
+#elif defined(AFS_SGI_ENV)
+# define afs_vprintf(fmt, ap) icmn_err(CE_WARN, fmt, ap)
#elif (defined(AFS_DARWIN80_ENV) && !defined(AFS_DARWIN90_ENV)) || (defined(AFS_LINUX22_ENV))
-static_inline void afs_vprintf(const char *fmt, va_list ap) {
- char buf[256];
+static_inline void
+afs_vprintf(const char *fmt, va_list ap) {
+ char buf[256];
- vsnprintf(buf, sizeof(buf), fmt, ap);
- printf(buf);
+ vsnprintf(buf, sizeof(buf), fmt, ap);
+ printf(buf);
}
#else
# define afs_vprintf(fmt, ap) vprintf(fmt, ap)
#if !defined(AFS_LINUX26_ENV)
void
-#if defined(AFS_AIX_ENV) || defined(AFS_SGI_ENV)
+#if defined(AFS_AIX_ENV)
osi_Panic(char *msg, void *a1, void *a2, void *a3)
#else
osi_Panic(char *msg, ...)
#endif
{
-#if defined(AFS_AIX_ENV) || defined(AFS_SGI_ENV)
+#ifdef AFS_AIX_ENV
if (!msg)
- msg = "Unknown AFS panic";
+ msg = "Unknown AFS panic";
+ /*
+ * we should probably use the errsave facility here. it is not
+ * varargs-aware
+ */
+
printf(msg, a1, a2, a3);
panic(msg);
-#elif (defined(AFS_DARWIN80_ENV) && !defined(AFS_DARWIN90_ENV)) || (defined(AFS_LINUX22_ENV) && !defined(AFS_LINUX_26_ENV))
+#elif defined(AFS_SGI_ENV)
+ va_list ap;
+
+ /* Solaris has vcmn_err, Sol10 01/06 may have issues. Beware. */
+ if (!msg) {
+ cmn_err(CE_PANIC, "Unknown AFS panic");
+ } else {
+ va_start(ap, msg);
+ icmn_err(CE_PANIC, msg, ap);
+ va_end(ap);
+ }
+#elif defined(AFS_DARWIN80_ENV) || (defined(AFS_LINUX22_ENV) && !defined(AFS_LINUX_26_ENV))
char buf[256];
va_list ap;
if (!msg)
do { if (!(expr)) { osi_AssertFailK(#expr, __FILE__, __LINE__); BUG(); } } while (0)
# elif (defined(AFS_AIX_ENV) && !defined(AFS_AIX61_ENV))
extern void osi_Panic(char *fmt, void *a1, void *a2, void *a3);
-# elif defined(AFS_AIX61_ENV) || defined(AFS_SGI_ENV)
+# elif defined(AFS_AIX61_ENV)
/* No prototype. Deliberate, since there's no vprintf et al */
# else
extern void osi_Panic(char *fmt, ...)