17d5336f0SJoe Marcus Clarke.\" -*- nroff -*- 27d5336f0SJoe Marcus Clarke.\" 37d5336f0SJoe Marcus Clarke.\" Copyright (c) 2008 Joe Marcus Clarke 47d5336f0SJoe Marcus Clarke.\" 57d5336f0SJoe Marcus Clarke.\" All rights reserved. 67d5336f0SJoe Marcus Clarke.\" 77d5336f0SJoe Marcus Clarke.\" This program is free software. 87d5336f0SJoe Marcus Clarke.\" 97d5336f0SJoe Marcus Clarke.\" Redistribution and use in source and binary forms, with or without 107d5336f0SJoe Marcus Clarke.\" modification, are permitted provided that the following conditions 117d5336f0SJoe Marcus Clarke.\" are met: 127d5336f0SJoe Marcus Clarke.\" 1. Redistributions of source code must retain the above copyright 137d5336f0SJoe Marcus Clarke.\" notice, this list of conditions and the following disclaimer. 147d5336f0SJoe Marcus Clarke.\" 2. Redistributions in binary form must reproduce the above copyright 157d5336f0SJoe Marcus Clarke.\" notice, this list of conditions and the following disclaimer in the 167d5336f0SJoe Marcus Clarke.\" documentation and/or other materials provided with the distribution. 177d5336f0SJoe Marcus Clarke.\" 187d5336f0SJoe Marcus Clarke.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR 197d5336f0SJoe Marcus Clarke.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 207d5336f0SJoe Marcus Clarke.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 217d5336f0SJoe Marcus Clarke.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, 227d5336f0SJoe Marcus Clarke.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 237d5336f0SJoe Marcus Clarke.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 247d5336f0SJoe Marcus Clarke.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 257d5336f0SJoe Marcus Clarke.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 267d5336f0SJoe Marcus Clarke.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 277d5336f0SJoe Marcus Clarke.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 287d5336f0SJoe Marcus Clarke.\" 29*2be5aa17SDmitry Chagin.Dd March 8, 2015 307d5336f0SJoe Marcus Clarke.Dt VOP_VPTOCNP 9 31aa12cea2SUlrich Spörlein.Os 327d5336f0SJoe Marcus Clarke.Sh NAME 337d5336f0SJoe Marcus Clarke.Nm VOP_VPTOCNP 347d5336f0SJoe Marcus Clarke.Nd translate a vnode to its component name 357d5336f0SJoe Marcus Clarke.Sh SYNOPSIS 367d5336f0SJoe Marcus Clarke.In sys/param.h 37*2be5aa17SDmitry Chagin.In sys/ucred.h 387d5336f0SJoe Marcus Clarke.In sys/vnode.h 397d5336f0SJoe Marcus Clarke.Ft int 40*2be5aa17SDmitry Chagin.Fn VOP_VPTOCNP "struct vnode *vp" "struct vnode **dvp" "struct ucred *cred" "char *buf" "int *buflen" 417d5336f0SJoe Marcus Clarke.Sh DESCRIPTION 427d5336f0SJoe Marcus ClarkeThis translates a vnode into its component name, and writes that name to 437d5336f0SJoe Marcus Clarkethe head of the buffer specified by 44c2025a76SJoel Dahl.Fa buf . 457d5336f0SJoe Marcus Clarke.Bl -tag -width buflen 467d5336f0SJoe Marcus Clarke.It Fa vp 477d5336f0SJoe Marcus ClarkeThe vnode to translate. 487d5336f0SJoe Marcus Clarke.It Fa dvp 497d5336f0SJoe Marcus ClarkeThe vnode of the parent directory of 507d5336f0SJoe Marcus Clarke.Fa vp . 51*2be5aa17SDmitry Chagin.It Fa cred 52*2be5aa17SDmitry ChaginThe caller credentials. 537d5336f0SJoe Marcus Clarke.It Fa buf 54b06cfd40SJoel DahlThe buffer into which to prepend the component name. 557d5336f0SJoe Marcus Clarke.It Fa buflen 567d5336f0SJoe Marcus ClarkeThe remaining size of the buffer. 577d5336f0SJoe Marcus Clarke.El 587d5336f0SJoe Marcus Clarke.Pp 597d5336f0SJoe Marcus ClarkeThe default implementation of 607d5336f0SJoe Marcus Clarke.Nm 6174999b4cSJoe Marcus Clarkescans through 6274999b4cSJoe Marcus Clarke.Fa vp Ns 's 63*2be5aa17SDmitry Chaginparent directory looking for a dirent with a matching file number. 64*2be5aa17SDmitry ChaginIf 6574999b4cSJoe Marcus Clarke.Fa vp 6674999b4cSJoe Marcus Clarkeis not a directory, then 6774999b4cSJoe Marcus Clarke.Nm 6874999b4cSJoe Marcus Clarkereturns ENOENT. 697d5336f0SJoe Marcus Clarke.Sh LOCKS 7046154a3bSKonstantin BelousovThe vnode should be locked on entry and will still be locked on exit. 7146154a3bSKonstantin BelousovThe parent directory vnode will be unlocked on a successful exit. 7246154a3bSKonstantin BelousovHowever, it will have its use count incremented. 737d5336f0SJoe Marcus Clarke.Sh RETURN VALUES 747d5336f0SJoe Marcus ClarkeZero is returned on success, otherwise an error code is returned. 757d5336f0SJoe Marcus Clarke.Sh ERRORS 767d5336f0SJoe Marcus Clarke.Bl -tag -width Er 777d5336f0SJoe Marcus Clarke.It Bq Er ENOMEM 787d5336f0SJoe Marcus ClarkeThe buffer was not large enough to hold the vnode's component name. 797d5336f0SJoe Marcus Clarke.It Bq Er ENOENT 807d5336f0SJoe Marcus ClarkeThe vnode was not found on the file system. 817d5336f0SJoe Marcus Clarke.El 827d5336f0SJoe Marcus Clarke.Sh SEE ALSO 831e9469d1SChristian Brueffer.Xr vnode 9 , 841e9469d1SChristian Brueffer.Xr VOP_LOOKUP 9 857d5336f0SJoe Marcus Clarke.Sh NOTES 867d5336f0SJoe Marcus ClarkeThis interface is a work in progress. 877d5336f0SJoe Marcus Clarke.Sh HISTORY 887d5336f0SJoe Marcus ClarkeThe function 897d5336f0SJoe Marcus Clarke.Nm 907d5336f0SJoe Marcus Clarkeappeared in 917d5336f0SJoe Marcus Clarke.Fx 8.0 . 927d5336f0SJoe Marcus Clarke.Sh AUTHORS 937d5336f0SJoe Marcus ClarkeThis manual page was written by 947d5336f0SJoe Marcus Clarke.An Joe Marcus Clarke . 95