提交 0f3f8ac9 编写于 作者: J John Ferlan

util: Check/ignore already disabled event

If the event is already disabled, then don't bother with setting it
disabled again.  Causes unnecessary error on systems that don't support
the feature anyway.
上级 12b2aebe
无相关合并请求
......@@ -234,6 +234,9 @@ virPerfEventDisable(virPerfPtr perf,
if (event == NULL)
return -1;
if (!event->enabled)
return 0;
if (ioctl(event->fd, PERF_EVENT_IOC_DISABLE) < 0) {
virReportSystemError(errno,
_("unable to disable host cpu perf event for %s"),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册