Home | History | Annotate | Download | only in ofctl

Lines Matching defs:ofio

205 	struct ofiocdesc ofio;
208 ofio.of_nodeid = nodeid;
209 ofio.of_name = name;
210 ofio.of_namelen = strlen(name);
211 ofio.of_buf = NULL;
212 ofio.of_buflen = 32;
215 if (ofio.of_buf != NULL)
216 free(ofio.of_buf);
217 ofio.of_buf = malloc(ofio.of_buflen);
218 if (ofio.of_buf == NULL)
219 err(1, "malloc(%d)", ofio.of_buflen);
220 if (ioctl(fd, OFIOCGET, &ofio) < 0) {
222 ofio.of_buflen *= 2;
226 free(ofio.of_buf);
229 obj = prop_data_create_copy(ofio.of_buf, ofio.of_buflen);
230 free(ofio.of_buf);
238 struct ofiocdesc ofio;
245 ofio.of_nodeid = nodeid;
246 ofio.of_name = namebuf;
247 ofio.of_namelen = 1;
248 ofio.of_buf = newnamebuf;
258 ofio.of_buflen = sizeof(newnamebuf);
260 if (ioctl(fd, OFIOCNEXTPROP, &ofio) < 0) {
264 ofio.of_nodeid, ofio.of_name);
267 ofio.of_namelen = ofio.of_buflen;
268 if (ofio.of_namelen == 0)
270 newnamebuf[ofio.of_buflen] = '\0';
397 struct ofiocdesc ofio;
399 ofio.of_nodeid = 0;
400 ofio.of_name = __UNCONST(name);
401 ofio.of_namelen = strlen(name);
402 ofio.of_buf = NULL;
403 ofio.of_buflen = 0;
404 if (ioctl(of_fd, OFIOCFINDDEVICE, &ofio) < 0) {
412 return ofio.of_nodeid;