/* A possible improvement here would be to have the tools add a per-device flag to the store entry, indicating whether it is needed at boot time. This would allow people who knew what they were doing to accelerate their boot slightly, but of course needs tools or manual intervention to set up those flags correctly.  */
static void wait_for_devices(struct xenbus_driver *xendrv)
/* A possible improvement here would be to have the tools add a per-device flag to the store entry, indicating whether it is needed at boot time. This would allow people who knew what they were doing to accelerate their boot slightly, but of course needs tools or manual intervention to set up those flags correctly.  */
static void wait_for_devices(struct xenbus_driver *xendrv)
{
	unsigned long start = jiffies;
	struct device_driver *drv = xendrv ? &xendrv->driver : NULL;
	unsigned int seconds_waited = 0;
	if (!ready_to_wait_for_devices || !xen_domain())
		return;
	while (exists_connecting_device(drv)) {
		if (time_after(jiffies, start + (seconds_waited+5)*HZ)) {
			if (!seconds_waited)
				printk(KERN_WARNING "XENBUS: Waiting for "
				       "devices to initialise: ");
			seconds_waited += 5;
			printk("%us...", 300 - seconds_waited);
			if (seconds_waited == 300)
				break;
		}
		schedule_timeout_interruptible(HZ/10);
	}
	if (seconds_waited)
		printk("\n");
	bus_for_each_dev(&xenbus_frontend.bus, NULL, drv,
			 print_device_status);
}