libvirt/src/uml_conf.h

75 lines
2.0 KiB
C
Raw Normal View History

2008-11-19 16:58:23 +00:00
/*
* config.h: VM configuration management
*
* Copyright (C) 2006, 2007 Red Hat, Inc.
* Copyright (C) 2006 Daniel P. Berrange
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Author: Daniel P. Berrange <berrange@redhat.com>
*/
#ifndef __UML_CONF_H
#define __UML_CONF_H
#include "internal.h"
#include "bridge.h"
#include "capabilities.h"
#include "network_conf.h"
#include "domain_conf.h"
#include "virterror_internal.h"
#define umlDebug(fmt, ...) do {} while(0)
#define UML_CPUMASK_LEN CPU_SETSIZE
#define UML_MAX_CHAR_DEVICE 16
/* Main driver state */
struct uml_driver {
unsigned int umlVersion;
int nextvmid;
virDomainObjList domains;
brControl *brctl;
char *configDir;
char *autostartDir;
char *logDir;
char *monitorDir;
int inotifyFD;
int inotifyWatch;
virCapsPtr caps;
};
#define umlReportError(conn, dom, net, code, fmt...) \
virReportErrorHelper(conn, VIR_FROM_UML, code, __FILE__, \
__FUNCTION__, __LINE__, fmt)
virCapsPtr umlCapsInit (void);
int umlBuildCommandLine (virConnectPtr conn,
struct uml_driver *driver,
virDomainObjPtr dom,
const char ***retargv,
const char ***retenv,
int **tapfds,
int *ntapfds);
#endif /* __UML_CONF_H */