1*dba3562dSLionel Sambuc.\" $NetBSD: getdiskrawname.3,v 1.2 2012/04/08 16:06:23 wiz Exp $ 2*dba3562dSLionel Sambuc.\" 3*dba3562dSLionel Sambuc.\" Copyright (c) 2012 The NetBSD Foundation, Inc. 4*dba3562dSLionel Sambuc.\" All rights reserved. 5*dba3562dSLionel Sambuc.\" 6*dba3562dSLionel Sambuc.\" This code is derived from software contributed to The NetBSD Foundation 7*dba3562dSLionel Sambuc.\" by Christos Zoulas. 8*dba3562dSLionel Sambuc.\" 9*dba3562dSLionel Sambuc.\" Redistribution and use in source and binary forms, with or without 10*dba3562dSLionel Sambuc.\" modification, are permitted provided that the following conditions 11*dba3562dSLionel Sambuc.\" are met: 12*dba3562dSLionel Sambuc.\" 1. Redistributions of source code must retain the above copyright 13*dba3562dSLionel Sambuc.\" notice, this list of conditions and the following disclaimer. 14*dba3562dSLionel Sambuc.\" 2. Redistributions in binary form must reproduce the above copyright 15*dba3562dSLionel Sambuc.\" notice, this list of conditions and the following disclaimer in the 16*dba3562dSLionel Sambuc.\" documentation and/or other materials provided with the distribution. 17*dba3562dSLionel Sambuc.\" 18*dba3562dSLionel Sambuc.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 19*dba3562dSLionel Sambuc.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 20*dba3562dSLionel Sambuc.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21*dba3562dSLionel Sambuc.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 22*dba3562dSLionel Sambuc.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23*dba3562dSLionel Sambuc.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24*dba3562dSLionel Sambuc.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25*dba3562dSLionel Sambuc.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26*dba3562dSLionel Sambuc.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27*dba3562dSLionel Sambuc.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28*dba3562dSLionel Sambuc.\" POSSIBILITY OF SUCH DAMAGE. 29*dba3562dSLionel Sambuc.\" 30*dba3562dSLionel Sambuc.\" 31*dba3562dSLionel Sambuc.Dd March 7, 2012 32*dba3562dSLionel Sambuc.Dt GETDISKRAWNAME 3 33*dba3562dSLionel Sambuc.Os 34*dba3562dSLionel Sambuc.Sh NAME 35*dba3562dSLionel Sambuc.Nm getdiskrawname 36*dba3562dSLionel Sambuc.Nd get the the block/character device name for a disk 37*dba3562dSLionel Sambuc.Sh LIBRARY 38*dba3562dSLionel Sambuc.Lb libutil 39*dba3562dSLionel Sambuc.Sh SYNOPSIS 40*dba3562dSLionel Sambuc.In util.h 41*dba3562dSLionel Sambuc.Ft const char * 42*dba3562dSLionel Sambuc.Fn getdiskrawname "char *buf" "size_t buflen" "const char *name" 43*dba3562dSLionel Sambuc.Ft const char * 44*dba3562dSLionel Sambuc.Fn getdiskcookedname "char *buf" "size_t buflen" "const char *name" 45*dba3562dSLionel Sambuc.Sh DESCRIPTION 46*dba3562dSLionel SambucThe 47*dba3562dSLionel Sambuc.Fn getdiskrawname 48*dba3562dSLionel Sambucfunction converts the 49*dba3562dSLionel Sambuc.Fa name 50*dba3562dSLionel Sambucargument thar contains a path to a disk block device node to the 51*dba3562dSLionel Sambucpath that contains the corresponding character device node. 52*dba3562dSLionel SambucThe 53*dba3562dSLionel Sambuc.Fn getdiskcookedname 54*dba3562dSLionel Sambucfunction converts the 55*dba3562dSLionel Sambuc.Fa name 56*dba3562dSLionel Sambucargument thar contains a path to a disk character device node to the 57*dba3562dSLionel Sambucpath that contains the corresponding block device node. 58*dba3562dSLionel Sambuc.Sh RETURN VALUES 59*dba3562dSLionel SambucOn success the absolute pathname of the underlying device node is returned. 60*dba3562dSLionel SambucOn failure 61*dba3562dSLionel Sambuc.Dv NULL 62*dba3562dSLionel Sambucis returned and 63*dba3562dSLionel Sambuc.Va errno 64*dba3562dSLionel Sambuccontains the reason for the error. 65*dba3562dSLionel Sambuc.Sh HISTORY 66*dba3562dSLionel SambucThe 67*dba3562dSLionel Sambuc.Fn getdiskrawname 68*dba3562dSLionel Sambucand 69*dba3562dSLionel Sambuc.Fn getdiskcookedname 70*dba3562dSLionel Sambucfunctions appeared in 71*dba3562dSLionel Sambuc.Nx 7.0 . 72