1 /*
2 * Copyright (C) 2016
3 * Author Wei Liu <wei.liu2@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 */
15
16 #include "libxl_osdeps.h" /* must come before any other headers */
17
18 #include "libxl_internal.h"
19
libxl__colo_restore_setup(libxl__egc * egc,libxl__colo_restore_state * crs)20 void libxl__colo_restore_setup(libxl__egc *egc,
21 libxl__colo_restore_state *crs)
22 {
23 STATE_AO_GC(crs->ao);
24
25 LOGD(ERROR, crs->domid, "COLO is not supported");
26
27 crs->callback(egc, crs, ERROR_FAIL);
28 }
29
libxl__colo_restore_teardown(libxl__egc * egc,void * dcs_void,int ret,int retval,int errnoval)30 void libxl__colo_restore_teardown(libxl__egc *egc, void *dcs_void,
31 int ret, int retval, int errnoval)
32 {
33 /* Shouldn't be here because setup already failed */
34 abort();
35 }
36
libxl__colo_save_setup(libxl__egc * egc,libxl__colo_save_state * css)37 void libxl__colo_save_setup(libxl__egc *egc, libxl__colo_save_state *css)
38 {
39 libxl__domain_save_state *dss = CONTAINER_OF(css, *dss, css);
40 STATE_AO_GC(dss->ao);
41
42 LOGD(ERROR, dss->domid, "COLO is not supported");
43
44 dss->callback(egc, dss, ERROR_FAIL);
45 }
46
libxl__colo_save_teardown(libxl__egc * egc,libxl__colo_save_state * css,int rc)47 void libxl__colo_save_teardown(libxl__egc *egc,
48 libxl__colo_save_state *css,
49 int rc)
50 {
51 /* Shouldn't be here because setup already failed */
52 abort();
53 }
54
55
56 /*
57 * Local variables:
58 * mode: C
59 * c-basic-offset: 4
60 * indent-tabs-mode: nil
61 * End:
62 */
63