📄 openprom.4
字号:
.\" Copyright (c) 1992, 1993.\" The Regents of the University of California. All rights reserved..\".\" This software was developed by the Computer Systems Engineering group.\" at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and.\" contributed to Berkeley..\".\" Redistribution and use in source and binary forms, with or without.\" modification, are permitted provided that the following conditions.\" are met:.\" 1. Redistributions of source code must retain the above copyright.\" notice, this list of conditions and the following disclaimer..\" 2. Redistributions in binary form must reproduce the above copyright.\" notice, this list of conditions and the following disclaimer in the.\" documentation and/or other materials provided with the distribution..\" 3. All advertising materials mentioning features or use of this software.\" must display the following acknowledgement:.\" This product includes software developed by the University of.\" California, Berkeley and its contributors..\" 4. Neither the name of the University nor the names of its contributors.\" may be used to endorse or promote products derived from this software.\" without specific prior written permission..\".\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION).\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF.\" SUCH DAMAGE..\".\" @(#)openprom.4 8.1 (Berkeley) 6/5/93.\".Dd June 5, 1993.Dt OPENPROM 4 sparc.Os.Sh NAME.Nm openprom.Nd OPENPROM and EEPROM interface.Sh SYNOPSIS.Fd #include <machine/openpromio.h>.Sh DESCRIPTIONThe file.Nm /dev/openpromis an interface to the SPARC OPENPROM,including the EEPROM area.This interface is highly stylized;ioctls are used for all operations.These ioctls refer to.Dq nodes ,which are simply.Dq magicinteger values describing data areas.Occasionally the number 0 may be used or returned instead,as described below.A special distinguished.Dq optionsnode holds the EEPROM settings..PpThe calls that take and/or return a nodeuse a pointer to an.Li intvariable for this purpose;others use a pointer to an.Li struct opiocdescdescriptor,which contains a node and two counted strings.The first string is comprised of the fields.Li op_namelen(an.Li int )and.Li op_name(a.Li "char *" ) ,giving the name of a field.The second string is comprised of the fields.Li op_buflenand.Li op_buf ,used analogously.These two counted strings work in a.Dq value-resultfashion.At entry to the ioctl,the counts are expected to reflect the buffer size;on return,the counts are updated to reflect the buffer contents..PpThe following ioctls are supported:.Bl -tag -width OPIOCGETOPTNODE.It Dv OPIOCGETOPTNODETakes nothing, and fills in the options node number..It OPIOCGETNEXTTakes a node number and returns the number of the following node.The node following the last node is number 0;the node following number 0 is the first node..It Dv OPIOCGETCHILDTakes a node number and returns the number of the first.Dq childof that node.This child may have siblings; these can be discovered by using.Dv OPIOCGETNEXT ..It Dv OPIOCGETFills in the value of the named property for the given node.If no such property is associated with that node,the value length is set to -1.If the named property exists but has no value,the value length is set to 0..It Dv OPIOCSETWrites the given value under the given name.The OPENPROM may refuse this operation;in this case.Dv EINVALis returned..It Dv OPIOCNEXTPROPFinds the property whose name follows the given namein OPENPROM internal order.The resulting name is returned in the value field.If the named property is the last, the.Dq nextname is the empty string.As with.Dv OPIOCGETNEXT ,the next name after the empty string is the first name..El.Sh FILES.Pa /dev/openprom.Sh ERRORSThe following may result in rejection of an operation:.Bl -tag -width Er.It Bq Er EINVALThe given node numberis not zeroand does not correspond to any valid node,or is zero where zero is not allowed..It Bq Er EBADFThe requested operation requires permissions not specified at the call to.Fn open ..It Bq Er ENAMETOOLONGThe given name or value fieldexceeds the maximum allowed length (8191 bytes)..El.Sh SEE ALSO.Xr ioctl 2.Sh BUGSDue to limitations within the OPENPROM itself,these functions run at elevated priorityand may adversely affect system performance.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -