From owner-svn-src-all@freebsd.org Wed Aug 3 15:58:22 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28B3BBAD5D4; Wed, 3 Aug 2016 15:58:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0691A18A7; Wed, 3 Aug 2016 15:58:21 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u73FwLbt052261; Wed, 3 Aug 2016 15:58:21 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u73FwKbP052257; Wed, 3 Aug 2016 15:58:20 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201608031558.u73FwKbP052257@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 3 Aug 2016 15:58:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303715 - head/sys/fs/nfsclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Aug 2016 15:58:22 -0000 Author: kib Date: Wed Aug 3 15:58:20 2016 New Revision: 303715 URL: https://svnweb.freebsd.org/changeset/base/303715 Log: Remove ncl_printf(), use printf(9) directly. After r303710 the function duplicates printf(). Correct function names in the messages [*]. Noted by: bde [*] Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/fs/nfsclient/nfs_clbio.c head/sys/fs/nfsclient/nfs_clsubs.c head/sys/fs/nfsclient/nfs_clvnops.c head/sys/fs/nfsclient/nfsnode.h Modified: head/sys/fs/nfsclient/nfs_clbio.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clbio.c Wed Aug 3 15:39:58 2016 (r303714) +++ head/sys/fs/nfsclient/nfs_clbio.c Wed Aug 3 15:58:20 2016 (r303715) @@ -103,7 +103,7 @@ ncl_getpages(struct vop_getpages_args *a npages = ap->a_count; if ((object = vp->v_object) == NULL) { - ncl_printf("nfs_getpages: called with non-merged cache vnode??\n"); + printf("ncl_getpages: called with non-merged cache vnode\n"); return (VM_PAGER_ERROR); } @@ -111,7 +111,7 @@ ncl_getpages(struct vop_getpages_args *a mtx_lock(&np->n_mtx); if ((np->n_flag & NNONCACHE) && (vp->v_type == VREG)) { mtx_unlock(&np->n_mtx); - ncl_printf("nfs_getpages: called on non-cacheable vnode??\n"); + printf("ncl_getpages: called on non-cacheable vnode\n"); return (VM_PAGER_ERROR); } else mtx_unlock(&np->n_mtx); @@ -166,7 +166,7 @@ ncl_getpages(struct vop_getpages_args *a relpbuf(bp, &ncl_pbuf_freecnt); if (error && (uio.uio_resid == count)) { - ncl_printf("nfs_getpages: error %d\n", error); + printf("ncl_getpages: error %d\n", error); return (VM_PAGER_ERROR); } @@ -267,7 +267,7 @@ ncl_putpages(struct vop_putpages_args *a if (newnfs_directio_enable && !newnfs_directio_allow_mmap && (np->n_flag & NNONCACHE) && (vp->v_type == VREG)) { mtx_unlock(&np->n_mtx); - ncl_printf("ncl_putpages: called on noncache-able vnode??\n"); + printf("ncl_putpages: called on noncache-able vnode\n"); mtx_lock(&np->n_mtx); } @@ -678,7 +678,7 @@ ncl_bioread(struct vnode *vp, struct uio n = np->n_direofoffset - uio->uio_offset; break; default: - ncl_printf(" ncl_bioread: type %x unexpected\n", vp->v_type); + printf(" ncl_bioread: type %x unexpected\n", vp->v_type); bp = NULL; break; } @@ -1121,7 +1121,7 @@ again: */ if (bp->b_dirtyend > bcount) { - ncl_printf("NFS append race @%lx:%d\n", + printf("NFS append race @%lx:%d\n", (long)bp->b_blkno * DEV_BSIZE, bp->b_dirtyend - bcount); bp->b_dirtyend = bcount; @@ -1662,7 +1662,7 @@ ncl_doio(struct vnode *vp, struct buf *b bp->b_flags |= B_INVAL; break; default: - ncl_printf("ncl_doio: type %x unexpected\n", vp->v_type); + printf("ncl_doio: type %x unexpected\n", vp->v_type); break; } if (error) { Modified: head/sys/fs/nfsclient/nfs_clsubs.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clsubs.c Wed Aug 3 15:39:58 2016 (r303714) +++ head/sys/fs/nfsclient/nfs_clsubs.c Wed Aug 3 15:58:20 2016 (r303715) @@ -161,16 +161,6 @@ ncl_downgrade_vnlock(struct vnode *vp, i } } -void -ncl_printf(const char *fmt, ...) -{ - va_list ap; - - va_start(ap, fmt); - vprintf(fmt, ap); - va_end(ap); -} - #ifdef NFS_ACDEBUG #include SYSCTL_DECL(_vfs_nfs); @@ -201,7 +191,7 @@ ncl_getattrcache(struct vnode *vp, struc #ifdef NFS_ACDEBUG if (nfs_acdebug>1) - ncl_printf("nfs_getattrcache: initial timeo = %d\n", timeo); + printf("ncl_getattrcache: initial timeo = %d\n", timeo); #endif if (vap->va_type == VDIR) { @@ -218,13 +208,13 @@ ncl_getattrcache(struct vnode *vp, struc #ifdef NFS_ACDEBUG if (nfs_acdebug > 2) - ncl_printf("acregmin %d; acregmax %d; acdirmin %d; acdirmax %d\n", - nmp->nm_acregmin, nmp->nm_acregmax, - nmp->nm_acdirmin, nmp->nm_acdirmax); + printf("acregmin %d; acregmax %d; acdirmin %d; acdirmax %d\n", + nmp->nm_acregmin, nmp->nm_acregmax, + nmp->nm_acdirmin, nmp->nm_acdirmax); if (nfs_acdebug) - ncl_printf("nfs_getattrcache: age = %d; final timeo = %d\n", - (time_second - np->n_attrstamp), timeo); + printf("ncl_getattrcache: age = %d; final timeo = %d\n", + (time_second - np->n_attrstamp), timeo); #endif if ((time_second - np->n_attrstamp) >= timeo && Modified: head/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvnops.c Wed Aug 3 15:39:58 2016 (r303714) +++ head/sys/fs/nfsclient/nfs_clvnops.c Wed Aug 3 15:58:20 2016 (r303715) @@ -1785,7 +1785,7 @@ nfs_rename(struct vop_rename_args *ap) } if (fvp == tvp) { - ncl_printf("nfs_rename: fvp == tvp (can't happen)\n"); + printf("nfs_rename: fvp == tvp (can't happen)\n"); error = 0; goto out; } @@ -2313,7 +2313,7 @@ ncl_readdirrpc(struct vnode *vp, struct dnp->n_direofoffset = uiop->uio_offset; else { if (uiop->uio_resid > 0) - ncl_printf("EEK! readdirrpc resid > 0\n"); + printf("EEK! readdirrpc resid > 0\n"); ncl_dircookie_lock(dnp); cookiep = ncl_getcookie(dnp, uiop->uio_offset, 1); *cookiep = cookie; @@ -2372,7 +2372,7 @@ ncl_readdirplusrpc(struct vnode *vp, str dnp->n_direofoffset = uiop->uio_offset; else { if (uiop->uio_resid > 0) - ncl_printf("EEK! readdirplusrpc resid > 0\n"); + printf("EEK! readdirplusrpc resid > 0\n"); ncl_dircookie_lock(dnp); cookiep = ncl_getcookie(dnp, uiop->uio_offset, 1); *cookiep = cookie; @@ -3145,8 +3145,8 @@ nfs_print(struct vop_print_args *ap) struct vnode *vp = ap->a_vp; struct nfsnode *np = VTONFS(vp); - ncl_printf("\tfileid %ld fsid 0x%x", - np->n_vattr.na_fileid, np->n_vattr.na_fsid); + printf("\tfileid %ld fsid 0x%x", np->n_vattr.na_fileid, + np->n_vattr.na_fsid); if (vp->v_type == VFIFO) fifo_printinfo(vp); printf("\n"); Modified: head/sys/fs/nfsclient/nfsnode.h ============================================================================== --- head/sys/fs/nfsclient/nfsnode.h Wed Aug 3 15:39:58 2016 (r303714) +++ head/sys/fs/nfsclient/nfsnode.h Wed Aug 3 15:58:20 2016 (r303715) @@ -185,7 +185,6 @@ nfsuint64 *ncl_getcookie(struct nfsnode void ncl_invaldir(struct vnode *); int ncl_upgrade_vnlock(struct vnode *); void ncl_downgrade_vnlock(struct vnode *, int); -void ncl_printf(const char *, ...); void ncl_dircookie_lock(struct nfsnode *); void ncl_dircookie_unlock(struct nfsnode *);