printf -> kprintf, sprintf -> ksprintf
This commit is contained in:
parent
d5bc24be7a
commit
117a51c5a5
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: krpc_subr.c,v 1.16 1996/08/14 03:47:42 thorpej Exp $ */
|
||||
/* $NetBSD: krpc_subr.c,v 1.17 1996/10/10 23:31:17 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Gordon Ross, Adam Glass
|
||||
|
@ -258,7 +258,7 @@ krpc_call(sa, prog, vers, func, data, from_p)
|
|||
tport > IPPORT_RESERVED / 2);
|
||||
m_freem(m);
|
||||
if (error) {
|
||||
printf("bind failed\n");
|
||||
kprintf("bind failed\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
@ -320,7 +320,7 @@ krpc_call(sa, prog, vers, func, data, from_p)
|
|||
}
|
||||
error = sosend(so, nam, NULL, m, NULL, 0);
|
||||
if (error) {
|
||||
printf("krpc_call: sosend: %d\n", error);
|
||||
kprintf("krpc_call: sosend: %d\n", error);
|
||||
goto out;
|
||||
}
|
||||
m = NULL;
|
||||
|
@ -329,7 +329,7 @@ krpc_call(sa, prog, vers, func, data, from_p)
|
|||
if (timo < MAX_RESEND_DELAY)
|
||||
timo++;
|
||||
else
|
||||
printf("RPC timeout for server 0x%x\n",
|
||||
kprintf("RPC timeout for server 0x%x\n",
|
||||
ntohl(sin->sin_addr.s_addr));
|
||||
|
||||
/*
|
||||
|
@ -374,14 +374,14 @@ krpc_call(sa, prog, vers, func, data, from_p)
|
|||
/* Was RPC accepted? (authorization OK) */
|
||||
if (reply->rp_astatus != 0) {
|
||||
error = fxdr_unsigned(u_int32_t, reply->rp_errno);
|
||||
printf("rpc denied, error=%d\n", error);
|
||||
kprintf("rpc denied, error=%d\n", error);
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Did the call succeed? */
|
||||
if (reply->rp_status != 0) {
|
||||
error = fxdr_unsigned(u_int32_t, reply->rp_status);
|
||||
printf("rpc denied, status=%d\n", error);
|
||||
kprintf("rpc denied, status=%d\n", error);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: nfs_bio.c,v 1.27 1996/07/02 16:03:47 fvdl Exp $ */
|
||||
/* $NetBSD: nfs_bio.c,v 1.28 1996/10/10 23:31:18 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993
|
||||
|
@ -186,8 +186,8 @@ nfs_bioread(vp, uio, ioflag, cred)
|
|||
case VDIR:
|
||||
break;
|
||||
default:
|
||||
printf(" NQNFSNONCACHE: type %x unexpected\n",
|
||||
vp->v_type);
|
||||
kprintf(" NQNFSNONCACHE: type %x unexpected\n",
|
||||
vp->v_type);
|
||||
};
|
||||
}
|
||||
baddr = (caddr_t)0;
|
||||
|
@ -359,7 +359,7 @@ again:
|
|||
got_buf = 1;
|
||||
break;
|
||||
default:
|
||||
printf(" nfsbioread: type %x unexpected\n",vp->v_type);
|
||||
kprintf(" nfsbioread: type %x unexpected\n",vp->v_type);
|
||||
break;
|
||||
};
|
||||
|
||||
|
@ -379,7 +379,7 @@ again:
|
|||
bp->b_flags |= B_INVAL;
|
||||
break;
|
||||
default:
|
||||
printf(" nfsbioread: type %x unexpected\n",vp->v_type);
|
||||
kprintf(" nfsbioread: type %x unexpected\n",vp->v_type);
|
||||
}
|
||||
if (got_buf)
|
||||
brelse(bp);
|
||||
|
@ -855,7 +855,7 @@ nfs_doio(bp, cr, p)
|
|||
error = nfs_readdirrpc(vp, uiop, cr);
|
||||
break;
|
||||
default:
|
||||
printf("nfs_doio: type %x unexpected\n",vp->v_type);
|
||||
kprintf("nfs_doio: type %x unexpected\n",vp->v_type);
|
||||
break;
|
||||
};
|
||||
if (error) {
|
||||
|
@ -876,7 +876,7 @@ nfs_doio(bp, cr, p)
|
|||
iomode = NFSV3WRITE_FILESYNC;
|
||||
bp->b_flags |= B_WRITEINPROG;
|
||||
#ifdef fvdl_debug
|
||||
printf("nfs_doio(%x): bp %x doff %d dend %d\n",
|
||||
kprintf("nfs_doio(%x): bp %x doff %d dend %d\n",
|
||||
vp, bp, bp->b_dirtyoff, bp->b_dirtyend);
|
||||
#endif
|
||||
error = nfs_writerpc(vp, uiop, cr, &iomode, &must_commit);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: nfs_boot.c,v 1.26 1996/05/07 02:51:25 thorpej Exp $ */
|
||||
/* $NetBSD: nfs_boot.c,v 1.27 1996/10/10 23:31:19 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Adam Glass, Gordon Ross
|
||||
|
@ -144,7 +144,7 @@ nfs_boot_init(nd, procp)
|
|||
if (ifp == NULL)
|
||||
panic("nfs_boot: no suitable interface");
|
||||
bcopy(ifp->if_xname, ireq.ifr_name, IFNAMSIZ);
|
||||
printf("nfs_boot: using network interface '%s'\n",
|
||||
kprintf("nfs_boot: using network interface '%s'\n",
|
||||
ireq.ifr_name);
|
||||
|
||||
/*
|
||||
|
@ -168,7 +168,7 @@ nfs_boot_init(nd, procp)
|
|||
*/
|
||||
if ((error = revarpwhoami(&my_ip, ifp)) != 0)
|
||||
panic("revarp failed, error=%d", error);
|
||||
printf("nfs_boot: client_addr=0x%x\n", (u_int32_t)ntohl(my_ip.s_addr));
|
||||
kprintf("nfs_boot: client_addr=0x%x\n", (u_int32_t)ntohl(my_ip.s_addr));
|
||||
|
||||
/*
|
||||
* Do enough of ifconfig(8) so that the chosen interface
|
||||
|
@ -203,9 +203,9 @@ nfs_boot_init(nd, procp)
|
|||
error = bp_whoami(&bp_sin, &my_ip, &gw_ip);
|
||||
if (error)
|
||||
panic("nfs_boot: bootparam whoami, error=%d", error);
|
||||
printf("nfs_boot: server_addr=0x%x\n",
|
||||
kprintf("nfs_boot: server_addr=0x%x\n",
|
||||
(u_int32_t)ntohl(bp_sin.sin_addr.s_addr));
|
||||
printf("nfs_boot: hostname=%s\n", hostname);
|
||||
kprintf("nfs_boot: hostname=%s\n", hostname);
|
||||
|
||||
#ifdef NFS_BOOT_GATEWAY
|
||||
/*
|
||||
|
@ -236,12 +236,12 @@ nfs_boot_init(nd, procp)
|
|||
/* Mask: (zero length) */
|
||||
bzero(&mask, sizeof(mask));
|
||||
|
||||
printf("nfs_boot: gateway=0x%x\n", ntohl(gw_ip.s_addr));
|
||||
kprintf("nfs_boot: gateway=0x%x\n", ntohl(gw_ip.s_addr));
|
||||
/* add, dest, gw, mask, flags, 0 */
|
||||
error = rtrequest(RTM_ADD, &dst, (struct sockaddr *)&gw,
|
||||
&mask, (RTF_UP | RTF_GATEWAY | RTF_STATIC), NULL);
|
||||
if (error)
|
||||
printf("nfs_boot: add route, error=%d\n", error);
|
||||
kprintf("nfs_boot: add route, error=%d\n", error);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -401,7 +401,7 @@ bp_whoami(bpsin, my_ip, gw_ip)
|
|||
goto out;
|
||||
|
||||
bad:
|
||||
printf("nfs_boot: bootparam_whoami: bad reply\n");
|
||||
kprintf("nfs_boot: bootparam_whoami: bad reply\n");
|
||||
error = EBADRPC;
|
||||
|
||||
out:
|
||||
|
@ -485,7 +485,7 @@ bp_getfile(bpsin, key, md_sin, serv_name, pathname)
|
|||
goto out;
|
||||
|
||||
bad:
|
||||
printf("nfs_boot: bootparam_getfile: bad reply\n");
|
||||
kprintf("nfs_boot: bootparam_getfile: bad reply\n");
|
||||
error = EBADRPC;
|
||||
|
||||
out:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: nfs_nqlease.c,v 1.14 1996/02/18 14:06:50 fvdl Exp $ */
|
||||
/* $NetBSD: nfs_nqlease.c,v 1.15 1996/10/10 23:31:20 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -276,10 +276,10 @@ doreply:
|
|||
/*
|
||||
* Allocate new lease
|
||||
* The value of nqsrv_maxnumlease should be set generously, so that
|
||||
* the following "printf" happens infrequently.
|
||||
* the following "kprintf" happens infrequently.
|
||||
*/
|
||||
if (nfsstats.srvnqnfs_leases > nqsrv_maxnumlease) {
|
||||
printf("Nqnfs server, too many leases\n");
|
||||
kprintf("Nqnfs server, too many leases\n");
|
||||
do {
|
||||
(void) tsleep((caddr_t)&lbolt, PSOCK,
|
||||
"nqsrvnuml", 0);
|
||||
|
@ -501,7 +501,7 @@ nqsrv_send_eviction(vp, lp, slp, nam, cred)
|
|||
m = m->m_next;
|
||||
}
|
||||
if (siz <= 0 || siz > NFS_MAXPACKET) {
|
||||
printf("mbuf siz=%d\n",siz);
|
||||
kprintf("mbuf siz=%d\n",siz);
|
||||
panic("Bad nfs svc reply");
|
||||
}
|
||||
m = nfsm_rpchead(cred, (NFSMNT_NFSV3 | NFSMNT_NQNFS),
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: nfs_socket.c,v 1.29 1996/07/02 23:21:15 fvdl Exp $ */
|
||||
/* $NetBSD: nfs_socket.c,v 1.30 1996/10/10 23:31:21 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1991, 1993, 1995
|
||||
|
@ -562,7 +562,7 @@ tryagain:
|
|||
} while (error == EWOULDBLOCK ||
|
||||
(!error && *mp == NULL && control));
|
||||
if ((rcvflg & MSG_EOR) == 0)
|
||||
printf("Egad!!\n");
|
||||
kprintf("Egad!!\n");
|
||||
if (!error && *mp == NULL)
|
||||
error = EPIPE;
|
||||
len -= auio.uio_resid;
|
||||
|
@ -1702,7 +1702,7 @@ nfs_getreq(nd, nfsd, has_header)
|
|||
nfsm_dissect(tl, u_int32_t *, 2 * NFSX_UNSIGNED);
|
||||
if (*tl++ != rpc_auth_kerb ||
|
||||
fxdr_unsigned(int, *tl) != 4 * NFSX_UNSIGNED) {
|
||||
printf("Bad kerb verifier\n");
|
||||
kprintf("Bad kerb verifier\n");
|
||||
nd->nd_repstat = (NFSERR_AUTHERR|AUTH_BADVERF);
|
||||
nd->nd_procnum = NFSPROC_NOOP;
|
||||
return (0);
|
||||
|
@ -1710,7 +1710,7 @@ nfs_getreq(nd, nfsd, has_header)
|
|||
nfsm_dissect(cp, caddr_t, 4 * NFSX_UNSIGNED);
|
||||
tl = (u_int32_t *)cp;
|
||||
if (fxdr_unsigned(int, *tl) != RPCAKN_FULLNAME) {
|
||||
printf("Not fullname kerb verifier\n");
|
||||
kprintf("Not fullname kerb verifier\n");
|
||||
nd->nd_repstat = (NFSERR_AUTHERR|AUTH_BADVERF);
|
||||
nd->nd_procnum = NFSPROC_NOOP;
|
||||
return (0);
|
||||
|
@ -1723,7 +1723,7 @@ nfs_getreq(nd, nfsd, has_header)
|
|||
break;
|
||||
case RPCAKN_NICKNAME:
|
||||
if (len != 2 * NFSX_UNSIGNED) {
|
||||
printf("Kerb nickname short\n");
|
||||
kprintf("Kerb nickname short\n");
|
||||
nd->nd_repstat = (NFSERR_AUTHERR|AUTH_BADCRED);
|
||||
nd->nd_procnum = NFSPROC_NOOP;
|
||||
return (0);
|
||||
|
@ -1732,7 +1732,7 @@ nfs_getreq(nd, nfsd, has_header)
|
|||
nfsm_dissect(tl, u_int32_t *, 2 * NFSX_UNSIGNED);
|
||||
if (*tl++ != rpc_auth_kerb ||
|
||||
fxdr_unsigned(int, *tl) != 3 * NFSX_UNSIGNED) {
|
||||
printf("Kerb nick verifier bad\n");
|
||||
kprintf("Kerb nick verifier bad\n");
|
||||
nd->nd_repstat = (NFSERR_AUTHERR|AUTH_BADVERF);
|
||||
nd->nd_procnum = NFSPROC_NOOP;
|
||||
return (0);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: nfs_subs.c,v 1.30 1996/07/07 12:23:49 fvdl Exp $ */
|
||||
/* $NetBSD: nfs_subs.c,v 1.31 1996/10/10 23:31:22 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993
|
||||
|
@ -1080,20 +1080,20 @@ nfs_init()
|
|||
* Check to see if major data structures haven't bloated.
|
||||
*/
|
||||
if (sizeof (struct nfsnode) > NFS_NODEALLOC) {
|
||||
printf("struct nfsnode bloated (> %dbytes)\n", NFS_NODEALLOC);
|
||||
printf("Try reducing NFS_SMALLFH\n");
|
||||
kprintf("struct nfsnode bloated (> %dbytes)\n", NFS_NODEALLOC);
|
||||
kprintf("Try reducing NFS_SMALLFH\n");
|
||||
}
|
||||
if (sizeof (struct nfsmount) > NFS_MNTALLOC) {
|
||||
printf("struct nfsmount bloated (> %dbytes)\n", NFS_MNTALLOC);
|
||||
printf("Try reducing NFS_MUIDHASHSIZ\n");
|
||||
kprintf("struct nfsmount bloated (> %dbytes)\n", NFS_MNTALLOC);
|
||||
kprintf("Try reducing NFS_MUIDHASHSIZ\n");
|
||||
}
|
||||
if (sizeof (struct nfssvc_sock) > NFS_SVCALLOC) {
|
||||
printf("struct nfssvc_sock bloated (> %dbytes)\n",NFS_SVCALLOC);
|
||||
printf("Try reducing NFS_UIDHASHSIZ\n");
|
||||
kprintf("struct nfssvc_sock bloated (> %dbytes)\n",NFS_SVCALLOC);
|
||||
kprintf("Try reducing NFS_UIDHASHSIZ\n");
|
||||
}
|
||||
if (sizeof (struct nfsuid) > NFS_UIDALLOC) {
|
||||
printf("struct nfsuid bloated (> %dbytes)\n",NFS_UIDALLOC);
|
||||
printf("Try unionizing the nu_nickname and nu_flag fields\n");
|
||||
kprintf("struct nfsuid bloated (> %dbytes)\n",NFS_UIDALLOC);
|
||||
kprintf("Try unionizing the nu_nickname and nu_flag fields\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: nfs_syscalls.c,v 1.19 1996/02/18 11:53:52 fvdl Exp $ */
|
||||
/* $NetBSD: nfs_syscalls.c,v 1.20 1996/10/10 23:31:24 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993
|
||||
|
@ -644,7 +644,7 @@ nfssvc_nfsd(nsd, argp, p)
|
|||
m = m->m_next;
|
||||
}
|
||||
if (siz <= 0 || siz > NFS_MAXPACKET) {
|
||||
printf("mbuf siz=%d\n",siz);
|
||||
kprintf("mbuf siz=%d\n",siz);
|
||||
panic("Bad nfs svc reply");
|
||||
}
|
||||
m = mreq;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: nfs_vfsops.c,v 1.49 1996/06/24 10:26:40 pk Exp $ */
|
||||
/* $NetBSD: nfs_vfsops.c,v 1.50 1996/10/10 23:31:25 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993, 1995
|
||||
|
@ -291,7 +291,7 @@ nfs_mountroot()
|
|||
*/
|
||||
nfs_boot_getfh(&nd.nd_boot, "root", &nd.nd_root);
|
||||
mp = nfs_mount_diskless(&nd.nd_root, "/", 0, &vp);
|
||||
printf("root on %s\n", nd.nd_root.ndm_host);
|
||||
kprintf("root on %s\n", nd.nd_root.ndm_host);
|
||||
|
||||
/*
|
||||
* Link it into the mount list.
|
||||
|
@ -316,7 +316,7 @@ nfs_mountroot()
|
|||
if (error) panic("nfs_mountroot: getattr for root");
|
||||
n = attr.va_mtime.tv_sec;
|
||||
#ifdef DEBUG
|
||||
printf("root time: 0x%lx\n", n);
|
||||
kprintf("root time: 0x%lx\n", n);
|
||||
#endif
|
||||
inittodr(n);
|
||||
|
||||
|
@ -345,7 +345,7 @@ nfs_mountroot()
|
|||
if (bdevvp(swapdev, &swapdev_vp))
|
||||
panic("nfs_mountroot: can't setup swap vp");
|
||||
if (swdevt[0].sw_dev != NODEV) {
|
||||
printf("swap on device 0x%x\n", swdevt[0].sw_dev);
|
||||
kprintf("swap on device 0x%x\n", swdevt[0].sw_dev);
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
@ -359,7 +359,7 @@ nfs_mountroot()
|
|||
#ifdef Lite2_integrated
|
||||
vfs_unbusy(mp, procp);
|
||||
#endif
|
||||
printf("swap on %s\n", nd.nd_swap.ndm_host);
|
||||
kprintf("swap on %s\n", nd.nd_swap.ndm_host);
|
||||
|
||||
/*
|
||||
* Since the swap file is not the root dir of a file system,
|
||||
|
@ -377,7 +377,7 @@ nfs_mountroot()
|
|||
panic("nfs_mountroot: getattr for swap");
|
||||
n = (long) (attr.va_size >> DEV_BSHIFT);
|
||||
#ifdef DEBUG
|
||||
printf("swap size: 0x%lx (blocks)\n", n);
|
||||
kprintf("swap size: 0x%lx (blocks)\n", n);
|
||||
#endif
|
||||
swdevt[0].sw_nblks = n;
|
||||
|
||||
|
@ -547,7 +547,7 @@ nfs_decode_args(nmp, argp)
|
|||
nfs_disconnect(nmp);
|
||||
if (nmp->nm_sotype == SOCK_DGRAM)
|
||||
while (nfs_connect(nmp, (struct nfsreq *)0)) {
|
||||
printf("nfs_args: retrying connect\n");
|
||||
kprintf("nfs_args: retrying connect\n");
|
||||
(void) tsleep((caddr_t)&lbolt,
|
||||
PSOCK, "nfscon", 0);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: nfs_vnops.c,v 1.65 1996/09/07 12:41:29 mycroft Exp $ */
|
||||
/* $NetBSD: nfs_vnops.c,v 1.66 1996/10/10 23:31:26 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993
|
||||
|
@ -397,7 +397,7 @@ nfs_open(v)
|
|||
|
||||
if (vp->v_type != VREG && vp->v_type != VDIR && vp->v_type != VLNK) {
|
||||
#ifdef DIAGNOSTIC
|
||||
printf("open eacces vtyp=%d\n",vp->v_type);
|
||||
kprintf("open eacces vtyp=%d\n",vp->v_type);
|
||||
#endif
|
||||
return (EACCES);
|
||||
}
|
||||
|
@ -2164,7 +2164,7 @@ nfs_readdirrpc(vp, uiop, cred)
|
|||
dnp->n_direofoffset = uiop->uio_offset;
|
||||
else {
|
||||
if (uiop->uio_resid > 0)
|
||||
printf("EEK! readdirrpc resid > 0\n");
|
||||
kprintf("EEK! readdirrpc resid > 0\n");
|
||||
cookiep = nfs_getcookie(dnp, uiop->uio_offset, 1);
|
||||
*cookiep = cookie;
|
||||
}
|
||||
|
@ -2388,7 +2388,7 @@ nfs_readdirplusrpc(vp, uiop, cred)
|
|||
dnp->n_direofoffset = uiop->uio_offset;
|
||||
else {
|
||||
if (uiop->uio_resid > 0)
|
||||
printf("EEK! readdirplusrpc resid > 0\n");
|
||||
kprintf("EEK! readdirplusrpc resid > 0\n");
|
||||
cookiep = nfs_getcookie(dnp, uiop->uio_offset, 1);
|
||||
*cookiep = cookie;
|
||||
}
|
||||
|
@ -2939,13 +2939,13 @@ nfs_print(v)
|
|||
register struct vnode *vp = ap->a_vp;
|
||||
register struct nfsnode *np = VTONFS(vp);
|
||||
|
||||
printf("tag VT_NFS, fileid %ld fsid 0x%lx",
|
||||
np->n_vattr.va_fileid, np->n_vattr.va_fsid);
|
||||
kprintf("tag VT_NFS, fileid %ld fsid 0x%lx",
|
||||
np->n_vattr.va_fileid, np->n_vattr.va_fsid);
|
||||
#ifdef FIFO
|
||||
if (vp->v_type == VFIFO)
|
||||
fifo_printinfo(vp);
|
||||
#endif
|
||||
printf("\n");
|
||||
kprintf("\n");
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
@ -3021,7 +3021,7 @@ nfs_writebp(bp, force)
|
|||
panic("bwrite: buffer is not busy???");
|
||||
|
||||
#ifdef fvdl_debug
|
||||
printf("nfs_writebp(%x): vp %x voff %d vend %d doff %d dend %d\n",
|
||||
kprintf("nfs_writebp(%x): vp %x voff %d vend %d doff %d dend %d\n",
|
||||
bp, bp->b_vp, bp->b_validoff, bp->b_validend, bp->b_dirtyoff,
|
||||
bp->b_dirtyend);
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue