Lines Matching refs:schema
48 * Fetch the config schema from the kernel via ioctl. This function has to
50 * to allocate for the schema, and the second actually fetches the schema.
56 nvlist_t *schema;
59 /* Do the ioctl() once to fetch the size of the schema. */
60 arg.schema = NULL;
65 err(1, "Could not fetch size of config schema");
67 arg.schema = malloc(arg.len);
68 if (arg.schema == NULL)
69 err(1, "Could not allocate %zu bytes for schema",
72 /* Now do the ioctl() for real to get the schema. */
77 err(1, "Could not fetch config schema");
80 schema = nvlist_unpack(arg.schema, arg.len, NV_FLAG_IGNORE_CASE);
81 if (schema == NULL)
82 err(1, "Could not unpack schema");
84 free(arg.schema);
85 return (schema);
275 nvlist_t *schema, *config;
283 schema = get_schema(fd);
284 config = parse_config_file(filename, schema);
291 nvlist_destroy(schema);
355 errx(1, "Unexpected type in schema: '%s'", type);
385 nvlist_t *schema;
390 schema = get_schema(fd);
392 pf_schema = nvlist_get_nvlist(schema, PF_CONFIG_NAME);
400 vf_schema = nvlist_get_nvlist(schema, VF_SCHEMA_NAME);
408 nvlist_destroy(schema);