1
0
Files
irix-657m-src/eoe/man/man2/dev_to_devname.2
2022-09-29 17:59:04 +03:00

79 lines
1.7 KiB
Groff

'\"macro stdmacro
.if n .pH g2.dev_to_devname @(#)dev_to_devname 1.1 of 4/10/97
.TH DEV_TO_DEVNAME 2
.SH NAME
dev_to_devname \- determine the device name for the device
.Op c p a
.SH C SYNOPSIS
.PP
.sp
.nf
.B #include <invent.h>
.sp
.B "char\(** dev_to_devname (dev_t dev, char \(**buf, int \(**length);"
.PP
.Op
.SH OVERVIEW
.I dev_to_devname
is useful to determine the canonical hardware graph path name
given the device identifier.
.SH DESCRIPTION
The
.I dev_to_devname
function provides a way to retrieve the path name for a
device.
.P
.I Dev\^
identifies the device,
.I buf\^
is the placeholder for the device name and
.I length
is an input/output argument that on the call to
.I dev_to_devname
should contain the maximum size of the name the process is
willing to accept.
On return, the integer that the
.I length
argument points to will have been modified to show the actual size of
the device name returned.
.PP
.I dev_to_devname
will fail if one or more of the following are true:
.TP
.SM
\%[E2BIG]
The device name is too large to fit into the buffer.
The integer that the
.I length
argument points to has been modified to show the actual number
of bytes that would be required to store the value of that attribute.
.TP
.SM
\%[ENODEV]
The device does not exist.
.TP
.SM
\%[EPERM]
The effective user
.SM ID
does not match the owner of the file
and the effective user
.SM ID
is not super-user.
.TP
.SM
\%[EFAULT]
.I Buf,
or
.I length
points outside the allocated address space of the process.
.SH "SEE ALSO"
attr(1), hwgraph(4)
.SH "DIAGNOSTICS"
Upon successful completion, the name is returned.
Otherwise, a value of NULL is returned and
.I errno\^
is set to indicate the error.
.\" @(#)dev_to_devname.2 1.0 of 6.12.95
.Ee