Lines Matching refs:of
114 struct ofiocdesc *of; in openfirm_ioctl() local
123 of = (struct ofiocdesc *)data; in openfirm_ioctl()
133 node = of->of_nodeid; in openfirm_ioctl()
159 error = openfirm_getstr(of->of_namelen, of->of_name, &name); in openfirm_ioctl()
164 of->of_buflen = len; in openfirm_ioctl()
167 if (len > of->of_buflen) { in openfirm_ioctl()
171 of->of_buflen = len; in openfirm_ioctl()
177 error = copyout(value, of->of_buf, len); in openfirm_ioctl()
192 if ((u_int)of->of_buflen > OFIOCMAXVALUE) in openfirm_ioctl()
194 error = openfirm_getstr(of->of_namelen, of->of_name, &name); in openfirm_ioctl()
197 value = malloc(of->of_buflen, M_TEMP, M_WAITOK); in openfirm_ioctl()
198 error = copyin(of->of_buf, value, of->of_buflen); in openfirm_ioctl()
201 len = OF_setprop(node, name, value, of->of_buflen); in openfirm_ioctl()
204 of->of_buflen = len; in openfirm_ioctl()
208 if (node == 0 || of->of_buflen < 0) in openfirm_ioctl()
210 if (of->of_namelen != 0) { in openfirm_ioctl()
211 error = openfirm_getstr(of->of_namelen, of->of_name, in openfirm_ioctl()
226 if (len > of->of_buflen) in openfirm_ioctl()
227 len = of->of_buflen; in openfirm_ioctl()
229 of->of_buflen = len; in openfirm_ioctl()
230 error = copyout(newname, of->of_buf, len); in openfirm_ioctl()
246 error = openfirm_getstr(of->of_namelen, of->of_name, &name); in openfirm_ioctl()
254 of->of_nodeid = lastnode = node; in openfirm_ioctl()