Lines Matching defs:pref
59 _prop_object_externalize_to_pref(prop_object_t obj, struct plistref *pref,
68 pref->pref_plist = buf;
69 pref->pref_len = strlen(buf) + 1;
113 struct plistref pref;
117 error = _prop_object_externalize_to_pref(obj, &pref, &buf);
121 if (ioctl(fd, cmd, &pref) == -1)
148 * Internalize a pref into an object.
151 _prop_object_internalize_from_pref_with_type(const struct plistref *pref,
159 if (pref->pref_len == 0) {
167 buf = pref->pref_plist;
168 buf[pref->pref_len - 1] = '\0'; /* extra insurance */
170 (void) munmap(buf, pref->pref_len);
258 struct plistref pref;
260 rv = ioctl(fd, cmd, &pref);
264 rv = _prop_object_internalize_from_pref_with_type(&pref, objp, type);
302 struct plistref pref;
306 error = _prop_object_externalize_to_pref(obj, &pref, &buf);
312 if (ioctl(fd, cmd, &pref) == -1)
322 error = _prop_object_internalize_from_pref_with_type(&pref, objp, type);
377 _prop_object_copyin_size(const struct plistref *pref, prop_object_t *objp,
384 if (pref->pref_len >= lim)
390 buf = malloc(pref->pref_len + 1, M_TEMP, M_WAITOK);
393 error = copyin(pref->pref_plist, buf, pref->pref_len);
398 buf[pref->pref_len] = '\0';
417 prop_object_copyin_size(const struct plistref *pref,
420 return _prop_object_copyin_size(pref, objp, lim, PROP_TYPE_UNKNOWN);
424 prop_array_copyin_size(const struct plistref *pref,
427 return _prop_object_copyin_size(pref, (prop_object_t *)arrayp, lim,
432 prop_dictionary_copyin_size(const struct plistref *pref,
435 return _prop_object_copyin_size(pref, (prop_object_t *)dictp, lim,
440 prop_object_copyin(const struct plistref *pref, prop_object_t *objp)
442 return _prop_object_copyin_size(pref, objp, prop_object_copyin_limit,
447 prop_array_copyin(const struct plistref *pref, prop_array_t *arrayp)
449 return _prop_object_copyin_size(pref, (prop_object_t *)arrayp,
454 prop_dictionary_copyin(const struct plistref *pref, prop_dictionary_t *dictp)
456 return _prop_object_copyin_size(pref, (prop_object_t *)dictp,
461 _prop_object_copyin_ioctl_size(const struct plistref *pref,
467 return _prop_object_copyin_size(pref, objp, lim, type);
471 prop_object_copyin_ioctl_size(const struct plistref *pref,
474 return _prop_object_copyin_ioctl_size(pref, cmd, objp, lim,
479 prop_array_copyin_ioctl_size(const struct plistref *pref,
482 return _prop_object_copyin_ioctl_size(pref, cmd,
487 prop_dictionary_copyin_ioctl_size(const struct plistref *pref,
490 return _prop_object_copyin_ioctl_size(pref, cmd,
495 prop_object_copyin_ioctl(const struct plistref *pref,
498 return _prop_object_copyin_ioctl_size(pref, cmd, objp,
503 prop_array_copyin_ioctl(const struct plistref *pref,
506 return _prop_object_copyin_ioctl_size(pref, cmd,
512 prop_dictionary_copyin_ioctl(const struct plistref *pref,
515 return _prop_object_copyin_ioctl_size(pref, cmd,
521 prop_object_copyout(struct plistref *pref, prop_object_t obj)
541 pref->pref_plist = uaddr;
542 pref->pref_len = len;
554 prop_object_copyout_ioctl(struct plistref *pref, const u_long cmd,
559 return prop_object_copyout(pref, obj);