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"
20 #include "afs/sysincludes.h" /* Standard vendor system headers */
23 #if !defined(AFS_LINUX20_ENV)
26 #include <netinet/in.h>
29 #include "h/hashing.h"
31 #if !defined(AFS_HPUX110_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_DARWIN60_ENV)
32 #include <netinet/in_var.h>
33 #endif /* ! AFS_HPUX110_ENV */
34 #endif /* !defined(UKERNEL) */
36 #include "afsincludes.h" /* Afs-based standard headers */
37 #include "afs/afs_stats.h" /* afs statistics */
39 #if defined(AFS_SUN56_ENV)
41 #include <inet/common.h>
42 #if defined(AFS_SUN58_ENV)
43 #include <netinet/ip6.h>
48 #if defined(AFS_AIX_ENV)
49 #include <sys/fp_io.h>
55 * this code badly needs to be cleaned up... too many ugly ifdefs.
60 afs_warn(char *a, long b, long c, long d, long e, long f, long g, long h,
64 afs_warn(a, b, c, d, e, f, g, h, i, j)
66 #if defined( AFS_USE_VOID_PTR)
67 void *b, *c, *d, *e, *f, *g, *h, *i, *j;
69 long b, c, d, e, f, g, h, i, j;
73 AFS_STATCNT(afs_warn);
75 if (afs_showflags & GAGCONSOLE) {
76 #if defined(AFS_AIX_ENV)
79 /* cf. console_printf() in oncplus/kernext/nfs/serv/shared.c */
81 ("/dev/console", O_WRONLY | O_NOCTTY | O_NDELAY, 0666, 0, FP_SYS,
87 sprintf(buf, a, b, c, d, e, f, g, h, i, j);
89 fp_write(fd, buf, len, 0, UIO_SYSSPACE, &count);
93 printf(a, b, c, d, e, f, g, h, i, j);
100 afs_warnuser(char *a, long b, long c, long d, long e, long f, long g, long h,
104 afs_warnuser(a, b, c, d, e, f, g, h, i, j)
106 long b, c, d, e, f, g, h, i, j;
109 AFS_STATCNT(afs_warnuser);
110 if (afs_showflags & GAGUSER) {
111 #ifdef AFS_GLOBAL_SUNLOCK
112 int haveGlock = ISAFS_GLOCK();
115 #endif /* AFS_GLOBAL_SUNLOCK */
117 uprintf(a, b, c, d, e, f, g, h, i, j);
119 #ifdef AFS_GLOBAL_SUNLOCK
122 #endif /* AFS_GLOBAL_SUNLOCK */