direct-io.hg

changeset 8035:42474df9b248

Move XenbusState from the Linux-specific xenbus.h into a new file with the Xen
public interfaces.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author emellor@leeni.uk.xensource.com
date Fri Nov 25 11:19:03 2005 +0000 (2005-11-25)
parents 78b5e590be34
children 28a117c5ea94
files linux-2.6-xen-sparse/include/asm-xen/xenbus.h xen/include/public/io/xenbus.h
line diff
     1.1 --- a/linux-2.6-xen-sparse/include/asm-xen/xenbus.h	Thu Nov 24 19:57:01 2005 +0000
     1.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/xenbus.h	Fri Nov 25 11:19:03 2005 +0000
     1.3 @@ -4,6 +4,7 @@
     1.4   * Talks to Xen Store to figure out what devices we have.
     1.5   *
     1.6   * Copyright (C) 2005 Rusty Russell, IBM Corporation
     1.7 + * Copyright (C) 2005 XenSource Ltd.
     1.8   * 
     1.9   * This file may be distributed separately from the Linux kernel, or
    1.10   * incorporated into other software packages, subject to the following license:
    1.11 @@ -33,6 +34,7 @@
    1.12  #include <linux/device.h>
    1.13  #include <linux/notifier.h>
    1.14  #include <asm/semaphore.h>
    1.15 +#include <asm-xen/xen-public/io/xenbus.h>
    1.16  #include <asm-xen/xen-public/io/xs_wire.h>
    1.17  
    1.18  /* Register callback to watch this node. */
    1.19 @@ -49,27 +51,6 @@ struct xenbus_watch
    1.20  };
    1.21  
    1.22  
    1.23 -/* The state of either end of the Xenbus, i.e. the current communication
    1.24 -   status of initialisation across the bus.  States here imply nothing about
    1.25 -   the state of the connection between the driver and the kernel's device
    1.26 -   layers.  */
    1.27 -typedef enum
    1.28 -{
    1.29 -  XenbusStateUnknown      = 0,
    1.30 -  XenbusStateInitialising = 1,
    1.31 -  XenbusStateInitWait     = 2,  /* Finished early initialisation, but waiting
    1.32 -                                   for information from the peer or hotplug
    1.33 -				   scripts. */
    1.34 -  XenbusStateInitialised  = 3,  /* Initialised and waiting for a connection
    1.35 -				   from the peer. */
    1.36 -  XenbusStateConnected    = 4,
    1.37 -  XenbusStateClosing      = 5,  /* The device is being closed due to an error
    1.38 -				   or an unplug event. */
    1.39 -  XenbusStateClosed       = 6
    1.40 -
    1.41 -} XenbusState;
    1.42 -
    1.43 -
    1.44  /* A xenbus device. */
    1.45  struct xenbus_device {
    1.46  	const char *devicetype;
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/xen/include/public/io/xenbus.h	Fri Nov 25 11:19:03 2005 +0000
     2.3 @@ -0,0 +1,66 @@
     2.4 +/*****************************************************************************
     2.5 + * xenbus.h
     2.6 + *
     2.7 + * Xenbus protocol details.
     2.8 + *
     2.9 + * Copyright (C) 2005 XenSource Ltd.
    2.10 + * 
    2.11 + * This file may be distributed separately from the Linux kernel, or
    2.12 + * incorporated into other software packages, subject to the following
    2.13 + * license:
    2.14 + * 
    2.15 + * Permission is hereby granted, free of charge, to any person obtaining a
    2.16 + * copy of this source file (the "Software"), to deal in the Software without
    2.17 + * restriction, including without limitation the rights to use, copy, modify,
    2.18 + * merge, publish, distribute, sublicense, and/or sell copies of the Software,
    2.19 + * and to permit persons to whom the Software is furnished to do so, subject
    2.20 + * to the following conditions:
    2.21 + * 
    2.22 + * The above copyright notice and this permission notice shall be included in
    2.23 + * all copies or substantial portions of the Software.
    2.24 + * 
    2.25 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    2.26 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    2.27 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    2.28 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    2.29 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    2.30 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
    2.31 + * DEALINGS IN THE SOFTWARE.
    2.32 + */
    2.33 +
    2.34 +#ifndef _XEN_XENBUS_H
    2.35 +#define _XEN_XENBUS_H
    2.36 +
    2.37 +
    2.38 +/* The state of either end of the Xenbus, i.e. the current communication
    2.39 +   status of initialisation across the bus.  States here imply nothing about
    2.40 +   the state of the connection between the driver and the kernel's device
    2.41 +   layers.  */
    2.42 +typedef enum
    2.43 +{
    2.44 +  XenbusStateUnknown      = 0,
    2.45 +  XenbusStateInitialising = 1,
    2.46 +  XenbusStateInitWait     = 2,  /* Finished early initialisation, but waiting
    2.47 +                                   for information from the peer or hotplug
    2.48 +				   scripts. */
    2.49 +  XenbusStateInitialised  = 3,  /* Initialised and waiting for a connection
    2.50 +				   from the peer. */
    2.51 +  XenbusStateConnected    = 4,
    2.52 +  XenbusStateClosing      = 5,  /* The device is being closed due to an error
    2.53 +				   or an unplug event. */
    2.54 +  XenbusStateClosed       = 6
    2.55 +
    2.56 +} XenbusState;
    2.57 +
    2.58 +
    2.59 +#endif /* _XEN_XENBUS_H */
    2.60 +
    2.61 +/*
    2.62 + * Local variables:
    2.63 + *  c-file-style: "linux"
    2.64 + *  indent-tabs-mode: t
    2.65 + *  c-indent-level: 8
    2.66 + *  c-basic-offset: 8
    2.67 + *  tab-width: 8
    2.68 + * End:
    2.69 + */