diff options
Diffstat (limited to 'kexec/kexec-xen.c')
-rw-r--r-- | kexec/kexec-xen.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/kexec/kexec-xen.c b/kexec/kexec-xen.c index 24a4191..2b448d3 100644 --- a/kexec/kexec-xen.c +++ b/kexec/kexec-xen.c @@ -105,6 +105,27 @@ int xen_kexec_unload(uint64_t kexec_flags) return ret; } +int xen_kexec_status(uint64_t kexec_flags) +{ + xc_interface *xch; + uint8_t type; + int ret = -1; + +#ifdef HAVE_KEXEC_CMD_STATUS + xch = xc_interface_open(NULL, NULL, 0); + if (!xch) + return -1; + + type = (kexec_flags & KEXEC_ON_CRASH) ? KEXEC_TYPE_CRASH : KEXEC_TYPE_DEFAULT; + + ret = xc_kexec_status(xch, type); + + xc_interface_close(xch); +#endif + + return ret; +} + void xen_kexec_exec(void) { xc_interface *xch; @@ -130,6 +151,11 @@ int xen_kexec_unload(uint64_t kexec_flags) return -1; } +int xen_kexec_status(uint64_t kexec_flags) +{ + return -1; +} + void xen_kexec_exec(void) { } |