mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
Make crash and live flags mutually exclusive in virDomainCoreDump
They don't make any sense when used together.
This commit is contained in:
parent
bf5e3f6598
commit
d9b46a0d04
1
AUTHORS
1
AUTHORS
@ -167,6 +167,7 @@ Patches have also been contributed by:
|
||||
Jesse Cook <code.crashenx@gmail.com>
|
||||
Alexander Todorov <atodorov@otb.bg>
|
||||
Richard Laager <rlaager@wiktel.com>
|
||||
Mark Wu <dwu@redhat.com>
|
||||
|
||||
[....send patches to get your name here....]
|
||||
|
||||
|
@ -2347,7 +2347,7 @@ error:
|
||||
* virDomainCoreDump:
|
||||
* @domain: a domain object
|
||||
* @to: path for the core file
|
||||
* @flags: extra flags, currently unused
|
||||
* @flags: an OR'ed set of virDomainCoreDumpFlags
|
||||
*
|
||||
* This method will dump the core of a domain on a given file for analysis.
|
||||
* Note that for remote Xen Daemon the file path will be interpreted in
|
||||
@ -2379,6 +2379,12 @@ virDomainCoreDump(virDomainPtr domain, const char *to, int flags)
|
||||
goto error;
|
||||
}
|
||||
|
||||
if ((flags & VIR_DUMP_CRASH) && (flags & VIR_DUMP_LIVE)) {
|
||||
virLibDomainError(VIR_ERR_INVALID_ARG,
|
||||
_("crash and live flags are mutually exclusive"));
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (conn->driver->domainCoreDump) {
|
||||
int ret;
|
||||
char *absolute_to;
|
||||
|
Loading…
x
Reference in New Issue
Block a user