提交 d9b46a0d 编写于 作者: M Mark Wu 提交者: Jiri Denemark

Make crash and live flags mutually exclusive in virDomainCoreDump

They don't make any sense when used together.
上级 bf5e3f65
...@@ -167,6 +167,7 @@ Patches have also been contributed by: ...@@ -167,6 +167,7 @@ Patches have also been contributed by:
Jesse Cook <code.crashenx@gmail.com> Jesse Cook <code.crashenx@gmail.com>
Alexander Todorov <atodorov@otb.bg> Alexander Todorov <atodorov@otb.bg>
Richard Laager <rlaager@wiktel.com> Richard Laager <rlaager@wiktel.com>
Mark Wu <dwu@redhat.com>
[....send patches to get your name here....] [....send patches to get your name here....]
......
...@@ -2347,7 +2347,7 @@ error: ...@@ -2347,7 +2347,7 @@ error:
* virDomainCoreDump: * virDomainCoreDump:
* @domain: a domain object * @domain: a domain object
* @to: path for the core file * @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. * 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 * 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) ...@@ -2379,6 +2379,12 @@ virDomainCoreDump(virDomainPtr domain, const char *to, int flags)
goto error; 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) { if (conn->driver->domainCoreDump) {
int ret; int ret;
char *absolute_to; char *absolute_to;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册