lkml.org 
[lkml]   [2010]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Xen-devel] [PATCH 12/12] Unplug emulated disks and nics
> +#if (defined(CONFIG_XEN_NETDEV_FRONTEND) || \
> + defined(CONFIG_XEN_NETDEV_FRONTEND_MODULE)) && \
> + (defined(CONFIG_XEN_PLATFORM_PCI) || \
> + defined(CONFIG_XEN_PLATFORM_PCI_MODULE))
> + printk(KERN_INFO "Netfront and the Xen platform PCI driver have "
> + "been compiled for this kernel: unplug emulated NICs.\n");
> + xen_emul_unplug |= XEN_UNPLUG_ALL_NICS;
> +#endif
> +#if (defined(CONFIG_XEN_BLKDEV_FRONTEND) || \
> + defined(CONFIG_XEN_BLKDEV_FRONTEND_MODULE)) && \
> + (defined(CONFIG_XEN_PLATFORM_PCI) || \
> + defined(CONFIG_XEN_PLATFORM_PCI_MODULE))
> + printk(KERN_INFO "Blkfront and the Xen platform PCI driver have "
> + "been compiled for this kernel: unplug emulated disks.\n"
> + "You might have to change the root device\n"
> + "from /dev/hd[a-d] to /dev/xvd[a-d]\n"
> + "in your root= kernel command line option\n");
> + xen_emul_unplug |= XEN_UNPLUG_ALL_IDE_DISKS;
> +#endif

Wow. Can you move those checks to the header file and make it deal with
the #ifdef and setting of xen_emul_unplug?

> + }
> + /* Now unplug the emulated devices */
> + if (xen_platform_pci_enabled && !(xen_emul_unplug & XEN_UNPLUG_IGNORE))
> + outw(xen_emul_unplug, XEN_IOPORT_UNPLUG);
> +}
> +
> +static int __init parse_xen_emul_unplug(char *arg)
> +{
> + char *p, *q;
> +
> + for (p = arg; p; p = q) {
> + q = strchr(arg, ',');
> + if (q)
> + *q++ = '\0';
> + if (!strcmp(p, "all"))
> + xen_emul_unplug |= XEN_UNPLUG_ALL;

strncmp..


\
 
 \ /
  Last update: 2010-06-15 15:47    [W:0.212 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site