Lines Matching refs:of
112 struct ofiocdesc *of; in openfirm_ioctl() local
121 of = (struct ofiocdesc *)data; in openfirm_ioctl()
131 node = of->of_nodeid; in openfirm_ioctl()
156 error = openfirm_getstr(of->of_namelen, of->of_name, &name); in openfirm_ioctl()
161 of->of_buflen = len; in openfirm_ioctl()
164 if (len > of->of_buflen) { in openfirm_ioctl()
168 of->of_buflen = len; in openfirm_ioctl()
174 error = copyout(value, of->of_buf, len); in openfirm_ioctl()
189 if ((u_int)of->of_buflen > OFIOCMAXVALUE) in openfirm_ioctl()
191 error = openfirm_getstr(of->of_namelen, of->of_name, &name); in openfirm_ioctl()
194 value = malloc(of->of_buflen, M_TEMP, M_WAITOK); in openfirm_ioctl()
195 error = copyin(of->of_buf, value, of->of_buflen); in openfirm_ioctl()
198 len = OF_setprop(node, name, value, of->of_buflen); in openfirm_ioctl()
201 of->of_buflen = len; in openfirm_ioctl()
205 if (node == 0 || of->of_buflen < 0) in openfirm_ioctl()
207 if (of->of_namelen != 0) { in openfirm_ioctl()
208 error = openfirm_getstr(of->of_namelen, of->of_name, in openfirm_ioctl()
223 if (len > of->of_buflen) { in openfirm_ioctl()
233 len = of->of_buflen; in openfirm_ioctl()
237 of->of_buflen = len; in openfirm_ioctl()
238 error = copyout(newname, of->of_buf, len); in openfirm_ioctl()
254 error = openfirm_getstr(of->of_namelen, of->of_name, &name); in openfirm_ioctl()
262 of->of_nodeid = lastnode = node; in openfirm_ioctl()