debuggers.hg

view tools/libxl/libxl_utils.h @ 20637:91555131e235

libxenlight: implement cdrom insert/eject

This patch implements functions in libxenlight to change the cdrom in
a VM at run time and to handle cdrom eject requests from guests.

This patch adds two new commands to xl: cd-insert and cd-eject; it
also modifies xl to handle cdrom eject requests coming from guests
(actually coming from qemu).

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Dec 08 07:47:52 2009 +0000 (2009-12-08)
parents c0e32941ee69
children 74ca2cb026a5
line source
1 /*
2 * Copyright (C) 2009 Citrix Ltd.
3 * Author Stefano Stabellini <stefano.stabellini@eu.citrix.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as published
7 * by the Free Software Foundation; version 2.1 only. with the special
8 * exception on linking described in file LICENSE.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Lesser General Public License for more details.
14 */
16 #ifndef LIBXL_UTILS_H
17 #define LIBXL_UTILS_H
19 #include "libxl.h"
21 #define UUID_FMT "%02hhx%02hhx%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx"
23 unsigned long libxl_get_required_shadow_memory(unsigned long maxmem_kb, unsigned int smp_cpus);
24 int libxl_name_to_domid(struct libxl_ctx *ctx, char *name, uint32_t *domid);
25 char *libxl_domid_to_name(struct libxl_ctx *ctx, uint32_t domid);
26 int libxl_uuid_to_domid(struct libxl_ctx *ctx, xen_uuid_t *uuid, uint32_t *domid);
27 int libxl_domid_to_uuid(struct libxl_ctx *ctx, xen_uuid_t **uuid, uint32_t domid);
28 int libxl_is_uuid(char *s);
29 xen_uuid_t *libxl_string_to_uuid(struct libxl_ctx *ctx, char *s);
30 char *libxl_uuid_to_string(struct libxl_ctx *ctx, xen_uuid_t *uuid);
31 int libxl_param_to_domid(struct libxl_ctx *ctx, char *p, uint32_t *domid);
32 int libxl_get_stubdom_id(struct libxl_ctx *ctx, int guest_domid);
33 int libxl_is_stubdom(struct libxl_ctx *ctx, int domid);
34 int libxl_create_logfile(struct libxl_ctx *ctx, char *name, char **full_name);
35 int libxl_string_to_phystype(struct libxl_ctx *ctx, char *s, libxl_disk_phystype *phystype);
37 #endif