libvirt/src/uml/uml_conf.h
Soren Hansen 21dcce5364 Allow chardev of type 'file' for UML domains.
Like the comment suggested, we just open the file and pass the file
descriptor to uml. The input "stream" is set to "null", since I couldn't
find any useful way to actually use a file for input for a chardev and
this also mimics what e.g. QEmu does internally.

Signed-off-by: Soren Hansen <soren@linux2go.dk>
2010-08-24 11:19:21 +02:00

79 lines
2.2 KiB
C

/*
* config.h: VM configuration management
*
* Copyright (C) 2006, 2007, 2010 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"
# include "threads.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 {
virMutex lock;
int privileged;
unsigned long umlVersion;
int nextvmid;
virDomainObjList domains;
brControl *brctl;
char *configDir;
char *autostartDir;
char *logDir;
char *monitorDir;
int inotifyFD;
int inotifyWatch;
virCapsPtr caps;
};
# define umlReportError(code, ...) \
virReportErrorHelper(NULL, VIR_FROM_UML, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
virCapsPtr umlCapsInit (void);
int umlBuildCommandLine (virConnectPtr conn,
struct uml_driver *driver,
virDomainObjPtr dom,
fd_set *keepfd,
const char ***retargv,
const char ***retenv);
#endif /* __UML_CONF_H */