mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
Netlink is required when initialising COLO, so make sure only to compile COLO only when netlink is available. Change the inclusion of linux/netlink.h to netlink/netlink.h so that it doesn't use Linux kernel header directly. Provide necessary stub functions in case COLO is disabled. This should fix build on FreeBSD because there is no netlink there. It would also make libxl build properly when netlink is not present on a Linux system. Signed-off-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
63 lines
1.7 KiB
C
63 lines
1.7 KiB
C
/*
|
|
* Copyright (C) 2016
|
|
* Author Wei Liu <wei.liu2@citrix.com>
|
|
*
|
|
* This program 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; version 2.1 only. with the special
|
|
* exception on linking described in file LICENSE.
|
|
*
|
|
* This program 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.
|
|
*/
|
|
|
|
#include "libxl_osdeps.h" /* must come before any other headers */
|
|
|
|
#include "libxl_internal.h"
|
|
|
|
void libxl__colo_restore_setup(libxl__egc *egc,
|
|
libxl__colo_restore_state *crs)
|
|
{
|
|
STATE_AO_GC(crs->ao);
|
|
|
|
LOG(ERROR, "COLO is not supported");
|
|
|
|
crs->callback(egc, crs, ERROR_FAIL);
|
|
}
|
|
|
|
void libxl__colo_restore_teardown(libxl__egc *egc, void *dcs_void,
|
|
int ret, int retval, int errnoval)
|
|
{
|
|
/* Shouldn't be here because setup already failed */
|
|
abort();
|
|
}
|
|
|
|
void libxl__colo_save_setup(libxl__egc *egc, libxl__colo_save_state *css)
|
|
{
|
|
libxl__domain_save_state *dss = CONTAINER_OF(css, *dss, css);
|
|
STATE_AO_GC(dss->ao);
|
|
|
|
LOG(ERROR, "COLO is not supported");
|
|
|
|
dss->callback(egc, dss, ERROR_FAIL);
|
|
}
|
|
|
|
void libxl__colo_save_teardown(libxl__egc *egc,
|
|
libxl__colo_save_state *css,
|
|
int rc)
|
|
{
|
|
/* Shouldn't be here because setup already failed */
|
|
abort();
|
|
}
|
|
|
|
|
|
/*
|
|
* Local variables:
|
|
* mode: C
|
|
* c-basic-offset: 4
|
|
* indent-tabs-mode: nil
|
|
* End:
|
|
*/
|