aboutsummaryrefslogtreecommitdiffstats
path: root/tools/console/daemon/utils.c
Commit message (Collapse)AuthorAgeFilesLines
* libxc: eliminate static variables, use xentoollog; API changeKeir Fraser2010-05-281-4/+4
| | | | | | | | | | | | | | | | | | | | This patch eliminate the global variables in libxenctrl (used for logging and error reporting). Instead the information which was in the global variables is now in a new xc_interface* opaque structure, which xc_interface open returns instead of the raw file descriptor; furthermore, logging is done via xentoollog. There are three new parameters to xc_interface_open to control the logging, but existing callers can just pass "0" for all three to get the old behaviour. All libxc callers have been adjusted accordingly. Also update QEMU_TAG for corresponding qemu change. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
* xenconsoled: portability fixes:Keir Fraser2007-10-081-1/+1
| | | | | | | | | | | | | | | - Use openpty(), which does the same as the sequence of open(), grantpt(), unlockpt(), ptsname(), tcgetattr() simplifies code - Check return code from tcsetattr() - sprintf() -> snprintf() - OpenBSD lacks POSIX grantpt() and unlockpt() requires use of openpty() - Solaris lacks POSIX openpty() via feedback from SUN (John Levon) implement openpty() for Solaris, tested and ok'd by SUN (John Levon) Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* Fix tools/console to build on NetBSD.Keir Fraser2007-09-201-0/+1
| | | | | | | | - include headers needed to build on NetBSD - Remove unused pty.h - Initialize spty terminal before actually using it Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
* Add persistent guest & hv logging in xenconsoled.kfraser@localhost.localdomain2007-06-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | * The --log command line argument takes one of 4 values - none - no logging (the default) - hv - log all hypervisor messages - guest - log all guest messages - both - log all guest & hypervisor messages * The --log-dir command line argument takes a path to specify where to store logfiles. If omitted it defaults to /var/log/xen/console * The hypervisor logfile is $LOGDIR/hypervisor.log * The guest logfile is $LOGDIR/guest-[NAME].log * If receiving a SIGHUP it will close & re-open all log files to enable logrotate to do its magic * Fixes the permissions of /var/run/xenconsoled.pid * Adds a --pid-file command line argument to override the default location of pid file (this is not really related to logging, but since I was in that code...) Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
* [SOLARIS] A couple of simple compile fixes for tools/ on Solaris.kfraser@localhost.localdomain2006-10-171-1/+1
| | | | Signed-off-by: John Levon <john.levon@sun.com>
* [TOOLS] Introduce xc_evtchn_*() interface for interacting with /dev/xen/evtchn.kaf24@firebug.cl.cam.ac.uk2006-06-151-26/+0
| | | | | | | | No longer open the device as non-blocking: all reads immediately follow a select() on the device indicating it's ready to read. Signed-off-by: John Levon <john.levon@sun.com>
* Make sure to fork again after setsid() so that child cannot regain CTTY.Anthony Liguori2005-12-121-0/+6
| | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Remove unsued domain_controller.h file.kaf24@firebug.cl.cam.ac.uk2005-09-141-2/+0
| | | | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* Check the return value of chdir(2) and write(2).cl349@firebug.cl.cam.ac.uk2005-09-121-2/+4
| | | | | Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
* Use @releaseDomain watch-events.cl349@firebug.cl.cam.ac.uk2005-09-061-101/+10
| | | | | | This replaces listening to the domain exception virq through xcs. Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
* Update consoled to use xs_get_domain_path and cleanup domain tracking code.cl349@firebug.cl.cam.ac.uk2005-09-061-1/+1
| | | | | Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
* Add @introduceDomain event-watch and replace consoled watch on /console.cl349@firebug.cl.cam.ac.uk2005-09-051-2/+2
| | | | | Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
* Fix save/restore when using grant tables in network, robust-ify netback shand@ubuntu.eng.hq.xensource.com2005-09-011-1/+1
| | | | | | | | | | | against bogus front-end drivers, plus various small cleanups. Note that there is now only /one/ config option controlling the use of grant tables with networking (not separate ones for rx and tx). An outstanding issue is that console reconnect after a restore causes badness. Signed-off-by: Steven Hand <steven@xensource.com>
* Use watch to detect new domains and avoid polling for dead domains.cl349@firebug.cl.cam.ac.uk2005-08-301-2/+7
| | | | | Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
* New console transport and update xenconsoled.cl349@firebug.cl.cam.ac.uk2005-08-301-7/+3
| | | | | | | | | | | Add a new console interface using a seperate shared page and event channel instead of passing the console input/output over control messages. Update xenconsoled to use the new console interface. Make xenconsoled garbage collect dying domains by subscribing to the domain exception virq. Signed-off-by: Robert Read <robert@xensource.com> Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
* Rename libxc => libxenctrl and xc.h => xen/xenctrl.hcl349@firebug.cl.cam.ac.uk2005-08-241-1/+1
| | | | | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk> --HG-- rename : tools/libxc/xc.h => tools/libxc/xenctrl.h
* Make xen daemon startup more robust.cl349@firebug.cl.cam.ac.uk2005-08-101-0/+2
| | | | | | | | | | | | | 1) make xenconsoled exit gracefully if xcs dies 2) daemonize xenstored before binding to xenstored socket 3) wait to close stdio in xenstored until we're ready to accept connections (so that PID=`xenstored --output-pid` doesn't return until it's ready to accept connections) 4) updates tools/misc/xend for these changes Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Rusty Russell <rusty@rustycorp.com.au> Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
* Really include renamed console files. :-)kaf24@firebug.cl.cam.ac.uk2005-08-071-0/+251
Signed-off-by: Keir Fraser <keir@xensource.com>