Subject: Re: XML config file
To: Jason Thorpe <>
From: Iain Hibbert <>
List: tech-userlevel
Date: 07/24/2006 11:00:35
On Sun, 23 Jul 2006, Jason Thorpe wrote:

> The stuff I've been playing around with looks a bit like this:
> typedef boolean_t (*prop_ingest_handler_t)(void *, prop_object_t);

Ah, thats interesting - I hadn't quite thought that far along though my
usage was split also - the internalize is from the config file on disk
then the dictionary is passed to the kernel to be processed (for
configurating bluetooth devices)

I was (unnecessarily perhaps) trying to keep the parsing of complex types
out of the kernel but still having human friendly on disk storage, though
currently its only bdaddr (00:aa:13:04:8c:df) and I could provide
bt_ntoa() to handle that rather than keeping a data blob in the

> 	ctx.label = lp;
> 	ctx.errorstr = NULL;
> 	if (prop_dictionary_ingest(geom_dict,
> 				   bsd44_geom_ingest_table,
> 				   &ctx) == FALSE) {
> 		/* return the error string */
> 	}

Although I guess in your above example, the context struct would be bigger
than just those items, would it be useful to have the error string
included in the API?


	typedef const char *(*prop_ingest_handler_t)(void *, prop_object_t);


	errstr = prop_dictionary_ingest(geom_dict, bsd44_geom_ingest_table, lp);
	if (errstr != NULL) {
		/* ("error: %s", errstr) */