2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
11 * afs_warn.c - afs_warn
13 * Implements: afs_warn, afs_warnuser
15 #include <afsconfig.h>
16 #include "afs/param.h"
22 #include "afs/sysincludes.h" /* Standard vendor system headers */
25 #if !defined(AFS_LINUX20_ENV)
28 #include <netinet/in.h>
31 #include "h/hashing.h"
33 #if !defined(AFS_HPUX110_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_DARWIN60_ENV)
34 #include <netinet/in_var.h>
35 #endif /* ! AFS_HPUX110_ENV */
36 #endif /* !defined(UKERNEL) */
38 #include "afsincludes.h" /* Afs-based standard headers */
39 #include "afs/afs_stats.h" /* afs statistics */
41 #if defined(AFS_SUN56_ENV)
43 #include <inet/common.h>
44 #if defined(AFS_SUN58_ENV)
45 #include <netinet/ip6.h>
50 #if defined(AFS_AIX_ENV)
51 #include <sys/fp_io.h>
57 * this code badly needs to be cleaned up... too many ugly ifdefs.
62 afs_warn(char *a, long b, long c, long d, long e, long f, long g, long h,
66 afs_warn(a, b, c, d, e, f, g, h, i, j)
68 #if defined( AFS_USE_VOID_PTR)
69 void *b, *c, *d, *e, *f, *g, *h, *i, *j;
71 long b, c, d, e, f, g, h, i, j;
75 AFS_STATCNT(afs_warn);
77 if (afs_showflags & GAGCONSOLE) {
78 #if defined(AFS_AIX_ENV)
81 /* cf. console_printf() in oncplus/kernext/nfs/serv/shared.c */
83 ("/dev/console", O_WRONLY | O_NOCTTY | O_NDELAY, 0666, 0, FP_SYS,
89 sprintf(buf, a, b, c, d, e, f, g, h, i, j);
91 fp_write(fd, buf, len, 0, UIO_SYSSPACE, &count);
95 printf(a, b, c, d, e, f, g, h, i, j);
102 afs_warnuser(char *a, long b, long c, long d, long e, long f, long g, long h,
106 afs_warnuser(a, b, c, d, e, f, g, h, i, j)
108 long b, c, d, e, f, g, h, i, j;
111 AFS_STATCNT(afs_warnuser);
112 if (afs_showflags & GAGUSER) {
113 #ifdef AFS_GLOBAL_SUNLOCK
114 int haveGlock = ISAFS_GLOCK();
117 #endif /* AFS_GLOBAL_SUNLOCK */
119 uprintf(a, b, c, d, e, f, g, h, i, j);
121 #ifdef AFS_GLOBAL_SUNLOCK
124 #endif /* AFS_GLOBAL_SUNLOCK */