2008-11-19 16:58:23 +00:00
|
|
|
/*
|
|
|
|
* config.h: VM configuration management
|
|
|
|
*
|
2010-03-01 23:38:28 +00:00
|
|
|
* Copyright (C) 2006, 2007, 2010 Red Hat, Inc.
|
2008-11-19 16:58:23 +00:00
|
|
|
* 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
|
2010-03-09 18:22:22 +00:00
|
|
|
# define __UML_CONF_H
|
2008-11-19 16:58:23 +00:00
|
|
|
|
2010-03-09 18:22:22 +00:00
|
|
|
# include "internal.h"
|
|
|
|
# include "bridge.h"
|
|
|
|
# include "capabilities.h"
|
|
|
|
# include "network_conf.h"
|
|
|
|
# include "domain_conf.h"
|
|
|
|
# include "virterror_internal.h"
|
|
|
|
# include "threads.h"
|
2008-11-19 16:58:23 +00:00
|
|
|
|
2010-03-09 18:22:22 +00:00
|
|
|
# define umlDebug(fmt, ...) do {} while(0)
|
2008-11-19 16:58:23 +00:00
|
|
|
|
2010-03-09 18:22:22 +00:00
|
|
|
# define UML_CPUMASK_LEN CPU_SETSIZE
|
2008-11-19 16:58:23 +00:00
|
|
|
|
2010-03-09 18:22:22 +00:00
|
|
|
# define UML_MAX_CHAR_DEVICE 16
|
2008-11-19 16:58:23 +00:00
|
|
|
|
|
|
|
/* Main driver state */
|
|
|
|
struct uml_driver {
|
2009-01-15 19:56:05 +00:00
|
|
|
virMutex lock;
|
2008-12-04 21:14:39 +00:00
|
|
|
|
2009-06-12 13:20:13 +00:00
|
|
|
int privileged;
|
|
|
|
|
2010-03-30 14:15:13 +00:00
|
|
|
unsigned long umlVersion;
|
2008-11-19 16:58:23 +00:00
|
|
|
int nextvmid;
|
|
|
|
|
|
|
|
virDomainObjList domains;
|
|
|
|
|
|
|
|
brControl *brctl;
|
|
|
|
char *configDir;
|
|
|
|
char *autostartDir;
|
|
|
|
char *logDir;
|
|
|
|
char *monitorDir;
|
|
|
|
|
|
|
|
int inotifyFD;
|
|
|
|
int inotifyWatch;
|
|
|
|
|
|
|
|
virCapsPtr caps;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2010-04-03 13:33:29 +00:00
|
|
|
# define umlReportError(code, ...) \
|
|
|
|
virReportErrorHelper(NULL, VIR_FROM_UML, code, __FILE__, \
|
2010-03-01 23:38:28 +00:00
|
|
|
__FUNCTION__, __LINE__, __VA_ARGS__)
|
2008-11-19 16:58:23 +00:00
|
|
|
|
|
|
|
virCapsPtr umlCapsInit (void);
|
|
|
|
|
|
|
|
int umlBuildCommandLine (virConnectPtr conn,
|
2008-11-21 10:06:28 +00:00
|
|
|
struct uml_driver *driver,
|
|
|
|
virDomainObjPtr dom,
|
2010-08-23 11:25:50 +00:00
|
|
|
fd_set *keepfd,
|
2008-11-21 10:06:28 +00:00
|
|
|
const char ***retargv,
|
2009-06-03 11:13:33 +00:00
|
|
|
const char ***retenv);
|
2008-11-19 16:58:23 +00:00
|
|
|
|
|
|
|
#endif /* __UML_CONF_H */
|