[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH v2 03/10] conf: Introduce scsi hostdev



On 04/02/2013 11:19 AM, Hu Tao wrote:
On Mon, Apr 01, 2013 at 08:00:55PM +0800, Han Cheng wrote:
diff --git a/src/conf/domain_audit.c b/src/conf/domain_audit.c
index a776058..2fb5989 100644
--- a/src/conf/domain_audit.c
+++ b/src/conf/domain_audit.c
@@ -398,6 +398,16 @@ virDomainAuditHostdev(virDomainObjPtr vm, virDomainHostdevDefPtr hostdev,
                  goto cleanup;
              }
              break;
+        case VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI:
+            if (virAsprintf(&address, "%s:%d:%d:%d",
+                            hostdev->source.subsys.u.scsi.adapter,
+                            hostdev->source.subsys.u.scsi.bus,
+                            hostdev->source.subsys.u.scsi.target,
+                            hostdev->source.subsys.u.scsi.unit)<  0) {
+                VIR_WARN("OOM while encoding audit message");

virReportOOMError();

I'm not sure this is good.
Other functions in this file use VIR_WARN to report OOM. If we change this place, we should change all others for consistence.
Besides, Michal Privoznik is try to drop almost all virReportOOMError.

Cheng


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]