/* This routine sets the configuration fields for an existing device's descriptor. It only works for the last device, but that's OK because that's how we use it.  */
static void set_config(struct device *dev, unsigned len, const void *conf)
/* This routine sets the configuration fields for an existing device's descriptor. It only works for the last device, but that's OK because that's how we use it.  */
static void set_config(struct device *dev, unsigned len, const void *conf)
{
	if (device_config(dev) + len > devices.descpage + getpagesize())
		errx(1, "Too many devices");
	memcpy(device_config(dev), conf, len);
	dev->desc->config_len = len;
	assert(dev->desc->config_len == len);
}