|
|
1.1 ! root 1: /* ! 2: * Copyright (C) 2006-2009 Free Software Foundation ! 3: * ! 4: * This program is free software ; you can redistribute it and/or modify ! 5: * it under the terms of the GNU General Public License as published by ! 6: * the Free Software Foundation ; either version 2 of the License, or ! 7: * (at your option) any later version. ! 8: * ! 9: * This program is distributed in the hope that it will be useful, ! 10: * but WITHOUT ANY WARRANTY ; without even the implied warranty of ! 11: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! 12: * GNU General Public License for more details. ! 13: * ! 14: * You should have received a copy of the GNU General Public License ! 15: * along with the program ; if not, write to the Free Software ! 16: * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ! 17: */ ! 18: ! 19: #ifndef XEN_STORE_H ! 20: #define XEN_STORE_H ! 21: #include <machine/xen.h> ! 22: #include <xen/public/io/xenbus.h> ! 23: ! 24: typedef unsigned32_t hyp_store_transaction_t; ! 25: ! 26: #define hyp_store_state_unknown "0" ! 27: #define hyp_store_state_initializing "1" ! 28: #define hyp_store_state_init_wait "2" ! 29: #define hyp_store_state_initialized "3" ! 30: #define hyp_store_state_connected "4" ! 31: #define hyp_store_state_closing "5" ! 32: #define hyp_store_state_closed "6" ! 33: ! 34: void hyp_store_init(void); ! 35: ! 36: extern const char *hyp_store_error; ! 37: ! 38: /* Start a transaction. */ ! 39: hyp_store_transaction_t hyp_store_transaction_start(void); ! 40: /* Stop a transaction. Returns 1 if the transactions succeeded, 0 else. */ ! 41: int hyp_store_transaction_stop(hyp_store_transaction_t t); ! 42: ! 43: /* List a directory: returns an array to file names, terminated by NULL. Free ! 44: * with kfree. */ ! 45: char **hyp_store_ls(hyp_store_transaction_t t, int n, ...); ! 46: ! 47: /* Get the value of an entry. Free with kfree. */ ! 48: void *hyp_store_read(hyp_store_transaction_t t, int n, ...); ! 49: /* Get the integer value of an entry, -1 on error. */ ! 50: int hyp_store_read_int(hyp_store_transaction_t t, int n, ...); ! 51: /* Set the value of an entry. */ ! 52: char *hyp_store_write(hyp_store_transaction_t t, const char *data, int n, ...); ! 53: ! 54: #endif /* XEN_STORE_H */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.