| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | .\" $NetBSD: devname.3,v 1.13 2017/09/09 18:00:39 kamil Exp $ | | 1 | .\" $NetBSD: devname.3,v 1.14 2017/09/09 18:45:04 kamil Exp $ |
2 | .\" | | 2 | .\" |
3 | .\" Copyright (c) 1993 | | 3 | .\" Copyright (c) 1993 |
4 | .\" The Regents of the University of California. All rights reserved. | | 4 | .\" The Regents of the University of California. All rights reserved. |
5 | .\" | | 5 | .\" |
6 | .\" Redistribution and use in source and binary forms, with or without | | 6 | .\" Redistribution and use in source and binary forms, with or without |
7 | .\" modification, are permitted provided that the following conditions | | 7 | .\" modification, are permitted provided that the following conditions |
8 | .\" are met: | | 8 | .\" are met: |
9 | .\" 1. Redistributions of source code must retain the above copyright | | 9 | .\" 1. Redistributions of source code must retain the above copyright |
10 | .\" notice, this list of conditions and the following disclaimer. | | 10 | .\" notice, this list of conditions and the following disclaimer. |
11 | .\" 2. Redistributions in binary form must reproduce the above copyright | | 11 | .\" 2. Redistributions in binary form must reproduce the above copyright |
12 | .\" notice, this list of conditions and the following disclaimer in the | | 12 | .\" notice, this list of conditions and the following disclaimer in the |
13 | .\" documentation and/or other materials provided with the distribution. | | 13 | .\" documentation and/or other materials provided with the distribution. |
14 | .\" 3. Neither the name of the University nor the names of its contributors | | 14 | .\" 3. Neither the name of the University nor the names of its contributors |
| @@ -84,45 +84,39 @@ returns a pointer to a nul-terminated st | | | @@ -84,45 +84,39 @@ returns a pointer to a nul-terminated st |
84 | If an error occurs | | 84 | If an error occurs |
85 | .Fa devname | | 85 | .Fa devname |
86 | will return | | 86 | will return |
87 | .Dv NULL . | | 87 | .Dv NULL . |
88 | .Pp | | 88 | .Pp |
89 | If successful, | | 89 | If successful, |
90 | .Fn devname_r | | 90 | .Fn devname_r |
91 | places a nul-terminated string containing the name of the device and returns 0. | | 91 | places a nul-terminated string containing the name of the device and returns 0. |
92 | If error occurs | | 92 | If error occurs |
93 | .Fn devname_r | | 93 | .Fn devname_r |
94 | will return error number indicating what went wrong. | | 94 | will return error number indicating what went wrong. |
95 | .Sh ERRORS | | 95 | .Sh ERRORS |
96 | The | | 96 | The |
97 | .Fn devname | | | |
98 | and | | | |
99 | .Fn devname_r | | 97 | .Fn devname_r |
100 | functions my fail if: | | 98 | function my fail if: |
101 | .Bl -tag -width Er | | 99 | .Bl -tag -width Er |
102 | .It Bq Er ENOENT | | 100 | .It Bq Er ENOENT |
103 | the corresponding device does not exist | | 101 | the corresponding device does not exist |
104 | .It Bq Er ERANGE | | 102 | .It Bq Er ERANGE |
105 | the passed buffer length is too short | | 103 | the passed buffer length is too short |
106 | .El | | 104 | .El |
107 | .Sh FILES | | 105 | .Sh FILES |
108 | .Bl -tag -width /var/run/dev.cdb -compact | | 106 | .Bl -tag -width /var/run/dev.cdb -compact |
109 | .It Pa /var/run/dev.cdb | | 107 | .It Pa /var/run/dev.cdb |
110 | Device database file. | | 108 | Device database file. |
111 | .El | | 109 | .El |
112 | .Sh SEE ALSO | | 110 | .Sh SEE ALSO |
113 | .Xr stat 2 , | | 111 | .Xr stat 2 , |
114 | .Xr dev_mkdb 8 | | 112 | .Xr dev_mkdb 8 |
115 | .Sh HISTORY | | 113 | .Sh HISTORY |
116 | The | | 114 | The |
117 | .Nm devname | | 115 | .Nm devname |
118 | function call appeared in | | 116 | function call appeared in |
119 | .Bx 4.4 . | | 117 | .Bx 4.4 . |
120 | .Pp | | 118 | .Pp |
121 | The | | 119 | The |
122 | .Fn devname_r | | 120 | .Fn devname_r |
123 | function first appeared in | | 121 | function first appeared in |
124 | .Nx 6.0 . | | 122 | .Nx 6.0 . |
125 | .Sh BUGS | | | |
126 | The | | | |
127 | .Fn devname | | | |
128 | function does not set errno on failure. | | | |