qemu: Introduce qemuDomainFindSCSIControllerModel
Rather than repeat multiple steps in order to find the SCSI controller model, let's combine them into one helper that will return either the model from the definition or the default model based on the capabilities. This patch adds an extra check/error that the controller that's being found actually exists. This just clarifies that the error was because the controller doesn't exist rather than the more generic error that we were unable to determine the model from qemuDomainSetSCSIControllerModel when a -1 was passed in and the capabilities were unable to find one.
Showing
想要评论请 注册 或 登录