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()
158 error = openfirm_getstr(of->of_namelen, of->of_name, &name); in openfirm_ioctl()
163 of->of_buflen = len; in openfirm_ioctl()
166 if (len > of->of_buflen) { in openfirm_ioctl()
170 of->of_buflen = len; in openfirm_ioctl()
176 error = copyout(value, of->of_buf, len); in openfirm_ioctl()
191 if ((u_int)of->of_buflen > OFIOCMAXVALUE) in openfirm_ioctl()
193 error = openfirm_getstr(of->of_namelen, of->of_name, &name); in openfirm_ioctl()
196 value = malloc(of->of_buflen, M_TEMP, M_WAITOK); in openfirm_ioctl()
197 error = copyin(of->of_buf, value, of->of_buflen); in openfirm_ioctl()
200 len = OF_setprop(node, name, value, of->of_buflen); in openfirm_ioctl()
203 of->of_buflen = len; in openfirm_ioctl()
207 if (node == 0 || of->of_buflen < 0) in openfirm_ioctl()
209 if (of->of_namelen != 0) { in openfirm_ioctl()
210 error = openfirm_getstr(of->of_namelen, of->of_name, in openfirm_ioctl()
225 if (len > of->of_buflen) { in openfirm_ioctl()
235 len = of->of_buflen; in openfirm_ioctl()
239 of->of_buflen = len; in openfirm_ioctl()
240 error = copyout(newname, of->of_buf, len); in openfirm_ioctl()
256 error = openfirm_getstr(of->of_namelen, of->of_name, &name); in openfirm_ioctl()
264 of->of_nodeid = lastnode = node; in openfirm_ioctl()