Lines Matching defs:schema
51 * Fetch the config schema from the kernel via ioctl. This function has to
53 * to allocate for the schema, and the second actually fetches the schema.
59 nvlist_t *schema;
62 /* Do the ioctl() once to fetch the size of the schema. */
63 arg.schema = NULL;
68 err(1, "Could not fetch size of config schema");
70 arg.schema = malloc(arg.len);
71 if (arg.schema == NULL)
72 err(1, "Could not allocate %zu bytes for schema",
75 /* Now do the ioctl() for real to get the schema. */
80 err(1, "Could not fetch config schema");
83 schema = nvlist_unpack(arg.schema, arg.len, NV_FLAG_IGNORE_CASE);
84 if (schema == NULL)
85 err(1, "Could not unpack schema");
87 free(arg.schema);
88 return (schema);
274 nvlist_t *schema, *config;
282 schema = get_schema(fd);
283 config = parse_config_file(filename, schema);
290 nvlist_destroy(schema);
348 errx(1, "Unexpected type in schema: '%s'", type);
378 nvlist_t *schema;
383 schema = get_schema(fd);
385 pf_schema = nvlist_get_nvlist(schema, PF_CONFIG_NAME);
393 vf_schema = nvlist_get_nvlist(schema, VF_SCHEMA_NAME);
401 nvlist_destroy(schema);