/****************************************************************************** * xenbus.h * * Talks to Xen Store to figure out what devices we have. * * Copyright (C) 2005 Rusty Russell, IBM Corporation * Copyright (C) 2005 XenSource Ltd. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version 2 * as published by the Free Software Foundation; or, when distributed * separately from the Linux kernel or incorporated into other * software packages, subject to the following license: * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this source file (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, copy, modify, * merge, publish, distribute, sublicense, and/or sell copies of the Software, * and to permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE.
*/
/* Register callback to watch this node. */ struct xenbus_watch
{ struct list_head list;
/* Path being watched. */ constchar *node;
unsignedint nr_pending;
/* * Called just before enqueing new event while a spinlock is held. * The event will be discarded if this callback returns false.
*/ bool (*will_handle)(struct xenbus_watch *, constchar *path, constchar *token);
/* Callback (executed in a process context with no locks held). */ void (*callback)(struct xenbus_watch *, constchar *path, constchar *token);
};
char **xenbus_directory(struct xenbus_transaction t, constchar *dir, constchar *node, unsignedint *num); void *xenbus_read(struct xenbus_transaction t, constchar *dir, constchar *node, unsignedint *len); int xenbus_write(struct xenbus_transaction t, constchar *dir, constchar *node, constchar *string); int xenbus_exists(struct xenbus_transaction t, constchar *dir, constchar *node); int xenbus_rm(struct xenbus_transaction t, constchar *dir, constchar *node); int xenbus_transaction_start(struct xenbus_transaction *t); int xenbus_transaction_end(struct xenbus_transaction t, int abort);
/* Single read and scanf: returns -errno or num scanned if > 0. */
__scanf(4, 5) int xenbus_scanf(struct xenbus_transaction t, constchar *dir, constchar *node, constchar *fmt, ...);
/* Single printf and write: returns -errno or 0. */
__printf(4, 5) int xenbus_printf(struct xenbus_transaction t, constchar *dir, constchar *node, constchar *fmt, ...);
/* Generic read function: NULL-terminated triples of name,
* sprintf-style type string, and pointer. Returns 0 or errno.*/ int xenbus_gather(struct xenbus_transaction t, constchar *dir, ...);
/* notifier routines for when the xenstore comes up */ externint xenstored_ready; int register_xenstore_notifier(struct notifier_block *nb); void unregister_xenstore_notifier(struct notifier_block *nb);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.