mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 18:21:39 +01:00
libxenforeignmemory will provide a stable API and ABI for mapping foreign domain memory (subject to appropriate privileges). The new library exposes an interface equivalent to xc_map_foreign_memory_bulk, which all the other xc_map_foreign_memory_* functions (which remain in libxc) are implemented in terms of. Upon request (via #define XC_WANT_COMPAT_MAP_FOREIGN_API) libxenctrl will provide a compat API for the old names. This is used by qemu-xen and qemu-trad as well as various in tree things (which required de-dupping various #includes in some too to get the #define before the first). Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> [ ijc -- updated MINIOS_UPSTREAM_REVISION and QEMU_TRADITIONAL_REVISION ]
48 lines
1.3 KiB
C
48 lines
1.3 KiB
C
/*\
|
|
* Copyright (C) International Business Machines Corp., 2005
|
|
* Author(s): Anthony Liguori <aliguori@us.ibm.com>
|
|
*
|
|
* Xen Console Daemon
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; under version 2 of the License.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; If not, see <http://www.gnu.org/licenses/>.
|
|
\*/
|
|
|
|
#ifndef CONSOLED_UTILS_H
|
|
#define CONSOLED_UTILS_H
|
|
|
|
#include <stdbool.h>
|
|
#include <syslog.h>
|
|
#include <stdio.h>
|
|
#define XC_WANT_COMPAT_MAP_FOREIGN_API
|
|
#include <xenctrl.h>
|
|
|
|
#include <xenstore.h>
|
|
|
|
void daemonize(const char *pidfile);
|
|
bool xen_setup(void);
|
|
|
|
extern struct xs_handle *xs;
|
|
extern xc_interface *xc;
|
|
|
|
#if 1
|
|
#define dolog(val, fmt, ...) do { \
|
|
if ((val) == LOG_ERR) \
|
|
fprintf(stderr, fmt "\n", ## __VA_ARGS__); \
|
|
syslog(val, fmt, ## __VA_ARGS__); \
|
|
} while (/* CONSTCOND */0)
|
|
#else
|
|
#define dolog(val, fmt, ...) fprintf(stderr, fmt "\n", ## __VA_ARGS__)
|
|
#endif
|
|
|
|
#endif
|