1*0a6a1f1dSLionel Sambuc.\" $NetBSD: getfsspecname.3,v 1.5 2015/06/13 19:52:58 dholland Exp $ 2dba3562dSLionel Sambuc.\" 3dba3562dSLionel Sambuc.\" Copyright (c) 2012 The NetBSD Foundation, Inc. 4dba3562dSLionel Sambuc.\" All rights reserved. 5dba3562dSLionel Sambuc.\" 6dba3562dSLionel Sambuc.\" This code is derived from software contributed to The NetBSD Foundation 7dba3562dSLionel Sambuc.\" by Christos Zoulas. 8dba3562dSLionel Sambuc.\" 9dba3562dSLionel Sambuc.\" Redistribution and use in source and binary forms, with or without 10dba3562dSLionel Sambuc.\" modification, are permitted provided that the following conditions 11dba3562dSLionel Sambuc.\" are met: 12dba3562dSLionel Sambuc.\" 1. Redistributions of source code must retain the above copyright 13dba3562dSLionel Sambuc.\" notice, this list of conditions and the following disclaimer. 14dba3562dSLionel Sambuc.\" 2. Redistributions in binary form must reproduce the above copyright 15dba3562dSLionel Sambuc.\" notice, this list of conditions and the following disclaimer in the 16dba3562dSLionel Sambuc.\" documentation and/or other materials provided with the distribution. 17dba3562dSLionel Sambuc.\" 18dba3562dSLionel Sambuc.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 19dba3562dSLionel Sambuc.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 20dba3562dSLionel Sambuc.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21dba3562dSLionel Sambuc.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 22dba3562dSLionel Sambuc.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23dba3562dSLionel Sambuc.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24dba3562dSLionel Sambuc.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25dba3562dSLionel Sambuc.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26dba3562dSLionel Sambuc.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27dba3562dSLionel Sambuc.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28dba3562dSLionel Sambuc.\" POSSIBILITY OF SUCH DAMAGE. 29dba3562dSLionel Sambuc.\" 30dba3562dSLionel Sambuc.\" 31*0a6a1f1dSLionel Sambuc.Dd August 18, 2014 32dba3562dSLionel Sambuc.Dt GETFSSPECNAME 3 33dba3562dSLionel Sambuc.Os 34dba3562dSLionel Sambuc.Sh NAME 35dba3562dSLionel Sambuc.Nm getfsspecname 36dba3562dSLionel Sambuc.Nd get the underlying wedge name from a label 37dba3562dSLionel Sambuc.Sh LIBRARY 38dba3562dSLionel Sambuc.Lb libutil 39dba3562dSLionel Sambuc.Sh SYNOPSIS 40dba3562dSLionel Sambuc.In util.h 41dba3562dSLionel Sambuc.Ft const char * 42dba3562dSLionel Sambuc.Fn getfsspecname "char *buf" "size_t buflen" "const char *spec" 43dba3562dSLionel Sambuc.Sh DESCRIPTION 44dba3562dSLionel SambucThe 45dba3562dSLionel Sambuc.Fn getfsspecname 46dba3562dSLionel Sambucfunction translates an 47dba3562dSLionel Sambuc.Ft fs_spec 48dba3562dSLionel Sambucfield in the 49dba3562dSLionel Sambuc.Fa spec 50dba3562dSLionel Sambucargument of the form 51dba3562dSLionel Sambuc.Dq NAME=wedgename 52dba3562dSLionel Sambucto the underlying 53dba3562dSLionel Sambuc.Xr dk 4 54dba3562dSLionel Sambucdevice node, and places the resulting pathname in 55dba3562dSLionel Sambuc.Fa buf 56dba3562dSLionel Sambucup to len 57*0a6a1f1dSLionel Sambuc.Fa buflen . 58dba3562dSLionel Sambuc.Pp 59dba3562dSLionel SambucIf the 60dba3562dSLionel Sambuc.Fa spec 61dba3562dSLionel Sambucargument is not of the form 62dba3562dSLionel Sambuc.Dq NAME=wedgename , 63dba3562dSLionel Sambuc.Fa spec 64dba3562dSLionel Sambucis copied 65dba3562dSLionel Sambucto 66dba3562dSLionel Sambuc.Fa buf 67dba3562dSLionel Sambucand returned. 68dba3562dSLionel Sambuc.Sh RETURN VALUES 69dba3562dSLionel SambucOn success the absolute pathname of the underlying wedge device is returned, 70dba3562dSLionel Sambucor the original 71dba3562dSLionel Sambuc.Fa spec 72dba3562dSLionel Sambucargument. 73dba3562dSLionel SambucOn failure 74dba3562dSLionel Sambuc.Dv NULL 75*0a6a1f1dSLionel Sambucis returned and 76dba3562dSLionel Sambuc.Fa buf 77dba3562dSLionel Sambuccontains the reason for the error. 78dba3562dSLionel Sambuc.Sh SEE ALSO 79dba3562dSLionel Sambuc.Xr fstab 5 80dba3562dSLionel Sambuc.Sh HISTORY 81dba3562dSLionel SambucThe 82dba3562dSLionel Sambuc.Fn getfsspecname 83dba3562dSLionel Sambucfunction appeared in 84dba3562dSLionel Sambuc.Nx 7.0 . 85