Lines Matching full: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; in get_schema() local
59 /* Do the ioctl() once to fetch the size of the schema. */ in get_schema()
60 arg.schema = NULL; in get_schema()
65 err(1, "Could not fetch size of config schema"); in get_schema()
67 arg.schema = malloc(arg.len); in get_schema()
68 if (arg.schema == NULL) in get_schema()
69 err(1, "Could not allocate %zu bytes for schema", in get_schema()
72 /* Now do the ioctl() for real to get the schema. */ in get_schema()
77 err(1, "Could not fetch config schema"); in get_schema()
80 schema = nvlist_unpack(arg.schema, arg.len, NV_FLAG_IGNORE_CASE); in get_schema()
81 if (schema == NULL) in get_schema()
82 err(1, "Could not unpack schema"); in get_schema()
84 free(arg.schema); in get_schema()
85 return (schema); in get_schema()
275 nvlist_t *schema, *config; in config_action() local
283 schema = get_schema(fd); in config_action()
284 config = parse_config_file(filename, schema); in config_action()
291 nvlist_destroy(schema); in config_action()
355 errx(1, "Unexpected type in schema: '%s'", type); in print_default_value()
385 nvlist_t *schema; in print_schema() local
390 schema = get_schema(fd); in print_schema()
392 pf_schema = nvlist_get_nvlist(schema, PF_CONFIG_NAME); in print_schema()
400 vf_schema = nvlist_get_nvlist(schema, VF_SCHEMA_NAME); in print_schema()
408 nvlist_destroy(schema); in print_schema()